rust/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.diff

85 lines
6.1 KiB
Diff
Raw Normal View History

- // MIR for `test` before SimplifyComparisonIntegral
+ // MIR for `test` after SimplifyComparisonIntegral
fn test(_1: T) -> () {
2022-07-27 13:47:42 -05:00
debug x => _1; // in scope 0 at $DIR/issue_76432.rs:+0:38: +0:39
let mut _0: (); // return place in scope 0 at $DIR/issue_76432.rs:+0:44: +0:44
let _2: &[T]; // in scope 0 at $DIR/issue_76432.rs:+1:9: +1:10
let mut _3: &[T; 3]; // in scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
let _4: &[T; 3]; // in scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
let _5: [T; 3]; // in scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
let mut _6: T; // in scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
let mut _7: T; // in scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
let mut _8: T; // in scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
2022-12-04 13:20:55 -06:00
let mut _9: usize; // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
2022-07-27 13:47:42 -05:00
let mut _10: usize; // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
2022-12-04 13:20:55 -06:00
let mut _11: bool; // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
let mut _15: !; // in scope 0 at $SRC_DIR/core/src/panic.rs:LL:COL
scope 1 {
2022-07-27 13:47:42 -05:00
debug v => _2; // in scope 1 at $DIR/issue_76432.rs:+1:9: +1:10
2022-12-04 13:20:55 -06:00
let _12: &T; // in scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
let _13: &T; // in scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
let _14: &T; // in scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
scope 2 {
2022-12-04 13:20:55 -06:00
debug v1 => _12; // in scope 2 at $DIR/issue_76432.rs:+3:10: +3:16
debug v2 => _13; // in scope 2 at $DIR/issue_76432.rs:+3:18: +3:24
debug v3 => _14; // in scope 2 at $DIR/issue_76432.rs:+3:26: +3:32
}
}
bb0: {
2022-07-27 13:47:42 -05:00
StorageLive(_2); // scope 0 at $DIR/issue_76432.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
StorageLive(_4); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
StorageLive(_5); // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
StorageLive(_6); // scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
_6 = _1; // scope 0 at $DIR/issue_76432.rs:+1:21: +1:22
StorageLive(_7); // scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
_7 = _1; // scope 0 at $DIR/issue_76432.rs:+1:24: +1:25
StorageLive(_8); // scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
_8 = _1; // scope 0 at $DIR/issue_76432.rs:+1:27: +1:28
_5 = [move _6, move _7, move _8]; // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
StorageDead(_8); // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
StorageDead(_7); // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
StorageDead(_6); // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
_4 = &_5; // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
_3 = _4; // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
_2 = move _3 as &[T] (Pointer(Unsize)); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
StorageDead(_3); // scope 0 at $DIR/issue_76432.rs:+1:28: +1:29
StorageDead(_4); // scope 0 at $DIR/issue_76432.rs:+1:29: +1:30
2022-12-04 13:20:55 -06:00
_9 = Len((*_2)); // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
_10 = const 3_usize; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
- _11 = Eq(move _9, const 3_usize); // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
- switchInt(move _11) -> [0: bb1, otherwise: bb2]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
2022-12-19 19:38:18 -06:00
+ nop; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
2022-12-04 13:20:55 -06:00
+ switchInt(move _9) -> [3: bb2, otherwise: bb1]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
}
bb1: {
2022-12-04 13:20:55 -06:00
StorageLive(_15); // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
_15 = core::panicking::panic(const "internal error: entered unreachable code"); // scope 1 at $SRC_DIR/core/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
2022-07-06 09:14:46 -05:00
// + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(<ZST>) }
// mir::Constant
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
2022-05-06 03:58:54 -05:00
// + literal: Const { ty: &str, val: Value(Slice(..)) }
}
bb2: {
2022-12-04 13:20:55 -06:00
StorageLive(_12); // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
_12 = &(*_2)[0 of 3]; // scope 1 at $DIR/issue_76432.rs:+3:10: +3:16
StorageLive(_13); // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
_13 = &(*_2)[1 of 3]; // scope 1 at $DIR/issue_76432.rs:+3:18: +3:24
StorageLive(_14); // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
_14 = &(*_2)[2 of 3]; // scope 1 at $DIR/issue_76432.rs:+3:26: +3:32
2022-07-27 13:47:42 -05:00
StorageDead(_14); // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
StorageDead(_13); // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
2022-12-04 13:20:55 -06:00
StorageDead(_12); // scope 1 at $DIR/issue_76432.rs:+3:84: +3:85
2022-07-27 13:47:42 -05:00
StorageDead(_5); // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
StorageDead(_2); // scope 0 at $DIR/issue_76432.rs:+6:1: +6:2
return; // scope 0 at $DIR/issue_76432.rs:+6:2: +6:2
}
}