rust/tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-abort.diff

53 lines
1.1 KiB
Diff
Raw Normal View History

2023-12-30 19:53:51 -06:00
- // MIR for `aggregate` before JumpThreading
+ // MIR for `aggregate` after JumpThreading
fn aggregate(_1: u8) -> u8 {
debug x => _1;
let mut _0: u8;
let _2: u8;
let _3: u8;
let mut _4: (u8, u8);
let mut _5: bool;
let mut _6: u8;
scope 1 {
debug a => _2;
debug b => _3;
}
bb0: {
StorageLive(_4);
_4 = const aggregate::FOO;
2023-12-30 19:53:51 -06:00
StorageLive(_2);
_2 = (_4.0: u8);
StorageLive(_3);
_3 = (_4.1: u8);
StorageDead(_4);
StorageLive(_5);
StorageLive(_6);
_6 = _2;
_5 = Eq(move _6, const 7_u8);
- switchInt(move _5) -> [0: bb2, otherwise: bb1];
+ goto -> bb2;
}
bb1: {
StorageDead(_6);
_0 = _3;
goto -> bb3;
}
bb2: {
StorageDead(_6);
_0 = _2;
goto -> bb3;
}
bb3: {
StorageDead(_5);
StorageDead(_3);
StorageDead(_2);
return;
}
}