rust/tests/mir-opt/copy-prop/mutate_through_pointer.f.CopyProp.diff

20 lines
392 B
Diff
Raw Normal View History

2023-01-18 16:59:52 -06:00
- // MIR for `f` before CopyProp
+ // MIR for `f` after CopyProp
fn f(_1: bool) -> bool {
2023-06-06 08:47:00 -05:00
let mut _0: bool;
let mut _2: bool;
let mut _3: *const bool;
let mut _4: *mut bool;
2023-01-18 16:59:52 -06:00
bb0: {
2024-08-18 16:26:34 -05:00
_2 = copy _1;
2023-06-06 08:47:00 -05:00
_3 = &raw const _2;
_4 = &raw mut (*_3);
(*_4) = const false;
2024-08-18 16:26:34 -05:00
_0 = copy _1;
2023-06-06 08:47:00 -05:00
return;
2023-01-18 16:59:52 -06:00
}
}