]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_goto_storage.match_nested_if.ConstGoto.diff
Auto merge of #96978 - lqd:win_pgo2, r=Mark-Simulacrum
[rust.git] / src / test / mir-opt / const_goto_storage.match_nested_if.ConstGoto.diff
1 - // MIR for `match_nested_if` before ConstGoto
2 + // MIR for `match_nested_if` after ConstGoto
3   
4   fn match_nested_if() -> bool {
5       let mut _0: bool;                    // return place in scope 0 at $DIR/const_goto_storage.rs:2:25: 2:29
6       let _1: bool;                        // in scope 0 at $DIR/const_goto_storage.rs:3:9: 3:12
7 -     let mut _2: ();                      // in scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
8 -     let mut _3: bool;                    // in scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
9 -     let mut _4: bool;                    // in scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
10 -     let mut _5: bool;                    // in scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
11 -     let mut _6: bool;                    // in scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
12 +     let mut _2: bool;                    // in scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
13       scope 1 {
14           debug val => _1;                 // in scope 1 at $DIR/const_goto_storage.rs:3:9: 3:12
15       }
16   
17       bb0: {
18           StorageLive(_1);                 // scope 0 at $DIR/const_goto_storage.rs:3:9: 3:12
19 -         StorageLive(_2);                 // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
20 -         nop;                             // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
21 -         StorageLive(_3);                 // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
22 -         StorageLive(_4);                 // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
23 -         StorageLive(_5);                 // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
24 -         StorageLive(_6);                 // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
25 -         _6 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
26 -         switchInt(move _6) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
27 +         StorageLive(_2);                 // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
28 +         _2 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
29 +         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
30       }
31   
32       bb1: {
33 -         _5 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:4:31: 4:35
34 -         goto -> bb3;                     // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
35 -     }
36
37 -     bb2: {
38 -         _5 = const false;                // scope 0 at $DIR/const_goto_storage.rs:4:45: 4:50
39 -         goto -> bb3;                     // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
40 -     }
41
42 -     bb3: {
43 -         StorageDead(_6);                 // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
44 -         switchInt(move _5) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
45 -     }
46
47 -     bb4: {
48 -         _4 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:4:55: 4:59
49 -         goto -> bb6;                     // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
50 -     }
51
52 -     bb5: {
53 -         _4 = const false;                // scope 0 at $DIR/const_goto_storage.rs:4:69: 4:74
54 -         goto -> bb6;                     // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
55 -     }
56
57 -     bb6: {
58 -         StorageDead(_5);                 // scope 0 at $DIR/const_goto_storage.rs:4:75: 4:76
59 -         switchInt(move _4) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
60 -     }
61
62 -     bb7: {
63 -         _3 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:5:13: 5:17
64 -         goto -> bb9;                     // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
65 -     }
66
67 -     bb8: {
68 -         _3 = const false;                // scope 0 at $DIR/const_goto_storage.rs:7:13: 7:18
69 -         goto -> bb9;                     // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
70 -     }
71
72 -     bb9: {
73 -         switchInt(move _3) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
74 -     }
75
76 -     bb10: {
77 -         StorageDead(_4);                 // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
78 -         StorageDead(_3);                 // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
79 +         StorageDead(_2);                 // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
80           _1 = const true;                 // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
81 -         goto -> bb12;                    // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
82 +         goto -> bb3;                     // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
83       }
84   
85 -     bb11: {
86 -         StorageDead(_4);                 // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
87 -         StorageDead(_3);                 // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
88 +     bb2: {
89 +         StorageDead(_2);                 // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
90           _1 = const false;                // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
91 -         goto -> bb12;                    // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
92 +         goto -> bb3;                     // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
93       }
94   
95 -     bb12: {
96 -         StorageDead(_2);                 // scope 0 at $DIR/const_goto_storage.rs:13:6: 13:7
97 +     bb3: {
98           _0 = _1;                         // scope 1 at $DIR/const_goto_storage.rs:14:5: 14:8
99           StorageDead(_1);                 // scope 0 at $DIR/const_goto_storage.rs:15:1: 15:2
100           return;                          // scope 0 at $DIR/const_goto_storage.rs:15:2: 15:2
101       }
102   }
103