rust/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
2023-10-25 06:46:47 +00:00

189 lines
4.8 KiB
Diff

- // MIR for `references` before GVN
+ // MIR for `references` after GVN
fn references(_1: impl Sized) -> () {
debug x => _1;
let mut _0: ();
let _2: ();
let mut _3: &impl Sized;
let _4: ();
let mut _5: &impl Sized;
let _6: ();
let mut _7: &mut impl Sized;
let _8: ();
let mut _9: &mut impl Sized;
let _10: ();
let mut _11: *const impl Sized;
let _12: ();
let mut _13: *const impl Sized;
let _14: ();
let mut _15: *mut impl Sized;
let _16: ();
let mut _17: *mut impl Sized;
let _18: &mut impl Sized;
let mut _20: S<&mut impl Sized>;
let mut _21: &mut impl Sized;
let _22: ();
let mut _23: &impl Sized;
let _24: ();
let mut _25: &mut impl Sized;
let _26: ();
let mut _27: *const impl Sized;
let _28: ();
let mut _29: *mut impl Sized;
scope 1 {
debug r => _18;
let _19: &mut impl Sized;
scope 2 {
debug s => _19;
}
}
bb0: {
StorageLive(_2);
StorageLive(_3);
_3 = &_1;
_2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind: bb14];
}
bb1: {
StorageDead(_3);
StorageDead(_2);
StorageLive(_4);
StorageLive(_5);
_5 = &_1;
_4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb14];
}
bb2: {
StorageDead(_5);
StorageDead(_4);
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
_6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb14];
}
bb3: {
StorageDead(_7);
StorageDead(_6);
StorageLive(_8);
StorageLive(_9);
_9 = &mut _1;
_8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb14];
}
bb4: {
StorageDead(_9);
StorageDead(_8);
StorageLive(_10);
StorageLive(_11);
_11 = &raw const _1;
_10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb14];
}
bb5: {
StorageDead(_11);
StorageDead(_10);
StorageLive(_12);
StorageLive(_13);
_13 = &raw const _1;
_12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb14];
}
bb6: {
StorageDead(_13);
StorageDead(_12);
StorageLive(_14);
StorageLive(_15);
_15 = &raw mut _1;
_14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb14];
}
bb7: {
StorageDead(_15);
StorageDead(_14);
StorageLive(_16);
StorageLive(_17);
_17 = &raw mut _1;
_16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb14];
}
bb8: {
StorageDead(_17);
StorageDead(_16);
- StorageLive(_18);
+ nop;
_18 = &mut _1;
StorageLive(_19);
StorageLive(_20);
StorageLive(_21);
- _21 = move _18;
- _20 = S::<&mut impl Sized>(move _21);
+ _21 = _18;
+ _20 = S::<&mut impl Sized>(_18);
StorageDead(_21);
- _19 = move (_20.0: &mut impl Sized);
+ _19 = _18;
StorageDead(_20);
StorageLive(_22);
StorageLive(_23);
- _23 = &(*_19);
+ _23 = &(*_18);
_22 = opaque::<&impl Sized>(move _23) -> [return: bb9, unwind: bb14];
}
bb9: {
StorageDead(_23);
StorageDead(_22);
StorageLive(_24);
StorageLive(_25);
- _25 = &mut (*_19);
+ _25 = &mut (*_18);
_24 = opaque::<&mut impl Sized>(move _25) -> [return: bb10, unwind: bb14];
}
bb10: {
StorageDead(_25);
StorageDead(_24);
StorageLive(_26);
StorageLive(_27);
- _27 = &raw const (*_19);
+ _27 = &raw const (*_18);
_26 = opaque::<*const impl Sized>(move _27) -> [return: bb11, unwind: bb14];
}
bb11: {
StorageDead(_27);
StorageDead(_26);
StorageLive(_28);
StorageLive(_29);
- _29 = &raw mut (*_19);
+ _29 = &raw mut (*_18);
_28 = opaque::<*mut impl Sized>(move _29) -> [return: bb12, unwind: bb14];
}
bb12: {
StorageDead(_29);
StorageDead(_28);
_0 = const ();
StorageDead(_19);
- StorageDead(_18);
+ nop;
drop(_1) -> [return: bb13, unwind: bb15];
}
bb13: {
return;
}
bb14 (cleanup): {
drop(_1) -> [return: bb15, unwind terminate(cleanup)];
}
bb15 (cleanup): {
resume;
}
}