Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jan 11, 2025
1 parent 2421b59 commit 35266aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/noirc_evaluator/src/ssa/ir/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,9 @@ impl Instruction {
}
}
Instruction::Constrain(lhs, rhs, msg) => {
if dfg.get_numeric_constant(*rhs).map_or(false, |constant| constant.is_zero()) {
if dfg.runtime().is_acir()
&& dfg.get_numeric_constant(*rhs).map_or(false, |constant| constant.is_zero())
{
if let Value::Instruction { instruction, .. } = &dfg[dfg.resolve(*lhs)] {
if let Instruction::Binary(Binary {
lhs,
Expand Down

0 comments on commit 35266aa

Please sign in to comment.