yosys/tests/opt/opt_share_bug2334.ys

14 lines
203 B
Plaintext

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