scratchpad -copy abc9.script.flow3 abc9.script
abc9 -lut 4
+design -reset
+read_verilog <<EOT
+module top(input a, b, output o);
+(* keep *) wire w = a & b;
+assign o = ~w;
+endmodule
+EOT
+
+simplemap
+equiv_opt -assert abc9 -lut 4
+design -load postopt
+select -assert-count 2 t:$lut
+
++
+design -reset
+read_verilog -icells <<EOT
+module top(input a, b, output o);
+wire w;
+(* keep *) $_AND_ gate (.Y(w), .A(a), .B(b));
+assign o = ~w;
+endmodule
+EOT
+
+simplemap
+equiv_opt -assert abc9 -lut 4
+design -load postopt
+select -assert-count 1 t:$lut
+select -assert-count 1 t:$_AND_
++
+
+ design -reset
+ read_verilog -icells <<EOT
+ module top(input a, b, output o);
+ assign o = ~(a & b);
+ endmodule
+ EOT
+ abc9 -lut 4
+ clean
+ select -assert-count 1 t:$lut
+ select -assert-none t:$lut t:* %D