Skip to content

Commit

Permalink
chore: fixed for real this time
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Feb 8, 2024
1 parent b1a5f72 commit 8214f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/ir/instruction/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl Binary {
BinaryOp::Shr => {
// Bit shifts by constants can be treated as divisions.
if let Some(rhs_const) = rhs {
if rhs_const >= operand_type.bit_size() {
if rhs_const >= FieldElement::from(operand_type.bit_size() as u128) {
// Shifting by the full width of the operand type, any `lhs` goes to zero.
let zero = dfg.make_constant(FieldElement::zero(), operand_type);
return SimplifyResult::SimplifiedTo(zero);
Expand Down

0 comments on commit 8214f14

Please sign in to comment.