]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
Rollup merge of #107596 - Kobzol:stage-build-timer, r=Mark-Simulacrum
[rust.git] / tests / mir-opt / uninhabited_enum_branching.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_branching.rs:+0:11: +0:11
5     let _1: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
6     let mut _2: Test1;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
7     let mut _3: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+2:9: +2:20
8     let _4: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34
9     let _5: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
10     let _6: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
11     let mut _7: Test2;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
12     let mut _8: isize;                   // in scope 0 at $DIR/uninhabited_enum_branching.rs:+8:9: +8:17
13     let _9: &str;                        // in scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
14
15     bb0: {
16         StorageLive(_1);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6
17         StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
18         _2 = Test1::C;                   // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
19         _3 = discriminant(_2);           // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
20         switchInt(move _3) -> [2: bb1, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +1:19
21     }
22
23     bb1: {
24         StorageLive(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
25         _5 = const "C";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
26                                          // mir::Constant
27                                          // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24
28                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
29         _1 = &(*_5);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24
30         StorageDead(_5);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:23: +4:24
31         StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
32         StorageDead(_1);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7
33         StorageLive(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6
34         StorageLive(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
35         _7 = Test2::D;                   // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
36         _8 = discriminant(_7);           // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
37         switchInt(move _8) -> [4: bb5, 5: bb3, otherwise: bb4]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +7:19
38     }
39
40     bb2: {
41         unreachable;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19
42     }
43
44     bb3: {
45         StorageLive(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
46         _9 = const "E";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
47                                          // mir::Constant
48                                          // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24
49                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
50         _6 = &(*_9);                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24
51         StorageDead(_9);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
52         goto -> bb6;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24
53     }
54
55     bb4: {
56         unreachable;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19
57     }
58
59     bb5: {
60         _6 = const "D";                  // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
61                                          // mir::Constant
62                                          // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24
63                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
64         goto -> bb6;                     // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24
65     }
66
67     bb6: {
68         StorageDead(_7);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
69         StorageDead(_6);                 // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7
70         _0 = const ();                   // scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +11:2
71         return;                          // scope 0 at $DIR/uninhabited_enum_branching.rs:+11:2: +11:2
72     }
73 }