rust/tests/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.panic-unwind.diff

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

87 lines
2.0 KiB
Diff
Raw Normal View History

2022-12-04 13:20:55 -06:00
- // MIR for `main` before SimplifyLocals-before-const-prop
+ // MIR for `main` after SimplifyLocals-before-const-prop
2020-04-02 16:09:01 -05:00
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
- let mut _1: ((), ());
- let mut _2: ();
+ let _1: ();
+ let mut _2: ((), ());
let mut _3: ();
- let _4: ();
- let mut _5: ((), ());
- let mut _6: ();
- let mut _7: ();
- let _8: ();
- let mut _9: u8;
- let mut _10: u8;
- let mut _11: Temp;
+ let mut _4: ();
+ let _5: ();
+ let mut _6: u8;
+ let mut _7: u8;
+ let mut _8: Temp;
2020-04-02 16:09:01 -05:00
scope 1 {
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
StorageLive(_2);
- _2 = ();
StorageLive(_3);
_3 = ();
- _1 = (move _2, move _3);
+ StorageLive(_4);
+ _4 = ();
+ _2 = (move _3, move _4);
+ StorageDead(_4);
StorageDead(_3);
+ _1 = use_zst(move _2) -> bb1;
+ }
+
+ bb1: {
StorageDead(_2);
StorageDead(_1);
- StorageLive(_4);
StorageLive(_5);
StorageLive(_6);
- _6 = ();
StorageLive(_7);
- _7 = ();
- _5 = (move _6, move _7);
+ StorageLive(_8);
+ _8 = Temp { x: const 40_u8 };
+ _7 = (_8.0: u8);
+ _6 = Add(move _7, const 2_u8);
StorageDead(_7);
- StorageDead(_6);
- _4 = use_zst(move _5) -> bb1;
+ _5 = use_u8(move _6) -> bb2;
2020-04-02 16:09:01 -05:00
}
2023-06-06 08:47:00 -05:00
- bb1: {
- StorageDead(_5);
- StorageDead(_4);
- StorageLive(_8);
- StorageLive(_9);
- StorageLive(_10);
- StorageLive(_11);
- _11 = Temp { x: const 40_u8 };
- _10 = (_11.0: u8);
- _9 = Add(move _10, const 2_u8);
- StorageDead(_10);
- _8 = use_u8(move _9) -> bb2;
- }
-
2020-04-02 16:09:01 -05:00
bb2: {
2023-06-06 08:47:00 -05:00
- StorageDead(_9);
- StorageDead(_11);
+ StorageDead(_6);
StorageDead(_8);
+ StorageDead(_5);
_0 = const ();
return;
2020-04-02 16:09:01 -05:00
}
}