Skip to content

Commit

Permalink
fixup! peepopt: Add left-shift 'shiftmul' variant
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Aug 9, 2023
1 parent 0983083 commit 75fb5ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion passes/pmgen/peepopt_shiftmul_left.pmg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ endmatch

match neg
if shift->type.in($shift, $shiftx)
select neg->type == $neg
index <SigSpec> port(neg, \Y) === port(shift, \B)
filter !port(shift, \A).empty()
endmatch
Expand All @@ -30,7 +31,7 @@ code shift_amount log2scale
} else {
// case of `$shl`
shift_amount = port(shift, \B);
if (!param(neg, \B_SIGNED).as_bool())
if (!param(shift, \B_SIGNED).as_bool())
shift_amount.append(State::S0);
}

Expand Down

0 comments on commit 75fb5ab

Please sign in to comment.