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