2023-09-20 16:43:33 -05:00
|
|
|
- // MIR for `main` before GVN
|
|
|
|
+ // MIR for `main` after GVN
|
2020-04-04 12:15:01 -05:00
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: usize;
|
|
|
|
let mut _2: *const i32;
|
|
|
|
let _3: &i32;
|
|
|
|
let _4: ();
|
|
|
|
let mut _5: usize;
|
2020-04-04 12:15:01 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _1;
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-09-20 16:43:33 -05:00
|
|
|
- StorageLive(_1);
|
|
|
|
+ nop;
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_2);
|
2023-12-24 07:00:48 -06:00
|
|
|
StorageLive(_3);
|
2024-03-10 08:05:11 -05:00
|
|
|
_3 = const main::FOO;
|
2023-06-06 08:47:00 -05:00
|
|
|
_2 = &raw const (*_3);
|
2024-04-03 08:17:00 -05:00
|
|
|
_1 = move _2 as usize (PointerExposeProvenance);
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_2);
|
2023-12-24 07:00:48 -06:00
|
|
|
StorageDead(_3);
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = copy _1;
|
2023-09-20 16:43:33 -05:00
|
|
|
- _4 = read(move _5) -> [return: bb1, unwind unreachable];
|
|
|
|
+ _4 = read(copy _1) -> [return: bb1, unwind unreachable];
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_4);
|
|
|
|
_0 = const ();
|
2023-09-20 16:43:33 -05:00
|
|
|
- StorageDead(_1);
|
|
|
|
+ nop;
|
2023-06-06 08:47:00 -05:00
|
|
|
return;
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|