aboutsummaryrefslogtreecommitdiffstats
path: root/passes/pmgen/peepopt_shiftmul.pmg
diff options
context:
space:
mode:
Diffstat (limited to 'passes/pmgen/peepopt_shiftmul.pmg')
-rw-r--r--passes/pmgen/peepopt_shiftmul.pmg4
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/pmgen/peepopt_shiftmul.pmg b/passes/pmgen/peepopt_shiftmul.pmg
index 6adab4e5f..d4748ae19 100644
--- a/passes/pmgen/peepopt_shiftmul.pmg
+++ b/passes/pmgen/peepopt_shiftmul.pmg
@@ -34,6 +34,7 @@ match mul
endmatch
code
+{
IdString const_factor_port = port(mul, \A).is_fully_const() ? \A : \B;
IdString const_factor_signed = const_factor_port == \A ? \A_SIGNED : \B_SIGNED;
Const const_factor_cnst = port(mul, const_factor_port).as_const();
@@ -90,5 +91,6 @@ code
shift->setParam(\B_WIDTH, GetSize(new_b));
blacklist(shift);
- reject;
+ accept;
+}
endcode