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

38 lines
2.4 KiB
Diff
Raw Normal View History

- // MIR for `bar` before ConstProp
+ // MIR for `bar` after ConstProp
fn bar() -> () {
2022-07-27 13:47:42 -05:00
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +0:10
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
2022-12-04 13:20:55 -06:00
let mut _2: *mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
let mut _4: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+5:13: +5:20
scope 1 {
2022-07-27 13:47:42 -05:00
debug v => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
2022-12-04 13:20:55 -06:00
let _3: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
scope 2 {
}
scope 3 {
2022-12-04 13:20:55 -06:00
debug y => _3; // in scope 3 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
}
}
bb0: {
2022-07-27 13:47:42 -05:00
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
2022-12-04 13:20:55 -06:00
StorageLive(_2); // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
_2 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
(*_2) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:+3:9: +3:26
StorageDead(_2); // scope 2 at $DIR/const_prop_miscompile.rs:+3:26: +3:27
StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+5:13: +5:20
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+5:15: +5:18
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:+5:13: +5:25
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+5:24: +5:25
StorageDead(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+6:1: +6:2
2022-07-27 13:47:42 -05:00
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+6:1: +6:2
return; // scope 0 at $DIR/const_prop_miscompile.rs:+6:2: +6:2
}
}