rust/tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff

190 lines
4.9 KiB
Diff
Raw Normal View History

2023-03-20 13:05:07 -05:00
- // MIR for `dereferences` before GVN
+ // MIR for `dereferences` after GVN
fn dereferences(_1: &mut u32, _2: &impl Copy, _3: &S<u32>) -> () {
debug t => _1;
debug u => _2;
debug s => _3;
let mut _0: ();
let _4: ();
let mut _5: u32;
let _6: ();
let mut _7: u32;
let _8: *const u32;
let _9: ();
let mut _10: u32;
let _11: ();
let mut _12: u32;
let _14: ();
let mut _15: u32;
let _16: ();
let mut _17: u32;
let _19: ();
let mut _20: u32;
let _21: ();
let mut _22: u32;
let _23: ();
let mut _24: &u32;
let _25: ();
let mut _26: impl Copy;
let _27: ();
let mut _28: impl Copy;
let _29: ();
let mut _30: u32;
let _31: ();
let mut _32: u32;
scope 1 {
debug z => _8;
let _13: *mut u32;
scope 2 {
debug z => _13;
let _18: &u32;
scope 3 {
2023-03-20 13:05:07 -05:00
debug z => _18;
}
}
}
bb0: {
StorageLive(_4);
StorageLive(_5);
2024-08-18 16:26:34 -05:00
_5 = copy (*_1);
2023-03-20 13:05:07 -05:00
_4 = opaque::<u32>(move _5) -> [return: bb1, unwind unreachable];
}
bb1: {
StorageDead(_5);
StorageDead(_4);
StorageLive(_6);
StorageLive(_7);
2024-08-18 16:26:34 -05:00
_7 = copy (*_1);
2023-03-20 13:05:07 -05:00
_6 = opaque::<u32>(move _7) -> [return: bb2, unwind unreachable];
}
bb2: {
StorageDead(_7);
StorageDead(_6);
2023-12-24 07:00:48 -06:00
StorageLive(_8);
2023-03-20 13:05:07 -05:00
_8 = &raw const (*_1);
StorageLive(_9);
StorageLive(_10);
2024-08-18 16:26:34 -05:00
_10 = copy (*_8);
2023-03-20 13:05:07 -05:00
_9 = opaque::<u32>(move _10) -> [return: bb3, unwind unreachable];
}
bb3: {
StorageDead(_10);
StorageDead(_9);
StorageLive(_11);
StorageLive(_12);
2024-08-18 16:26:34 -05:00
_12 = copy (*_8);
2023-03-20 13:05:07 -05:00
_11 = opaque::<u32>(move _12) -> [return: bb4, unwind unreachable];
}
bb4: {
StorageDead(_12);
StorageDead(_11);
2023-12-24 07:00:48 -06:00
StorageLive(_13);
2023-03-20 13:05:07 -05:00
_13 = &raw mut (*_1);
StorageLive(_14);
StorageLive(_15);
2024-08-18 16:26:34 -05:00
_15 = copy (*_13);
2023-03-20 13:05:07 -05:00
_14 = opaque::<u32>(move _15) -> [return: bb5, unwind unreachable];
}
bb5: {
StorageDead(_15);
StorageDead(_14);
StorageLive(_16);
StorageLive(_17);
2024-08-18 16:26:34 -05:00
_17 = copy (*_13);
2023-03-20 13:05:07 -05:00
_16 = opaque::<u32>(move _17) -> [return: bb6, unwind unreachable];
}
bb6: {
StorageDead(_17);
StorageDead(_16);
2023-12-24 07:00:48 -06:00
StorageLive(_18);
2023-03-20 13:05:07 -05:00
_18 = &(*_1);
StorageLive(_19);
- StorageLive(_20);
+ nop;
2024-08-18 16:26:34 -05:00
_20 = copy (*_18);
2023-03-20 13:05:07 -05:00
- _19 = opaque::<u32>(move _20) -> [return: bb7, unwind unreachable];
2024-08-18 16:26:34 -05:00
+ _19 = opaque::<u32>(copy _20) -> [return: bb7, unwind unreachable];
2023-03-20 13:05:07 -05:00
}
bb7: {
- StorageDead(_20);
+ nop;
2023-03-20 13:05:07 -05:00
StorageDead(_19);
StorageLive(_21);
StorageLive(_22);
2024-08-18 16:26:34 -05:00
- _22 = copy (*_18);
2023-03-20 13:05:07 -05:00
- _21 = opaque::<u32>(move _22) -> [return: bb8, unwind unreachable];
2024-08-18 16:26:34 -05:00
+ _22 = copy _20;
+ _21 = opaque::<u32>(copy _20) -> [return: bb8, unwind unreachable];
2023-03-20 13:05:07 -05:00
}
bb8: {
StorageDead(_22);
2023-03-20 13:05:07 -05:00
StorageDead(_21);
StorageLive(_23);
StorageLive(_24);
_24 = &(*_18);
_23 = opaque::<&u32>(move _24) -> [return: bb9, unwind unreachable];
}
bb9: {
StorageDead(_24);
StorageDead(_23);
StorageLive(_25);
StorageLive(_26);
2024-08-18 16:26:34 -05:00
_26 = copy (*_2);
2023-03-20 13:05:07 -05:00
_25 = opaque::<impl Copy>(move _26) -> [return: bb10, unwind unreachable];
}
bb10: {
StorageDead(_26);
StorageDead(_25);
StorageLive(_27);
StorageLive(_28);
2024-08-18 16:26:34 -05:00
_28 = copy (*_2);
2023-03-20 13:05:07 -05:00
_27 = opaque::<impl Copy>(move _28) -> [return: bb11, unwind unreachable];
}
bb11: {
StorageDead(_28);
StorageDead(_27);
StorageLive(_29);
- StorageLive(_30);
+ nop;
2024-08-18 16:26:34 -05:00
_30 = copy ((*_3).0: u32);
2023-03-20 13:05:07 -05:00
- _29 = opaque::<u32>(move _30) -> [return: bb12, unwind unreachable];
2024-08-18 16:26:34 -05:00
+ _29 = opaque::<u32>(copy _30) -> [return: bb12, unwind unreachable];
2023-03-20 13:05:07 -05:00
}
bb12: {
- StorageDead(_30);
+ nop;
2023-03-20 13:05:07 -05:00
StorageDead(_29);
StorageLive(_31);
StorageLive(_32);
2024-08-18 16:26:34 -05:00
- _32 = copy ((*_3).0: u32);
2023-03-20 13:05:07 -05:00
- _31 = opaque::<u32>(move _32) -> [return: bb13, unwind unreachable];
2024-08-18 16:26:34 -05:00
+ _32 = copy _30;
+ _31 = opaque::<u32>(copy _30) -> [return: bb13, unwind unreachable];
2023-03-20 13:05:07 -05:00
}
bb13: {
StorageDead(_32);
2023-03-20 13:05:07 -05:00
StorageDead(_31);
_0 = const ();
2023-12-24 07:00:48 -06:00
StorageDead(_18);
StorageDead(_13);
StorageDead(_8);
2023-03-20 13:05:07 -05:00
return;
}
}