Don't change the otherwise of the switch
This commit is contained in:
parent
928c57dc9a
commit
166bb1bd46
4 changed files with 20 additions and 10 deletions
|
@ -168,7 +168,8 @@ impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
|
|||
};
|
||||
(value, targets.target_for_value(value))
|
||||
});
|
||||
let eq_targets = SwitchTargets::new(eq_new_targets, opt_data.destination);
|
||||
// The otherwise either is the same target branch or an unreachable.
|
||||
let eq_targets = SwitchTargets::new(eq_new_targets, parent_targets.otherwise());
|
||||
|
||||
// Create `bbEq` in example above
|
||||
let eq_switch = BasicBlockData::new(Some(Terminator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue