From 960b3f25f441bf5ac5a63e3210f10b3f9a761e51 Mon Sep 17 00:00:00 2001 From: guipublic Date: Thu, 2 Oct 2025 13:49:53 +0200 Subject: [PATCH 1/3] ConstrainNotEqual requires acir predicate --- compiler/noirc_evaluator/src/ssa/ir/instruction.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs index 4f1c410dd84..3daedbc90ee 100644 --- a/compiler/noirc_evaluator/src/ssa/ir/instruction.rs +++ b/compiler/noirc_evaluator/src/ssa/ir/instruction.rs @@ -462,7 +462,9 @@ impl Instruction { !dfg.is_safe_index(*index, *array) } - Instruction::EnableSideEffectsIf { .. } | Instruction::ArraySet { .. } => true, + Instruction::EnableSideEffectsIf { .. } + | Instruction::ArraySet { .. } + | Instruction::ConstrainNotEqual(..) => true, Instruction::Call { func, .. } => match dfg[*func] { Value::Function(id) => !matches!(dfg.purity_of(id), Some(Purity::Pure)), @@ -484,7 +486,6 @@ impl Instruction { Instruction::Cast(_, _) | Instruction::Not(_) | Instruction::Truncate { .. } - | Instruction::ConstrainNotEqual(..) | Instruction::Constrain(_, _, _) | Instruction::RangeCheck { .. } | Instruction::Allocate From 4eb2bb7c8dcfd1044f69448bb875b9245f391bba Mon Sep 17 00:00:00 2001 From: guipublic Date: Thu, 2 Oct 2025 14:25:02 +0200 Subject: [PATCH 2/3] fix unit test --- .../noirc_evaluator/src/ssa/interpreter/tests/instructions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs b/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs index 3acf959d39a..c9367454595 100644 --- a/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs +++ b/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs @@ -637,7 +637,7 @@ fn constrain_not_equal() { #[test] fn constrain_not_equal_not_disabled_by_enable_side_effects() { - expect_error( + executes_with_no_errors( " acir(inline) fn main f0 { b0(): From 236a68df1b236e82edc15373c47a2cd2963c0fa8 Mon Sep 17 00:00:00 2001 From: guipublic Date: Tue, 7 Oct 2025 12:08:33 +0200 Subject: [PATCH 3/3] rename test case --- .../noirc_evaluator/src/ssa/interpreter/tests/instructions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs b/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs index c9367454595..c53a8c06374 100644 --- a/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs +++ b/compiler/noirc_evaluator/src/ssa/interpreter/tests/instructions.rs @@ -636,7 +636,7 @@ fn constrain_not_equal() { } #[test] -fn constrain_not_equal_not_disabled_by_enable_side_effects() { +fn constrain_not_equal_is_disabled_by_enable_side_effects() { executes_with_no_errors( " acir(inline) fn main f0 {