]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/matches_reduce_branches.bar.MatchBranchSimplification.32bit.diff
Rollup merge of #100229 - RalfJung:extra-const-ub-checks, r=lcnr
[rust.git] / src / test / mir-opt / matches_reduce_branches.bar.MatchBranchSimplification.32bit.diff
1 - // MIR for `bar` before MatchBranchSimplification
2 + // MIR for `bar` after MatchBranchSimplification
3   
4   fn bar(_1: i32) -> (bool, bool, bool, bool) {
5       debug i => _1;                       // in scope 0 at $DIR/matches_reduce_branches.rs:+0:8: +0:9
6       let mut _0: (bool, bool, bool, bool); // return place in scope 0 at $DIR/matches_reduce_branches.rs:+0:19: +0:43
7       let _2: bool;                        // in scope 0 at $DIR/matches_reduce_branches.rs:+1:9: +1:10
8       let _6: ();                          // in scope 0 at $DIR/matches_reduce_branches.rs:+6:5: +21:6
9       let mut _7: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:+23:6: +23:7
10       let mut _8: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:+23:9: +23:10
11       let mut _9: bool;                    // in scope 0 at $DIR/matches_reduce_branches.rs:+23:12: +23:13
12       let mut _10: bool;                   // in scope 0 at $DIR/matches_reduce_branches.rs:+23:15: +23:16
13 +     let mut _11: i32;                    // in scope 0 at $DIR/matches_reduce_branches.rs:+6:5: +6:12
14       scope 1 {
15           debug a => _2;                   // in scope 1 at $DIR/matches_reduce_branches.rs:+1:9: +1:10
16           let _3: bool;                    // in scope 1 at $DIR/matches_reduce_branches.rs:+2:9: +2:10
17           scope 2 {
18               debug b => _3;               // in scope 2 at $DIR/matches_reduce_branches.rs:+2:9: +2:10
19               let _4: bool;                // in scope 2 at $DIR/matches_reduce_branches.rs:+3:9: +3:10
20               scope 3 {
21                   debug c => _4;           // in scope 3 at $DIR/matches_reduce_branches.rs:+3:9: +3:10
22                   let _5: bool;            // in scope 3 at $DIR/matches_reduce_branches.rs:+4:9: +4:10
23                   scope 4 {
24                       debug d => _5;       // in scope 4 at $DIR/matches_reduce_branches.rs:+4:9: +4:10
25                   }
26               }
27           }
28       }
29   
30       bb0: {
31           StorageLive(_2);                 // scope 0 at $DIR/matches_reduce_branches.rs:+1:9: +1:10
32           StorageLive(_3);                 // scope 1 at $DIR/matches_reduce_branches.rs:+2:9: +2:10
33           StorageLive(_4);                 // scope 2 at $DIR/matches_reduce_branches.rs:+3:9: +3:10
34           StorageLive(_5);                 // scope 3 at $DIR/matches_reduce_branches.rs:+4:9: +4:10
35           StorageLive(_6);                 // scope 4 at $DIR/matches_reduce_branches.rs:+6:5: +21:6
36 -         switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:+6:5: +6:12
37 -     }
38
39 -     bb1: {
40 -         _2 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:+15:13: +15:21
41 -         _3 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:+16:13: +16:22
42 -         _4 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:+17:13: +17:22
43 -         _5 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:+18:13: +18:21
44 -         nop;                             // scope 4 at $DIR/matches_reduce_branches.rs:+19:13: +19:15
45 -         goto -> bb3;                     // scope 4 at $DIR/matches_reduce_branches.rs:+19:13: +19:15
46 -     }
47
48 -     bb2: {
49 -         _2 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:+8:13: +8:22
50 -         _3 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:+9:13: +9:21
51 +         StorageLive(_11);                // scope 4 at $DIR/matches_reduce_branches.rs:+6:5: +6:12
52 +         _11 = _1;                        // scope 4 at $DIR/matches_reduce_branches.rs:+6:5: +6:12
53 +         _2 = Ne(_11, const 7_i32);       // scope 4 at $DIR/matches_reduce_branches.rs:+8:13: +8:22
54 +         _3 = Eq(_11, const 7_i32);       // scope 4 at $DIR/matches_reduce_branches.rs:+9:13: +9:21
55           _4 = const false;                // scope 4 at $DIR/matches_reduce_branches.rs:+10:13: +10:22
56           _5 = const true;                 // scope 4 at $DIR/matches_reduce_branches.rs:+11:13: +11:21
57 -         nop;                             // scope 4 at $DIR/matches_reduce_branches.rs:+12:13: +12:15
58 -         goto -> bb3;                     // scope 4 at $DIR/matches_reduce_branches.rs:+12:13: +12:15
59 -     }
60
61 -     bb3: {
62 +         StorageDead(_11);                // scope 4 at $DIR/matches_reduce_branches.rs:+6:5: +6:12
63           StorageDead(_6);                 // scope 4 at $DIR/matches_reduce_branches.rs:+21:6: +21:7
64           StorageLive(_7);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:6: +23:7
65           _7 = _2;                         // scope 4 at $DIR/matches_reduce_branches.rs:+23:6: +23:7
66           StorageLive(_8);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:9: +23:10
67           _8 = _3;                         // scope 4 at $DIR/matches_reduce_branches.rs:+23:9: +23:10
68           StorageLive(_9);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:12: +23:13
69           _9 = _4;                         // scope 4 at $DIR/matches_reduce_branches.rs:+23:12: +23:13
70           StorageLive(_10);                // scope 4 at $DIR/matches_reduce_branches.rs:+23:15: +23:16
71           _10 = _5;                        // scope 4 at $DIR/matches_reduce_branches.rs:+23:15: +23:16
72           Deinit(_0);                      // scope 4 at $DIR/matches_reduce_branches.rs:+23:5: +23:17
73           (_0.0: bool) = move _7;          // scope 4 at $DIR/matches_reduce_branches.rs:+23:5: +23:17
74           (_0.1: bool) = move _8;          // scope 4 at $DIR/matches_reduce_branches.rs:+23:5: +23:17
75           (_0.2: bool) = move _9;          // scope 4 at $DIR/matches_reduce_branches.rs:+23:5: +23:17
76           (_0.3: bool) = move _10;         // scope 4 at $DIR/matches_reduce_branches.rs:+23:5: +23:17
77           StorageDead(_10);                // scope 4 at $DIR/matches_reduce_branches.rs:+23:16: +23:17
78           StorageDead(_9);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:16: +23:17
79           StorageDead(_8);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:16: +23:17
80           StorageDead(_7);                 // scope 4 at $DIR/matches_reduce_branches.rs:+23:16: +23:17
81           StorageDead(_5);                 // scope 3 at $DIR/matches_reduce_branches.rs:+24:1: +24:2
82           StorageDead(_4);                 // scope 2 at $DIR/matches_reduce_branches.rs:+24:1: +24:2
83           StorageDead(_3);                 // scope 1 at $DIR/matches_reduce_branches.rs:+24:1: +24:2
84           StorageDead(_2);                 // scope 0 at $DIR/matches_reduce_branches.rs:+24:1: +24:2
85           return;                          // scope 0 at $DIR/matches_reduce_branches.rs:+24:2: +24:2
86       }
87   }
88