]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
Auto merge of #77278 - camelid:use-correct-article, r=estebank
[rust.git] / src / test / mir-opt / match_false_edges.full_tested_match.PromoteTemps.after.mir
1 // MIR for `full_tested_match` after PromoteTemps
2
3 fn full_tested_match() -> () {
4     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:14:28: 14:28
5     let mut _1: (i32, i32);              // in scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
6     let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
7     let mut _3: isize;                   // in scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
8     let mut _4: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
9     let _5: i32;                         // in scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
10     let _6: &i32;                        // in scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
11     let mut _7: bool;                    // in scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
12     let mut _8: i32;                     // in scope 0 at $DIR/match_false_edges.rs:16:35: 16:36
13     let _9: i32;                         // in scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
14     let mut _10: i32;                    // in scope 0 at $DIR/match_false_edges.rs:17:24: 17:25
15     let mut _11: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
16     scope 1 {
17     }
18     scope 2 {
19         debug x => _5;                   // in scope 2 at $DIR/match_false_edges.rs:16:14: 16:15
20         debug x => _6;                   // in scope 2 at $DIR/match_false_edges.rs:16:14: 16:15
21     }
22     scope 3 {
23         debug y => _9;                   // in scope 3 at $DIR/match_false_edges.rs:17:14: 17:15
24     }
25
26     bb0: {
27         StorageLive(_1);                 // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
28         StorageLive(_2);                 // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
29         _2 = Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
30         FakeRead(ForMatchedPlace, _2);   // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
31         _3 = discriminant(_2);           // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
32         switchInt(move _3) -> [0_isize: bb1, 1_isize: bb2, otherwise: bb4]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
33     }
34
35     bb1: {
36         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:18:17: 18:23
37         goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
38     }
39
40     bb2: {
41         falseEdge -> [real: bb5, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
42     }
43
44     bb3: {
45         falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:17:9: 17:16
46     }
47
48     bb4: {
49         unreachable;                     // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
50     }
51
52     bb5: {
53         StorageLive(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
54         _11 = const full_tested_match::promoted[0]; // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
55                                          // ty::Const
56                                          // + ty: &std::option::Option<i32>
57                                          // + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match), const_param_did: None }, [], Some(promoted[0]))
58                                          // mir::Constant
59                                          // + span: $DIR/match_false_edges.rs:16:14: 16:15
60                                          // + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match), const_param_did: None }, [], Some(promoted[0])) }
61         _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
62         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
63         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
64         _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
65                                          // mir::Constant
66                                          // + span: $DIR/match_false_edges.rs:16:20: 16:25
67                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar(<ZST>)) }
68     }
69
70     bb6: {
71         switchInt(move _7) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
72     }
73
74     bb7: {
75         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
76         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
77         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
78         StorageLive(_5);                 // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
79         _5 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
80         StorageLive(_8);                 // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
81         _8 = _5;                         // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
82         _1 = (const 1_i32, move _8);     // scope 2 at $DIR/match_false_edges.rs:16:31: 16:37
83         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37
84         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
85         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
86         goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
87     }
88
89     bb8: {
90         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
91         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
92         goto -> bb3;                     // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
93     }
94
95     bb9: {
96         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
97         _9 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
98         StorageLive(_10);                // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
99         _10 = _9;                        // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
100         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:17:20: 17:26
101         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26
102         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:17:25: 17:26
103         goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
104     }
105
106     bb10: {
107         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
108         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
109         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:14:28: 20:2
110         return;                          // scope 0 at $DIR/match_false_edges.rs:20:2: 20:2
111     }
112
113     bb11 (cleanup): {
114         resume;                          // scope 0 at $DIR/match_false_edges.rs:14:1: 20:2
115     }
116 }