Skip to content

Commit

Permalink
chore: remove redundant check in Constrain simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 28, 2023
1 parent 148efa8 commit 1978036
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions crates/noirc_evaluator/src/ssa/ir/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,7 @@ impl Instruction {
}
}
Instruction::Constrain(lhs, rhs) => {
if let (Some(lhs), Some(rhs)) =
(dfg.get_numeric_constant(*lhs), dfg.get_numeric_constant(*rhs))
{
if lhs == rhs {
SimplifyResult::Remove
} else {
SimplifyResult::None
}
} else if dfg.resolve(*lhs) == dfg.resolve(*rhs) {
if dfg.resolve(*lhs) == dfg.resolve(*rhs) {
// Remove trivial case `assert_eq(x, x)`
SimplifyResult::Remove
} else {
Expand Down

0 comments on commit 1978036

Please sign in to comment.