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

51 lines
1.2 KiB
Diff
Raw Normal View History

- // MIR for `test` before SimplifyComparisonIntegral
+ // MIR for `test` after SimplifyComparisonIntegral
fn test(_1: T) -> () {
2023-06-06 08:47:00 -05:00
debug x => _1;
let mut _0: ();
let _2: &[T];
let mut _3: &[T; 3];
2023-03-12 09:10:30 -05:00
let _4: [T; 3];
let mut _5: T;
2023-06-06 08:47:00 -05:00
let mut _6: T;
let mut _7: T;
2023-03-12 09:10:30 -05:00
let mut _8: usize;
2023-06-06 08:47:00 -05:00
let mut _9: usize;
2023-03-12 09:10:30 -05:00
let mut _10: bool;
let mut _11: !;
scope 1 {
2023-06-06 08:47:00 -05:00
debug v => _2;
scope 2 {
2023-06-06 08:47:00 -05:00
debug v1 => &(*_2)[0 of 3];
debug v2 => &(*_2)[1 of 3];
debug v3 => &(*_2)[2 of 3];
}
}
bb0: {
2023-03-12 09:10:30 -05:00
StorageLive(_3);
StorageLive(_4);
_4 = [_1, _1, _1];
_3 = &_4;
_2 = move _3 as &[T] (PointerCoercion(Unsize));
StorageDead(_3);
_8 = Len((*_2));
_9 = const 3_usize;
- _10 = Eq(move _8, const 3_usize);
- switchInt(move _10) -> [0: bb1, otherwise: bb2];
2023-06-06 08:47:00 -05:00
+ nop;
2023-03-12 09:10:30 -05:00
+ switchInt(move _8) -> [3: bb2, otherwise: bb1];
}
bb1: {
2023-03-12 09:10:30 -05:00
_11 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
}
bb2: {
2023-03-12 09:10:30 -05:00
StorageDead(_4);
2023-06-06 08:47:00 -05:00
return;
}
}