Skip to content

Commit

Permalink
Update compiler/noirc_evaluator/src/ssa/ir/instruction/binary.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Apr 2, 2024
1 parent 0028e35 commit 0927c65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/noirc_evaluator/src/ssa/ir/instruction/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ impl Binary {
if dfg.resolve(self.lhs) == dfg.resolve(self.rhs)
&& dfg.get_value_max_num_bits(self.lhs) == 1
{
// Squaring a boolean value is a noop.
return SimplifyResult::SimplifiedTo(self.lhs);
}
}
Expand Down

0 comments on commit 0927c65

Please sign in to comment.