]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / mir-opt / early_otherwise_branch.opt2.EarlyOtherwiseBranch.diff
1 - // MIR for `opt2` before EarlyOtherwiseBranch
2 + // MIR for `opt2` after EarlyOtherwiseBranch
3   
4   fn opt2(_1: Option<u32>, _2: Option<u32>) -> u32 {
5       debug x => _1;                       // in scope 0 at $DIR/early_otherwise_branch.rs:+0:9: +0:10
6       debug y => _2;                       // in scope 0 at $DIR/early_otherwise_branch.rs:+0:25: +0:26
7       let mut _0: u32;                     // return place in scope 0 at $DIR/early_otherwise_branch.rs:+0:44: +0:47
8       let mut _3: (std::option::Option<u32>, std::option::Option<u32>); // in scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
9       let mut _4: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13
10       let mut _5: std::option::Option<u32>; // in scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16
11       let mut _6: isize;                   // in scope 0 at $DIR/early_otherwise_branch.rs:+3:16: +3:20
12       let mut _7: isize;                   // in scope 0 at $DIR/early_otherwise_branch.rs:+2:19: +2:26
13       let mut _8: isize;                   // in scope 0 at $DIR/early_otherwise_branch.rs:+2:10: +2:17
14       let _9: u32;                         // in scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16
15       let _10: u32;                        // in scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25
16 +     let mut _11: isize;                  // in scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
17 +     let mut _12: bool;                   // in scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
18       scope 1 {
19           debug a => _9;                   // in scope 1 at $DIR/early_otherwise_branch.rs:+2:15: +2:16
20           debug b => _10;                  // in scope 1 at $DIR/early_otherwise_branch.rs:+2:24: +2:25
21       }
22   
23       bb0: {
24           StorageLive(_3);                 // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
25           StorageLive(_4);                 // scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13
26           _4 = _1;                         // scope 0 at $DIR/early_otherwise_branch.rs:+1:12: +1:13
27           StorageLive(_5);                 // scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16
28           _5 = _2;                         // scope 0 at $DIR/early_otherwise_branch.rs:+1:15: +1:16
29           _3 = (move _4, move _5);         // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
30           StorageDead(_5);                 // scope 0 at $DIR/early_otherwise_branch.rs:+1:16: +1:17
31           StorageDead(_4);                 // scope 0 at $DIR/early_otherwise_branch.rs:+1:16: +1:17
32           _8 = discriminant((_3.0: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
33 -         switchInt(move _8) -> [0: bb1, 1: bb3, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
34 +         StorageLive(_11);                // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
35 +         _11 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
36 +         StorageLive(_12);                // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
37 +         _12 = Ne(_8, move _11);          // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
38 +         StorageDead(_11);                // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
39 +         switchInt(move _12) -> [0: bb5, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
40       }
41   
42       bb1: {
43 -         _6 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
44 -         switchInt(move _6) -> [0: bb5, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
45 -     }
46
47 -     bb2: {
48 +         StorageDead(_12);                // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15
49           _0 = const 1_u32;                // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15
50 -         goto -> bb6;                     // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15
51 +         goto -> bb4;                     // scope 0 at $DIR/early_otherwise_branch.rs:+4:14: +4:15
52       }
53   
54 -     bb3: {
55 -         _7 = discriminant((_3.1: std::option::Option<u32>)); // scope 0 at $DIR/early_otherwise_branch.rs:+1:11: +1:17
56 -         switchInt(move _7) -> [1: bb4, otherwise: bb2]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
57 -     }
58
59 -     bb4: {
60 +     bb2: {
61           StorageLive(_9);                 // scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16
62           _9 = (((_3.0: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:+2:15: +2:16
63           StorageLive(_10);                // scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25
64           _10 = (((_3.1: std::option::Option<u32>) as Some).0: u32); // scope 0 at $DIR/early_otherwise_branch.rs:+2:24: +2:25
65           _0 = const 0_u32;                // scope 1 at $DIR/early_otherwise_branch.rs:+2:31: +2:32
66           StorageDead(_10);                // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32
67           StorageDead(_9);                 // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32
68 -         goto -> bb6;                     // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32
69 +         goto -> bb4;                     // scope 0 at $DIR/early_otherwise_branch.rs:+2:31: +2:32
70       }
71   
72 -     bb5: {
73 +     bb3: {
74           _0 = const 0_u32;                // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26
75 -         goto -> bb6;                     // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26
76 +         goto -> bb4;                     // scope 0 at $DIR/early_otherwise_branch.rs:+3:25: +3:26
77       }
78   
79 -     bb6: {
80 +     bb4: {
81           StorageDead(_3);                 // scope 0 at $DIR/early_otherwise_branch.rs:+6:1: +6:2
82           return;                          // scope 0 at $DIR/early_otherwise_branch.rs:+6:2: +6:2
83 +     }
84
85 +     bb5: {
86 +         StorageDead(_12);                // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
87 +         switchInt(_8) -> [0: bb3, 1: bb2, otherwise: bb1]; // scope 0 at $DIR/early_otherwise_branch.rs:+1:5: +1:17
88       }
89   }
90