rust/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
780 B
Diff
Raw Normal View History

- // MIR for `foo` before ConstProp
+ // MIR for `foo` after ConstProp
fn foo() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let mut _1: (i32,);
let mut _2: &mut i32;
let mut _4: i32;
scope 1 {
2023-06-06 13:47:00 +00:00
debug u => _1;
let _3: bool;
scope 2 {
2023-06-06 13:47:00 +00:00
debug y => _3;
}
}
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
_1 = (const 1_i32,);
StorageLive(_2);
_2 = &mut (_1.0: i32);
(*_2) = const 5_i32;
StorageDead(_2);
StorageLive(_3);
StorageLive(_4);
_4 = (_1.0: i32);
_3 = Eq(move _4, const 5_i32);
StorageDead(_4);
_0 = const ();
StorageDead(_3);
StorageDead(_1);
return;
}
}