blob: f6c337be10f2cf98f6a55dc8462b335ebfd9b117 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
- // MIR for `test` before SimplifyComparisonIntegral
+ // MIR for `test` after SimplifyComparisonIntegral
fn test(_1: T) -> () {
debug x => _1;
let mut _0: ();
let _2: &[T];
let mut _3: &[T; 3];
let _4: [T; 3];
let mut _5: T;
let mut _6: T;
let mut _7: T;
let mut _8: usize;
let mut _9: usize;
let mut _10: bool;
let mut _14: !;
scope 1 {
debug v => _2;
let _11: &T;
let _12: &T;
let _13: &T;
scope 2 {
debug v1 => _11;
debug v2 => _12;
debug v3 => _13;
}
}
bb0: {
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];
+ nop;
+ switchInt(move _8) -> [3: bb2, otherwise: bb1];
}
bb1: {
_14 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
}
bb2: {
StorageLive(_11);
_11 = &(*_2)[0 of 3];
StorageLive(_12);
_12 = &(*_2)[1 of 3];
StorageLive(_13);
_13 = &(*_2)[2 of 3];
StorageDead(_13);
StorageDead(_12);
StorageDead(_11);
StorageDead(_4);
return;
}
}
|