11// MIR for `disjoint_ranges` after SimplifyCfg-initial
22
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;
78 let mut _4 : bool;
89 let mut _5 : bool;
910 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;
2013
2114 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);
2915 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];
3218 }
3319
3420 bb1 : {
35- _3 = const 3_i32 ;
21+ _0 = const 3_u32 ;
3622 goto -> bb14;
3723 }
3824
@@ -41,8 +27,8 @@ fn disjoint_ranges() -> () {
4127 }
4228
4329 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];
4632 }
4733
4834 bb4 : {
@@ -58,49 +44,45 @@ fn disjoint_ranges() -> () {
5844 }
5945
6046 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];
6349 }
6450
6551 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];
6854 }
6955
7056 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];
7561 }
7662
7763 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 ;
8167 goto -> bb14;
8268 }
8369
8470 bb11 : {
85- StorageDead(_9 );
71+ StorageDead(_8 );
8672 falseEdge -> [real : bb1, imaginary: bb4];
8773 }
8874
8975 bb12 : {
90- _3 = const 1_i32 ;
76+ _0 = const 1_u32 ;
9177 goto -> bb14;
9278 }
9379
9480 bb13 : {
95- _3 = const 2_i32 ;
81+ _0 = const 2_u32 ;
9682 goto -> bb14;
9783 }
9884
9985 bb14 : {
100- StorageDead(_3);
101- _0 = const ();
102- StorageDead(_2);
103- StorageDead(_1);
10486 return;
10587 }
10688}
0 commit comments