rust/tests/mir-opt/issue_73223.main.SimplifyArmIdentity.diff

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

157 lines
12 KiB
Diff
Raw Normal View History

- // MIR for `main` before SimplifyArmIdentity
+ // MIR for `main` after SimplifyArmIdentity
fn main() -> () {
2022-11-02 16:54:49 -05:00
let mut _0: (); // return place in scope 0 at $DIR/issue_73223.rs:+0:11: +0:11
let _1: i32; // in scope 0 at $DIR/issue_73223.rs:+1:9: +1:14
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
let mut _3: isize; // in scope 0 at $DIR/issue_73223.rs:+2:9: +2:16
let _4: i32; // in scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
2022-12-04 13:20:55 -06:00
let mut _6: i32; // in scope 0 at $DIR/issue_73223.rs:+6:22: +6:27
let mut _7: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _8: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _11: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _12: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _13: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _14: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _16: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _17: core::panicking::AssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _19: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _20: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _21: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _22: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _24: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _25: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 1 {
2022-11-02 16:54:49 -05:00
debug split => _1; // in scope 1 at $DIR/issue_73223.rs:+1:9: +1:14
2022-12-04 13:20:55 -06:00
let _5: std::option::Option<i32>; // in scope 1 at $DIR/issue_73223.rs:+6:9: +6:14
scope 3 {
2022-12-04 13:20:55 -06:00
debug _prev => _5; // in scope 3 at $DIR/issue_73223.rs:+6:9: +6:14
let _9: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _10: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let mut _23: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 4 {
2022-12-04 13:20:55 -06:00
debug left_val => _9; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
debug right_val => _10; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
let _15: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
scope 5 {
2022-12-04 13:20:55 -06:00
debug kind => _15; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
}
}
}
scope 2 {
2022-11-02 16:54:49 -05:00
debug v => _4; // in scope 2 at $DIR/issue_73223.rs:+2:14: +2:15
}
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_1); // scope 0 at $DIR/issue_73223.rs:+1:9: +1:14
StorageLive(_2); // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
Deinit(_2); // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
discriminant(_2) = 1; // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
_3 = const 1_isize; // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
goto -> bb3; // scope 0 at $DIR/issue_73223.rs:+1:17: +1:30
}
bb1: {
2022-11-02 16:54:49 -05:00
StorageDead(_2); // scope 0 at $DIR/issue_73223.rs:+4:6: +4:7
StorageDead(_1); // scope 0 at $DIR/issue_73223.rs:+8:1: +8:2
return; // scope 0 at $DIR/issue_73223.rs:+8:2: +8:2
}
bb2: {
2022-11-02 16:54:49 -05:00
unreachable; // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
2022-07-26 08:17:02 -05:00
}
bb3: {
2022-11-02 16:54:49 -05:00
StorageLive(_4); // scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
_4 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
_1 = _4; // scope 2 at $DIR/issue_73223.rs:+2:20: +2:21
StorageDead(_4); // scope 0 at $DIR/issue_73223.rs:+2:20: +2:21
StorageDead(_2); // scope 0 at $DIR/issue_73223.rs:+4:6: +4:7
2022-12-04 13:20:55 -06:00
StorageLive(_5); // scope 1 at $DIR/issue_73223.rs:+6:9: +6:14
StorageLive(_6); // scope 1 at $DIR/issue_73223.rs:+6:22: +6:27
_6 = _1; // scope 1 at $DIR/issue_73223.rs:+6:22: +6:27
Deinit(_5); // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
((_5 as Some).0: i32) = move _6; // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
discriminant(_5) = 1; // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
StorageDead(_6); // scope 1 at $DIR/issue_73223.rs:+6:27: +6:28
StorageLive(_24); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_25); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_7 = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
2020-06-11 21:31:49 -05:00
StorageLive(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
2022-12-04 13:20:55 -06:00
_23 = const _; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant
2020-06-11 21:31:49 -05:00
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
2022-02-21 01:10:07 -06:00
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
2022-12-04 13:20:55 -06:00
_8 = _23; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_24); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_25); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_24 = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_25 = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_9 = _24; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_10 = _25; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_13 = (*_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_14 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_12 = Eq(move _13, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = Not(move _12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_12); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
switchInt(move _11) -> [0: bb5, otherwise: bb4]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
2022-07-26 08:17:02 -05:00
bb4: {
2022-12-04 13:20:55 -06:00
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_15) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_17); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_17 = const core::panicking::AssertKind::Eq; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant
2020-06-11 21:31:49 -05:00
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) }
2022-12-04 13:20:55 -06:00
StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_19 = _9; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_18 = _19; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_20); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_21 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_20 = _21; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_22) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_16 = core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _18, move _20, move _22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant
2020-06-11 21:31:49 -05:00
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
2022-09-21 10:57:30 -05:00
// + literal: Const { ty: for<'a, 'b, 'c> fn(core::panicking::AssertKind, &'a i32, &'b i32, Option<Arguments<'c>>) -> ! {core::panicking::assert_failed::<i32, i32>}, val: Value(<ZST>) }
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) }
}
2022-07-26 08:17:02 -05:00
bb5: {
2022-12-04 13:20:55 -06:00
StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_24); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_25); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_5); // scope 1 at $DIR/issue_73223.rs:+8:1: +8:2
2022-11-02 16:54:49 -05:00
StorageDead(_1); // scope 0 at $DIR/issue_73223.rs:+8:1: +8:2
return; // scope 0 at $DIR/issue_73223.rs:+8:2: +8:2
2021-01-01 12:38:11 -06:00
}
}