rust/tests/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir

48 lines
1.0 KiB
Rust
Raw Normal View History

2020-04-02 16:09:01 -05:00
// MIR for `borrow_and_cast` after SimplifyCfg-initial
fn borrow_and_cast(_1: i32) -> () {
2023-06-06 08:47:00 -05:00
debug x => _1;
let mut _0: ();
let _2: *const i32;
let _3: &i32;
let _5: &mut i32;
let mut _7: &mut i32;
2020-04-02 16:09:01 -05:00
scope 1 {
2023-06-06 08:47:00 -05:00
debug p => _2;
let _4: *const i32;
2020-04-02 16:09:01 -05:00
scope 2 {
2023-06-06 08:47:00 -05:00
debug q => _4;
let _6: *mut i32;
2020-04-02 16:09:01 -05:00
scope 3 {
2023-06-06 08:47:00 -05:00
debug r => _6;
2020-04-02 16:09:01 -05:00
}
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_2);
StorageLive(_3);
_3 = &_1;
_2 = &raw const (*_3);
FakeRead(ForLet(None), _2);
StorageDead(_3);
StorageLive(_4);
StorageLive(_5);
_5 = &mut _1;
_4 = &raw const (*_5);
FakeRead(ForLet(None), _4);
StorageDead(_5);
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
_6 = &raw mut (*_7);
FakeRead(ForLet(None), _6);
StorageDead(_7);
_0 = const ();
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
return;
2020-04-02 16:09:01 -05:00
}
}