Skip to content

Commit

Permalink
Also consider Mod as potentially failing
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 2, 2024
1 parent affd9cd commit 1ddba8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compiler/noirc_evaluator/src/ssa/ir/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ impl Instruction {

// Some binary math can overflow or underflow
Binary(binary) => match binary.operator {
BinaryOp::Add | BinaryOp::Sub | BinaryOp::Mul | BinaryOp::Div => true,
BinaryOp::Mod
| BinaryOp::Eq
BinaryOp::Add | BinaryOp::Sub | BinaryOp::Mul | BinaryOp::Div | BinaryOp::Mod => {
true
}
BinaryOp::Eq
| BinaryOp::Lt
| BinaryOp::And
| BinaryOp::Or
Expand Down

0 comments on commit 1ddba8a

Please sign in to comment.