diff --git a/crates/noirc_evaluator/src/ssa_refactor/opt/die.rs b/crates/noirc_evaluator/src/ssa_refactor/opt/die.rs index 62add9a73de..ef73938cc37 100644 --- a/crates/noirc_evaluator/src/ssa_refactor/opt/die.rs +++ b/crates/noirc_evaluator/src/ssa_refactor/opt/die.rs @@ -93,7 +93,10 @@ impl Context { let instruction = &function.dfg[instruction_id]; // These instruction types cannot be removed - if matches!(instruction, Constrain(_) | Call { .. } | Store { .. }) { + if matches!( + instruction, + Constrain(_) | Call { .. } | Store { .. } | EnableSideEffects { .. } + ) { return false; }