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