]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/match_false_edges/rustc.full_tested_match.PromoteTemps.after.mir
New upstream version 1.44.1+dfsg1
[rustc.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); // bb0[0]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
28 StorageLive(_2); // bb0[1]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
29 _2 = std::option::Option::<i32>::Some(const 42i32); // bb0[2]: 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); // bb0[3]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
37 _3 = discriminant(_2); // bb0[4]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
38 switchInt(move _3) -> [0isize: bb2, 1isize: bb3, otherwise: bb5]; // bb0[5]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
39 }
40
41 bb1 (cleanup): {
42 resume; // bb1[0]: scope 0 at $DIR/match_false_edges.rs:14:1: 20:2
43 }
44
45 bb2: {
46 _1 = (const 3i32, const 3i32); // bb2[0]: 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; // bb2[1]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
60 }
61
62 bb3: {
63 falseEdges -> [real: bb6, imaginary: bb4]; // bb3[0]: scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
64 }
65
66 bb4: {
67 falseEdges -> [real: bb10, imaginary: bb2]; // bb4[0]: scope 0 at $DIR/match_false_edges.rs:17:9: 17:16
68 }
69
70 bb5: {
71 unreachable; // bb5[0]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
72 }
73
74 bb6: {
75 StorageLive(_6); // bb6[0]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
76 _11 = const full_tested_match::promoted[0]; // bb6[1]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
77 // ty::Const
78 // + ty: &std::option::Option<i32>
79 // + val: Unevaluated(DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), [], 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(DefId(0:5 ~ match_false_edges[317d]::full_tested_match[0]), [], Some(promoted[0])) }
83 _6 = &(((*_11) as Some).0: i32); // bb6[2]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
84 _4 = &shallow _2; // bb6[3]: scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
85 StorageLive(_7); // bb6[4]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
86 _7 = const guard() -> [return: bb7, unwind: bb1]; // bb6[5]: 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]; // bb7[0]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
97 }
98
99 bb8: {
100 StorageDead(_7); // bb8[0]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38
101 FakeRead(ForMatchGuard, _4); // bb8[1]: scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
102 FakeRead(ForGuardBinding, _6); // bb8[2]: scope 0 at $DIR/match_false_edges.rs:16:26: 16:27
103 StorageLive(_5); // bb8[3]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
104 _5 = ((_2 as Some).0: i32); // bb8[4]: scope 0 at $DIR/match_false_edges.rs:16:14: 16:15
105 StorageLive(_8); // bb8[5]: scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
106 _8 = _5; // bb8[6]: scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
107 _1 = (const 1i32, move _8); // bb8[7]: 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); // bb8[8]: scope 2 at $DIR/match_false_edges.rs:16:36: 16:37
115 StorageDead(_5); // bb8[9]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38
116 StorageDead(_6); // bb8[10]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38
117 goto -> bb11; // bb8[11]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
118 }
119
120 bb9: {
121 StorageDead(_7); // bb9[0]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38
122 StorageDead(_6); // bb9[1]: scope 0 at $DIR/match_false_edges.rs:16:37: 16:38
123 goto -> bb4; // bb9[2]: scope 0 at $DIR/match_false_edges.rs:16:20: 16:27
124 }
125
126 bb10: {
127 StorageLive(_9); // bb10[0]: scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
128 _9 = ((_2 as Some).0: i32); // bb10[1]: scope 0 at $DIR/match_false_edges.rs:17:14: 17:15
129 StorageLive(_10); // bb10[2]: scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
130 _10 = _9; // bb10[3]: scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
131 _1 = (const 2i32, move _10); // bb10[4]: 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); // bb10[5]: scope 3 at $DIR/match_false_edges.rs:17:25: 17:26
139 StorageDead(_9); // bb10[6]: scope 0 at $DIR/match_false_edges.rs:17:26: 17:27
140 goto -> bb11; // bb10[7]: scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
141 }
142
143 bb11: {
144 StorageDead(_2); // bb11[0]: scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
145 StorageDead(_1); // bb11[1]: scope 0 at $DIR/match_false_edges.rs:19:6: 19:7
146 _0 = const (); // bb11[2]: 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; // bb11[3]: scope 0 at $DIR/match_false_edges.rs:20:2: 20:2
154 }
155 }