]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir
improve naming
[rust.git] / src / test / mir-opt / match_false_edges / rustc.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 = std::option::Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
30                                          // ty::Const
31                                          // + ty: i32
32                                          // + val: Value(Scalar(0x0000002a))
33                                          // mir::Constant
34                                          // + span: $DIR/match_false_edges.rs:15:24: 15:26
35                                          // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
36         FakeRead(ForMatchedPlace, _2);   // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
37         _3 = discriminant(_2);           // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
38         switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
39     }
40
41     bb1 (cleanup): {
42         resume;                          // scope 0 at $DIR/match_false_edges.rs:14:1: 20:2
43     }
44
45     bb2: {
46         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:18:17: 18:23
47                                          // ty::Const
48                                          // + ty: i32
49                                          // + val: Value(Scalar(0x00000003))
50                                          // mir::Constant
51                                          // + span: $DIR/match_false_edges.rs:18:18: 18:19
52                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
53                                          // ty::Const
54                                          // + ty: i32
55                                          // + val: Value(Scalar(0x00000003))
56                                          // mir::Constant
57                                          // + span: $DIR/match_false_edges.rs:18:21: 18:22
58                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
59         goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
60     }
61
62     bb3: {
63         falseEdge -> [real: bb6, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
64     }
65
66     bb4: {
67         falseEdge -> [real: bb10, imaginary: bb2]; // scope 0 at $DIR/match_false_edges.rs:17:9: 17:16
68     }
69
70     bb5: {
71         unreachable;                     // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
72     }
73
74     bb6: {
75         StorageLive(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
76         _11 = const full_tested_match::promoted[0]; // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
77                                          // ty::Const
78                                          // + ty: &std::option::Option<i32>
79                                          // + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), const_param_did: None }, [], Some(promoted[0]))
80                                          // mir::Constant
81                                          // + span: $DIR/match_false_edges.rs:16:14: 16:15
82                                          // + literal: Const { ty: &std::option::Option<i32>, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), const_param_did: None }, [], Some(promoted[0])) }
83         _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
84         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
85         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
86         _7 = const guard() -> [return: bb7, unwind: bb1]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
87                                          // ty::Const
88                                          // + ty: fn() -> bool {guard}
89                                          // + val: Value(Scalar(<ZST>))
90                                          // mir::Constant
91                                          // + span: $DIR/match_false_edges.rs:16:20: 16:25
92                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(Scalar(<ZST>)) }
93     }
94
95     bb7: {
96         switchInt(move _7) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
97     }
98
99     bb8: {
100         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
101         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
102         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
103         StorageLive(_5);                 // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
104         _5 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
105         StorageLive(_8);                 // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
106         _8 = _5;                         // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
107         _1 = (const 1_i32, move _8);     // scope 2 at $DIR/match_false_edges.rs:16:31: 16:37
108                                          // ty::Const
109                                          // + ty: i32
110                                          // + val: Value(Scalar(0x00000001))
111                                          // mir::Constant
112                                          // + span: $DIR/match_false_edges.rs:16:32: 16:33
113                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
114         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37
115         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
116         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
117         goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
118     }
119
120     bb9: {
121         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
122         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
123         goto -> bb4;                     // scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
124     }
125
126     bb10: {
127         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
128         _9 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
129         StorageLive(_10);                // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
130         _10 = _9;                        // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
131         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:17:20: 17:26
132                                          // ty::Const
133                                          // + ty: i32
134                                          // + val: Value(Scalar(0x00000002))
135                                          // mir::Constant
136                                          // + span: $DIR/match_false_edges.rs:17:21: 17:22
137                                          // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
138         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26
139         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:17:25: 17:26
140         goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
141     }
142
143     bb11: {
144         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
145         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
146         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:14:28: 20:2
147                                          // ty::Const
148                                          // + ty: ()
149                                          // + val: Value(Scalar(<ZST>))
150                                          // mir::Constant
151                                          // + span: $DIR/match_false_edges.rs:14:28: 20:2
152                                          // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
153         return;                          // scope 0 at $DIR/match_false_edges.rs:20:2: 20:2
154     }
155 }