aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2020-08-04 16:30:24 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2020-08-04 16:30:24 +0200
commite89cc9c02fc5d9ff2a6eedc524e7c0420666ac22 (patch)
treef92ae3922768bccd01aa159c85638d6b868e7945 /tests
parentc39ebe6ae0e41cf9a84da852fa3cf9f71937a9b2 (diff)
downloadyosys-e89cc9c02fc5d9ff2a6eedc524e7c0420666ac22.tar.gz
yosys-e89cc9c02fc5d9ff2a6eedc524e7c0420666ac22.tar.bz2
yosys-e89cc9c02fc5d9ff2a6eedc524e7c0420666ac22.zip
peepopt.muldiv: Add a signedness check.
Fixes #2318.
Diffstat (limited to 'tests')
-rw-r--r--tests/opt/bug2318.ys12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/opt/bug2318.ys b/tests/opt/bug2318.ys
new file mode 100644
index 000000000..9de6f88ec
--- /dev/null
+++ b/tests/opt/bug2318.ys
@@ -0,0 +1,12 @@
+read_verilog <<EOT
+module t(input [3:0] A, input [3:0] B, output signed [3:0] Y);
+
+wire [7:0] P = A * B;
+wire signed [7:0] SP = P;
+wire signed [3:0] SB = B;
+assign Y = SP / SB;
+
+endmodule
+EOT
+
+equiv_opt -assert peepopt