From db5b76edc14649e82d87c258481a2b0a46b1c345 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 14 Feb 2025 13:28:24 +1300 Subject: [PATCH] Add test for shifting by INT_MAX Currently resulting in CI failing on main during fsm checks which generate a circuit that simplifies to this. --- tests/opt/opt_expr_shr_int_max.ys | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/opt/opt_expr_shr_int_max.ys diff --git a/tests/opt/opt_expr_shr_int_max.ys b/tests/opt/opt_expr_shr_int_max.ys new file mode 100644 index 000000000..5fb3c9d37 --- /dev/null +++ b/tests/opt/opt_expr_shr_int_max.ys @@ -0,0 +1,9 @@ +read_verilog << EOF +module uut_00034(b, y); + input signed [30:0] b; + output [11:0] y = b >> ~31'b0; // shift by INT_MAX +endmodule +EOF + +# This should succeed, even with UBSAN halt_on_error +opt_expr