Skip to content

Commit

Permalink
fix(ssa refactor): Do not remove enable_side_effects instructions in …
Browse files Browse the repository at this point in the history
…die pass (#1673)

Do not remove enable_side_effects instructions in die pass
  • Loading branch information
jfecher authored Jun 14, 2023
1 parent 377ac5c commit cbee4c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/noirc_evaluator/src/ssa_refactor/opt/die.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cbee4c0

Please sign in to comment.