mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
61 lines
4.0 KiB
Diff
61 lines
4.0 KiB
Diff
- // MIR for `test` before SimplifyComparisonIntegral
|
|
+ // MIR for `test` after SimplifyComparisonIntegral
|
|
|
|
fn test(_1: T) -> () {
|
|
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
|
|
let mut _9: usize; // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
|
|
let mut _10: usize; // in scope 0 at $DIR/issue_76432.rs:+3:9: +3:33
|
|
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 {
|
|
debug v => _2; // in scope 1 at $DIR/issue_76432.rs:+1:9: +1:10
|
|
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 {
|
|
debug v1 => &(*_2)[0 of 3]; // in scope 2 at $DIR/issue_76432.rs:+3:10: +3:16
|
|
debug v2 => &(*_2)[1 of 3]; // in scope 2 at $DIR/issue_76432.rs:+3:18: +3:24
|
|
debug v3 => &(*_2)[2 of 3]; // in scope 2 at $DIR/issue_76432.rs:+3:26: +3:32
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_2); // scope 0 at $DIR/issue_76432.rs:+1:9: +1:10
|
|
StorageLive(_5); // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
|
|
_5 = [_1, _1, _1]; // scope 0 at $DIR/issue_76432.rs:+1:20: +1:29
|
|
_4 = &_5; // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
|
|
_2 = _4 as &[T] (Pointer(Unsize)); // scope 0 at $DIR/issue_76432.rs:+1:19: +1:29
|
|
_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
|
|
+ nop; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
|
|
+ switchInt(move _9) -> [3: bb2, otherwise: bb1]; // scope 1 at $DIR/issue_76432.rs:+3:9: +3:33
|
|
}
|
|
|
|
bb1: {
|
|
_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
|
|
// + literal: Const { ty: fn(&'static str) -> ! {core::panicking::panic}, val: Value(<ZST>) }
|
|
// mir::Constant
|
|
// + span: $SRC_DIR/core/src/panic.rs:LL:COL
|
|
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
|
}
|
|
|
|
bb2: {
|
|
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
|
|
}
|
|
}
|
|
|