From 35266aaccb783ab41497b403e9f480b2b24035c6 Mon Sep 17 00:00:00 2001 From: Tom French Date: Sat, 11 Jan 2025 20:30:12 +0000 Subject: [PATCH] . --- compiler/noirc_evaluator/src/ssa/ir/instruction.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs index 3af1746103..21a85930c3 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs @@ -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,