1
1
// MIR for `disjoint_ranges` after SimplifyCfg-initial
2
2
3
- fn disjoint_ranges() -> () {
4
- let mut _0 : ();
5
- let _1 : i32;
6
- let _3 : i32;
3
+ fn disjoint_ranges(_1 : i32, _2: bool) -> u32 {
4
+ debug x => _1;
5
+ debug b => _2;
6
+ let mut _0 : u32;
7
+ let mut _3 : bool;
7
8
let mut _4 : bool;
8
9
let mut _5 : bool;
9
10
let mut _6 : bool;
10
- let mut _7 : bool;
11
- let mut _8 : &i32;
12
- let mut _9 : bool;
13
- scope 1 {
14
- debug x => _1;
15
- let _2 : bool;
16
- scope 2 {
17
- debug b => _2;
18
- }
19
- }
11
+ let mut _7 : &i32;
12
+ let mut _8 : bool;
20
13
21
14
bb0 : {
22
- StorageLive(_1);
23
- _1 = const 3_i32;
24
- FakeRead(ForLet(None), _1);
25
- StorageLive(_2);
26
- _2 = const true;
27
- FakeRead(ForLet(None), _2);
28
- StorageLive(_3);
29
15
PlaceMention(_1);
30
- _6 = Le(const 0_i32, _1);
31
- switchInt(move _6 ) -> [0 : bb3, otherwise: bb8];
16
+ _5 = Le(const 0_i32, _1);
17
+ switchInt(move _5 ) -> [0 : bb3, otherwise: bb8];
32
18
}
33
19
34
20
bb1 : {
35
- _3 = const 3_i32 ;
21
+ _0 = const 3_u32 ;
36
22
goto -> bb14;
37
23
}
38
24
@@ -41,8 +27,8 @@ fn disjoint_ranges() -> () {
41
27
}
42
28
43
29
bb3 : {
44
- _4 = Le(const 10_i32, _1);
45
- switchInt(move _4 ) -> [0 : bb5, otherwise: bb7];
30
+ _3 = Le(const 10_i32, _1);
31
+ switchInt(move _3 ) -> [0 : bb5, otherwise: bb7];
46
32
}
47
33
48
34
bb4 : {
@@ -58,49 +44,45 @@ fn disjoint_ranges() -> () {
58
44
}
59
45
60
46
bb7 : {
61
- _5 = Le(_1, const 20_i32);
62
- switchInt(move _5 ) -> [0 : bb5, otherwise: bb4];
47
+ _4 = Le(_1, const 20_i32);
48
+ switchInt(move _4 ) -> [0 : bb5, otherwise: bb4];
63
49
}
64
50
65
51
bb8 : {
66
- _7 = Lt(_1, const 10_i32);
67
- switchInt(move _7 ) -> [0 : bb3, otherwise: bb2];
52
+ _6 = Lt(_1, const 10_i32);
53
+ switchInt(move _6 ) -> [0 : bb3, otherwise: bb2];
68
54
}
69
55
70
56
bb9 : {
71
- _8 = &fake _1;
72
- StorageLive(_9 );
73
- _9 = _2;
74
- switchInt(move _9 ) -> [0 : bb11, otherwise: bb10];
57
+ _7 = &fake _1;
58
+ StorageLive(_8 );
59
+ _8 = _2;
60
+ switchInt(move _8 ) -> [0 : bb11, otherwise: bb10];
75
61
}
76
62
77
63
bb10 : {
78
- StorageDead(_9 );
79
- FakeRead(ForMatchGuard, _8 );
80
- _3 = const 0_i32 ;
64
+ StorageDead(_8 );
65
+ FakeRead(ForMatchGuard, _7 );
66
+ _0 = const 0_u32 ;
81
67
goto -> bb14;
82
68
}
83
69
84
70
bb11 : {
85
- StorageDead(_9 );
71
+ StorageDead(_8 );
86
72
falseEdge -> [real : bb1, imaginary: bb4];
87
73
}
88
74
89
75
bb12 : {
90
- _3 = const 1_i32 ;
76
+ _0 = const 1_u32 ;
91
77
goto -> bb14;
92
78
}
93
79
94
80
bb13 : {
95
- _3 = const 2_i32 ;
81
+ _0 = const 2_u32 ;
96
82
goto -> bb14;
97
83
}
98
84
99
85
bb14 : {
100
- StorageDead(_3);
101
- _0 = const ();
102
- StorageDead(_2);
103
- StorageDead(_1);
104
86
return;
105
87
}
106
88
}
0 commit comments