aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt/opt_share_bug2334.ys
diff options
context:
space:
mode:
Diffstat (limited to 'tests/opt/opt_share_bug2334.ys')
-rw-r--r--tests/opt/opt_share_bug2334.ys13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/opt/opt_share_bug2334.ys b/tests/opt/opt_share_bug2334.ys
new file mode 100644
index 000000000..004d98349
--- /dev/null
+++ b/tests/opt/opt_share_bug2334.ys
@@ -0,0 +1,13 @@
+read_verilog <<EOT
+
+module t(input [3:0] A, input [3:0] B, input [3:0] C, input S, output [3:0] Y);
+
+wire [3:0] t = A + C;
+
+assign Y = S ? A + B : {4{t[0]}};
+
+endmodule
+
+EOT
+
+equiv_opt -assert opt_share