Fixed const folding of $bu0 cells
authorClifford Wolf <clifford@clifford.at>
Thu, 27 Feb 2014 03:09:32 +0000 (04:09 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 27 Feb 2014 03:09:32 +0000 (04:09 +0100)
kernel/celltypes.h
passes/opt/opt_const.cc

index 34a6e56fa5bf6b1c338fbd21765a6bc9a9296bde..4a600af9d1c8c3595e86af337d833936a1450d8e 100644 (file)
@@ -216,7 +216,7 @@ struct CellTypes
                        type = "$shl";
 
                if (type != "$sshr" && type != "$sshl" && type != "$shr" && type != "$shl" &&
-                               type != "$pos" && type != "$neg" && type != "$not") {
+                               type != "$pos" && type != "$neg" && type != "$not" && type != "$bu0") {
                        if (!signed1 || !signed2)
                                signed1 = false, signed2 = false;
                }
index ad9a71b15d5d3c72827088986c5e309c36f67e40..da71ec30eaa15823f93ce9cf1b6ad5507f02c2dc 100644 (file)
@@ -463,6 +463,7 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
                FOLD_2ARG_CELL(pow)
 
                FOLD_1ARG_CELL(pos)
+               FOLD_1ARG_CELL(bu0)
                FOLD_1ARG_CELL(neg)
 
                // be very conservative with optimizing $mux cells as we do not want to break mux trees