fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// MIR for `main` after SimplifyCfg-initial 2 3fn main() -> () { 4 let mut _0: (); 5 let _1: i32; 6 let _3: i32; 7 let mut _4: bool; 8 let mut _5: bool; 9 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 } 20 21 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 FakeRead(ForMatchedPlace(None), _1); 30 _6 = Le(const 0_i32, _1); 31 switchInt(move _6) -> [0: bb4, otherwise: bb1]; 32 } 33 34 bb1: { 35 _7 = Lt(_1, const 10_i32); 36 switchInt(move _7) -> [0: bb4, otherwise: bb2]; 37 } 38 39 bb2: { 40 falseEdge -> [real: bb9, imaginary: bb6]; 41 } 42 43 bb3: { 44 _3 = const 3_i32; 45 goto -> bb14; 46 } 47 48 bb4: { 49 _4 = Le(const 10_i32, _1); 50 switchInt(move _4) -> [0: bb7, otherwise: bb5]; 51 } 52 53 bb5: { 54 _5 = Le(_1, const 20_i32); 55 switchInt(move _5) -> [0: bb7, otherwise: bb6]; 56 } 57 58 bb6: { 59 falseEdge -> [real: bb12, imaginary: bb8]; 60 } 61 62 bb7: { 63 switchInt(_1) -> [4294967295: bb8, otherwise: bb3]; 64 } 65 66 bb8: { 67 falseEdge -> [real: bb13, imaginary: bb3]; 68 } 69 70 bb9: { 71 _8 = &shallow _1; 72 StorageLive(_9); 73 _9 = _2; 74 switchInt(move _9) -> [0: bb11, otherwise: bb10]; 75 } 76 77 bb10: { 78 StorageDead(_9); 79 FakeRead(ForMatchGuard, _8); 80 _3 = const 0_i32; 81 goto -> bb14; 82 } 83 84 bb11: { 85 StorageDead(_9); 86 falseEdge -> [real: bb3, imaginary: bb6]; 87 } 88 89 bb12: { 90 _3 = const 1_i32; 91 goto -> bb14; 92 } 93 94 bb13: { 95 _3 = const 2_i32; 96 goto -> bb14; 97 } 98 99 bb14: { 100 StorageDead(_3); 101 _0 = const (); 102 StorageDead(_2); 103 StorageDead(_1); 104 return; 105 } 106}