rust/tests/mir-opt/const_prop/pointer_expose_provenance.main.GVN.panic-unwind.diff

42 lines
943 B
Diff
Raw Permalink Normal View History

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);
_3 = const main::FOO;
2023-06-06 08:47:00 -05:00
_2 = &raw const (*_3);
_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);
2024-08-18 16:26:34 -05:00
_5 = copy _1;
2023-09-20 16:43:33 -05:00
- _4 = read(move _5) -> [return: bb1, unwind continue];
2024-08-18 16:26:34 -05:00
+ _4 = read(copy _1) -> [return: bb1, unwind continue];
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
}
}