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