]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/separate_const_switch.too_complex.SeparateConstSwitch.diff
Auto merge of #98957 - RalfJung:zst-are-different, r=lcnr,oli-obk
[rust.git] / src / test / mir-opt / separate_const_switch.too_complex.SeparateConstSwitch.diff
1 - // MIR for `too_complex` before SeparateConstSwitch
2 + // MIR for `too_complex` after SeparateConstSwitch
3   
4   fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
5       debug x => _1;                       // in scope 0 at $DIR/separate_const_switch.rs:9:16: 9:17
6       let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/separate_const_switch.rs:9:42: 9:53
7       let mut _2: std::ops::ControlFlow<usize, i32>; // in scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
8       let mut _3: isize;                   // in scope 0 at $DIR/separate_const_switch.rs:16:13: 16:18
9       let _4: i32;                         // in scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
10       let mut _5: i32;                     // in scope 0 at $DIR/separate_const_switch.rs:16:44: 16:45
11       let _6: usize;                       // in scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
12       let mut _7: usize;                   // in scope 0 at $DIR/separate_const_switch.rs:17:42: 17:43
13       let mut _8: isize;                   // in scope 0 at $DIR/separate_const_switch.rs:20:9: 20:33
14       let _9: i32;                         // in scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
15       let mut _10: i32;                    // in scope 0 at $DIR/separate_const_switch.rs:20:42: 20:43
16       let _11: usize;                      // in scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
17       scope 1 {
18           debug v => _4;                   // in scope 1 at $DIR/separate_const_switch.rs:16:16: 16:17
19       }
20       scope 2 {
21           debug r => _6;                   // in scope 2 at $DIR/separate_const_switch.rs:17:17: 17:18
22       }
23       scope 3 {
24           debug v => _9;                   // in scope 3 at $DIR/separate_const_switch.rs:20:31: 20:32
25       }
26       scope 4 {
27           debug r => _11;                  // in scope 4 at $DIR/separate_const_switch.rs:21:28: 21:29
28       }
29   
30       bb0: {
31           StorageLive(_2);                 // scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
32           _3 = discriminant(_1);           // scope 0 at $DIR/separate_const_switch.rs:15:15: 15:16
33           switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/separate_const_switch.rs:15:9: 15:16
34       }
35   
36       bb1: {
37           StorageLive(_6);                 // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
38           _6 = ((_1 as Err).0: usize);     // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
39           StorageLive(_7);                 // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
40           _7 = _6;                         // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
41           Deinit(_2);                      // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
42           ((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
43           discriminant(_2) = 1;            // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
44           StorageDead(_7);                 // scope 2 at $DIR/separate_const_switch.rs:17:43: 17:44
45           StorageDead(_6);                 // scope 0 at $DIR/separate_const_switch.rs:17:43: 17:44
46 -         goto -> bb3;                     // scope 0 at $DIR/separate_const_switch.rs:17:43: 17:44
47 +         _8 = discriminant(_2);           // scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
48 +         switchInt(move _8) -> [0_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/separate_const_switch.rs:14:5: 19:6
49       }
50   
51       bb2: {
52           StorageLive(_4);                 // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
53           _4 = ((_1 as Ok).0: i32);        // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
54           StorageLive(_5);                 // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
55           _5 = _4;                         // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
56           Deinit(_2);                      // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
57           ((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
58           discriminant(_2) = 0;            // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
59           StorageDead(_5);                 // scope 1 at $DIR/separate_const_switch.rs:16:45: 16:46
60           StorageDead(_4);                 // scope 0 at $DIR/separate_const_switch.rs:16:45: 16:46
61 -         goto -> bb3;                     // scope 0 at $DIR/separate_const_switch.rs:16:45: 16:46
62 -     }
63
64 -     bb3: {
65           _8 = discriminant(_2);           // scope 0 at $DIR/separate_const_switch.rs:14:11: 19:6
66 -         switchInt(move _8) -> [0_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/separate_const_switch.rs:14:5: 19:6
67 +         switchInt(move _8) -> [0_isize: bb4, otherwise: bb3]; // scope 0 at $DIR/separate_const_switch.rs:14:5: 19:6
68       }
69   
70 -     bb4: {
71 +     bb3: {
72           StorageLive(_11);                // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
73           _11 = ((_2 as Break).0: usize);  // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
74           Deinit(_0);                      // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
75           discriminant(_0) = 0;            // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
76           StorageDead(_11);                // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
77 -         goto -> bb6;                     // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
78 +         goto -> bb5;                     // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
79       }
80   
81 -     bb5: {
82 +     bb4: {
83           StorageLive(_9);                 // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
84           _9 = ((_2 as Continue).0: i32);  // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
85           StorageLive(_10);                // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
86           _10 = _9;                        // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
87           Deinit(_0);                      // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
88           ((_0 as Some).0: i32) = move _10; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
89           discriminant(_0) = 1;            // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
90           StorageDead(_10);                // scope 3 at $DIR/separate_const_switch.rs:20:43: 20:44
91           StorageDead(_9);                 // scope 0 at $DIR/separate_const_switch.rs:20:43: 20:44
92 -         goto -> bb6;                     // scope 0 at $DIR/separate_const_switch.rs:20:43: 20:44
93 +         goto -> bb5;                     // scope 0 at $DIR/separate_const_switch.rs:20:43: 20:44
94       }
95   
96 -     bb6: {
97 +     bb5: {
98           StorageDead(_2);                 // scope 0 at $DIR/separate_const_switch.rs:23:1: 23:2
99           return;                          // scope 0 at $DIR/separate_const_switch.rs:23:2: 23:2
100       }
101   }
102