rust/tests/mir-opt/copy-prop/branch.foo.CopyProp.panic-unwind.diff

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

57 lines
1.0 KiB
Diff
Raw Normal View History

2023-01-15 09:30:09 -06:00
- // MIR for `foo` before CopyProp
+ // MIR for `foo` after CopyProp
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;
2023-01-15 09:30:09 -06:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug x => _1;
let _2: i32;
2023-01-15 09:30:09 -06:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug y => _2;
2023-01-15 09:30:09 -06: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-01-15 09:30:09 -06:00
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageLive(_2);
StorageLive(_3);
2023-06-23 11:53:09 -05:00
_3 = cond() -> [return: bb2, unwind continue];
2023-01-15 09:30:09 -06:00
}
bb2: {
2023-06-06 08:47:00 -05:00
switchInt(move _3) -> [0: bb4, otherwise: bb3];
2023-01-15 09:30:09 -06:00
}
bb3: {
2023-06-06 08:47:00 -05:00
_2 = copy _1;
goto -> bb6;
2023-01-15 09:30:09 -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];
2023-01-15 09:30:09 -06:00
}
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_4);
_2 = copy _1;
goto -> bb6;
2023-01-15 09:30:09 -06:00
}
bb6: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
_0 = copy _2;
StorageDead(_2);
StorageDead(_1);
return;
2023-01-15 09:30:09 -06:00
}
}