rust/tests/mir-opt/const_prop/indirect_mutation.foo.GVN.diff

37 lines
804 B
Diff
Raw Normal View History

2023-09-20 16:43:33 -05:00
- // MIR for `foo` before GVN
+ // MIR for `foo` after GVN
fn foo() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let mut _1: (i32,);
let mut _2: &mut i32;
let mut _4: i32;
scope 1 {
2023-06-06 08:47:00 -05:00
debug u => _1;
let _3: bool;
scope 2 {
2023-06-06 08:47:00 -05:00
debug y => _3;
}
}
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
2023-09-20 16:43:33 -05:00
- _1 = (const 1_i32,);
+ _1 = const (1_i32,);
2023-12-24 07:00:48 -06:00
StorageLive(_2);
2023-06-06 08:47:00 -05:00
_2 = &mut (_1.0: i32);
(*_2) = const 5_i32;
2023-12-24 07:00:48 -06:00
StorageDead(_2);
2023-06-06 08:47:00 -05:00
StorageLive(_3);
StorageLive(_4);
2024-08-18 16:26:34 -05:00
_4 = copy (_1.0: i32);
2023-06-06 08:47:00 -05:00
_3 = Eq(move _4, const 5_i32);
StorageDead(_4);
_0 = const ();
StorageDead(_3);
StorageDead(_1);
return;
}
}