aboutsummaryrefslogtreecommitdiffstats
path: root/passes/pmgen
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-09-06 22:48:23 -0700
committerEddie Hung <eddie@fpgeh.com>2019-09-06 22:48:23 -0700
commite2c2d784c8217e4bcf29fb6b156b6a8285036b80 (patch)
treeebe87df4dd1c53a450c9b4b08c53e1eabf5f626a /passes/pmgen
parent51b559af2cc60226d85880efc3705f0860ffaed6 (diff)
downloadyosys-e2c2d784c8217e4bcf29fb6b156b6a8285036b80.tar.gz
yosys-e2c2d784c8217e4bcf29fb6b156b6a8285036b80.tar.bz2
yosys-e2c2d784c8217e4bcf29fb6b156b6a8285036b80.zip
Make one check $shift(x)? only; change testcase to be 8b
Diffstat (limited to 'passes/pmgen')
-rw-r--r--passes/pmgen/peepopt_shiftmul.pmg5
1 files changed, 3 insertions, 2 deletions
diff --git a/passes/pmgen/peepopt_shiftmul.pmg b/passes/pmgen/peepopt_shiftmul.pmg
index d4748ae19..e1da52182 100644
--- a/passes/pmgen/peepopt_shiftmul.pmg
+++ b/passes/pmgen/peepopt_shiftmul.pmg
@@ -50,8 +50,9 @@ code
if (GetSize(const_factor_cnst) > 20)
reject;
- if (GetSize(port(shift, \Y)) > const_factor)
- reject;
+ if (shift->type.in($shift, $shiftx))
+ if (GetSize(port(shift, \Y)) > const_factor)
+ reject;
int factor_bits = ceil_log2(const_factor);
SigSpec mul_din = port(mul, const_factor_port == \A ? \B : \A);