rust/tests/mir-opt/dest-prop/branch.foo.DestinationPropagation.panic-unwind.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.3 KiB
Diff
Raw Normal View History

- // MIR for `foo` before DestinationPropagation
+ // MIR for `foo` after DestinationPropagation
2020-05-24 14:37:09 -05:00
fn foo() -> i32 {
2023-06-06 08:47:00 -05:00
let mut _0: i32;
let _1: i32;
let mut _3: bool;
let _4: i32;
2020-05-24 14:37:09 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
- debug x => _1;
+ debug x => _0;
let _2: i32;
2020-05-24 14:37:09 -05:00
scope 2 {
2023-06-06 08:47:00 -05:00
- debug y => _2;
+ debug y => _0;
2020-05-24 14:37:09 -05:00
}
}
bb0: {
2023-06-06 08:47:00 -05:00
- StorageLive(_1);
2023-06-23 11:53:09 -05:00
- _1 = val() -> [return: bb1, unwind continue];
2023-06-06 08:47:00 -05:00
+ nop;
2023-06-23 11:53:09 -05:00
+ _0 = val() -> [return: bb1, unwind continue];
2020-05-24 14:37:09 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
- StorageLive(_2);
+ nop;
StorageLive(_3);
2023-06-23 11:53:09 -05:00
_3 = cond() -> [return: bb2, unwind continue];
2020-05-24 14:37:09 -05:00
}
bb2: {
2023-06-06 08:47:00 -05:00
switchInt(move _3) -> [0: bb4, otherwise: bb3];
2020-05-24 14:37:09 -05:00
}
bb3: {
2023-06-06 08:47:00 -05:00
- _2 = _1;
+ nop;
goto -> bb6;
2021-01-01 12:38:11 -06:00
}
bb4: {
2023-06-06 08:47:00 -05:00
StorageLive(_4);
2023-06-23 11:53:09 -05:00
_4 = val() -> [return: bb5, unwind continue];
2020-05-24 14:37:09 -05:00
}
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_4);
- _2 = _1;
+ nop;
goto -> bb6;
2020-05-24 14:37:09 -05:00
}
bb6: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
- _0 = _2;
- StorageDead(_2);
- StorageDead(_1);
+ nop;
+ nop;
+ nop;
return;
2020-05-24 14:37:09 -05:00
}
}