rust/tests/mir-opt/sroa/structs.escaping.ScalarRepl...

39 lines
932 B
Diff

- // MIR for `escaping` before ScalarReplacementOfAggregates
+ // MIR for `escaping` after ScalarReplacementOfAggregates
fn escaping() -> () {
let mut _0: ();
let _1: ();
let mut _2: *const u32;
let _3: &u32;
let _4: Escaping;
let mut _5: u32;
bb0: {
StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
StorageLive(_5);
_5 = g() -> [return: bb1, unwind unreachable];
}
bb1: {
_4 = Escaping { a: const 1_u32, b: const 2_u32, c: move _5 };
StorageDead(_5);
_3 = &(_4.0: u32);
_2 = &raw const (*_3);
_1 = f(move _2) -> [return: bb2, unwind unreachable];
}
bb2: {
StorageDead(_2);
StorageDead(_4);
StorageDead(_3);
StorageDead(_1);
_0 = const ();
return;
}
}