rust/tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.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);
2024-08-18 16:26:34 -05:00
_2 = copy (_4.0: u8);
2023-12-30 19:53:51 -06:00
StorageLive(_3);
2024-08-18 16:26:34 -05:00
_3 = copy (_4.1: u8);
2023-12-30 19:53:51 -06:00
StorageDead(_4);
StorageLive(_5);
StorageLive(_6);
2024-08-18 16:26:34 -05:00
_6 = copy _2;
2023-12-30 19:53:51 -06:00
_5 = Eq(move _6, const 7_u8);
- switchInt(move _5) -> [0: bb2, otherwise: bb1];
+ goto -> bb2;
}
bb1: {
StorageDead(_6);
2024-08-18 16:26:34 -05:00
_0 = copy _3;
2023-12-30 19:53:51 -06:00
goto -> bb3;
}
bb2: {
StorageDead(_6);
2024-08-18 16:26:34 -05:00
_0 = copy _2;
2023-12-30 19:53:51 -06:00
goto -> bb3;
}
bb3: {
StorageDead(_5);
StorageDead(_3);
StorageDead(_2);
return;
}
}