Skip to content

Commit

Permalink
fix: fix panic on instructions being immediately optimized away
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 10, 2023
1 parent 7b2b9cb commit dc4b4b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/noirc_evaluator/src/ssa/ir/dfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ impl<'dfg> InsertInstructionResult<'dfg> {
InsertInstructionResult::Results(results) => Cow::Borrowed(results),
InsertInstructionResult::SimplifiedTo(result) => Cow::Owned(vec![result]),
InsertInstructionResult::SimplifiedToMultiple(results) => Cow::Owned(results),
InsertInstructionResult::InstructionRemoved => {
panic!("InsertInstructionResult::results called on a removed instruction")
}
InsertInstructionResult::InstructionRemoved => Cow::Owned(vec![]),
}
}

Expand Down

0 comments on commit dc4b4b0

Please sign in to comment.