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