]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / mir-opt / uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
1 // MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
2
3 fn main() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited_enum_branching2.rs:+0:11: +0:11
5     let _1: Plop;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
6     let mut _2: Test1;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
7     let _3: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
8     let mut _4: &Test1;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
9     let mut _5: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+4:9: +4:20
10     let _6: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+5:24: +5:34
11     let _7: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
12     let _8: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
13     let _9: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
14     let mut _10: isize;                  // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+11:9: +11:20
15     let _11: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+12:24: +12:34
16     let _12: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
17     let _13: &str;                       // in scope 0 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
18     scope 1 {
19         debug plop => _1;                // in scope 1 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
20     }
21
22     bb0: {
23         StorageLive(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:9: +1:13
24         StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
25         Deinit(_2);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
26         discriminant(_2) = 2;            // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:38: +1:46
27         Deinit(_1);                      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
28         (_1.0: u32) = const 51_u32;      // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
29         (_1.1: Test1) = move _2;         // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:16: +1:48
30         StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+1:47: +1:48
31         StorageLive(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +8:6
32         StorageLive(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
33         _4 = &(_1.1: Test1);             // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
34         _5 = discriminant((*_4));        // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
35         switchInt(move _5) -> [2: bb3, 3: bb1, otherwise: bb2]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:5: +3:22
36     }
37
38     bb1: {
39         StorageLive(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
40         _8 = const "D";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
41                                          // mir::Constant
42                                          // + span: $DIR/uninhabited_enum_branching2.rs:25:21: 25:24
43                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
44         _3 = &(*_8);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:21: +7:24
45         StorageDead(_8);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
46         goto -> bb4;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+7:23: +7:24
47     }
48
49     bb2: {
50         unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+3:11: +3:22
51     }
52
53     bb3: {
54         StorageLive(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
55         _7 = const "C";                  // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
56                                          // mir::Constant
57                                          // + span: $DIR/uninhabited_enum_branching2.rs:24:21: 24:24
58                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
59         _3 = &(*_7);                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:21: +6:24
60         StorageDead(_7);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
61         goto -> bb4;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+6:23: +6:24
62     }
63
64     bb4: {
65         StorageDead(_4);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
66         StorageDead(_3);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+8:6: +8:7
67         StorageLive(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +15:6
68         _10 = discriminant((_1.1: Test1)); // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
69         switchInt(move _10) -> [2: bb7, 3: bb5, otherwise: bb6]; // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:5: +10:21
70     }
71
72     bb5: {
73         StorageLive(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
74         _13 = const "D";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
75                                          // mir::Constant
76                                          // + span: $DIR/uninhabited_enum_branching2.rs:32:21: 32:24
77                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
78         _9 = &(*_13);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:21: +14:24
79         StorageDead(_13);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
80         goto -> bb8;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+14:23: +14:24
81     }
82
83     bb6: {
84         unreachable;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+10:11: +10:21
85     }
86
87     bb7: {
88         StorageLive(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
89         _12 = const "C";                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
90                                          // mir::Constant
91                                          // + span: $DIR/uninhabited_enum_branching2.rs:31:21: 31:24
92                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
93         _9 = &(*_12);                    // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:21: +13:24
94         StorageDead(_12);                // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
95         goto -> bb8;                     // scope 1 at $DIR/uninhabited_enum_branching2.rs:+13:23: +13:24
96     }
97
98     bb8: {
99         StorageDead(_9);                 // scope 1 at $DIR/uninhabited_enum_branching2.rs:+15:6: +15:7
100         _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching2.rs:+0:11: +16:2
101         StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:1: +16:2
102         return;                          // scope 0 at $DIR/uninhabited_enum_branching2.rs:+16:2: +16:2
103     }
104 }