From af933b4f3801fa560e0ec4a4f33f99ff41265920 Mon Sep 17 00:00:00 2001 From: George Rennie Date: Wed, 7 May 2025 15:12:33 +0200 Subject: [PATCH] tests: check shifts by amounts that overflow int --- tests/opt/opt_expr_shift.ys | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/opt/opt_expr_shift.ys b/tests/opt/opt_expr_shift.ys index aac2e6f62..5944bfa33 100644 --- a/tests/opt/opt_expr_shift.ys +++ b/tests/opt/opt_expr_shift.ys @@ -48,3 +48,25 @@ select -assert-none t:$shl select -assert-none t:$shr select -assert-none t:$sshl select -assert-none t:$sshr + +design -reset + +read_verilog <> 36'hfffffffff); + wire signed [35:0] shamt = 36'hfffffffff; + assign out2 = (in >> shamt); +endmodule +EOT + +equiv_opt opt_expr + +design -load postopt +select -assert-none t:$shl +select -assert-none t:$shr +select -assert-none t:$sshl +select -assert-none t:$sshr