]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/issue_99325.main.built.after.64bit.mir
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / issue_99325.main.built.after.64bit.mir
1 // MIR for `main` after built
2
3 | User Type Annotations
4 | 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
5 | 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
6 |
7 fn main() -> () {
8 let mut _0: ();
9 let _1: ();
10 let mut _2: (&&[u8], &&[u8; 4]);
11 let mut _3: &&[u8];
12 let _4: &[u8];
13 let mut _5: &&[u8; 4];
14 let _6: &[u8; 4];
15 let _7: [u8; 4];
16 let _8: &&[u8];
17 let _9: &&[u8; 4];
18 let mut _10: bool;
19 let mut _11: &&[u8];
20 let mut _12: &&[u8; 4];
21 let mut _13: !;
22 let _15: !;
23 let mut _16: core::panicking::AssertKind;
24 let mut _17: &&[u8];
25 let _18: &&[u8];
26 let mut _19: &&[u8; 4];
27 let _20: &&[u8; 4];
28 let mut _21: std::option::Option<std::fmt::Arguments<'_>>;
29 let _22: ();
30 let mut _23: (&&[u8], &&[u8; 4]);
31 let mut _24: &&[u8];
32 let _25: &[u8];
33 let mut _26: &&[u8; 4];
34 let _27: &[u8; 4];
35 let _28: &&[u8];
36 let _29: &&[u8; 4];
37 let mut _30: bool;
38 let mut _31: &&[u8];
39 let mut _32: &&[u8; 4];
40 let mut _33: !;
41 let _35: !;
42 let mut _36: core::panicking::AssertKind;
43 let mut _37: &&[u8];
44 let _38: &&[u8];
45 let mut _39: &&[u8; 4];
46 let _40: &&[u8; 4];
47 let mut _41: std::option::Option<std::fmt::Arguments<'_>>;
48 scope 1 {
49 debug left_val => _8;
50 debug right_val => _9;
51 let _14: core::panicking::AssertKind;
52 scope 2 {
53 debug kind => _14;
54 }
55 }
56 scope 3 {
57 debug left_val => _28;
58 debug right_val => _29;
59 let _34: core::panicking::AssertKind;
60 scope 4 {
61 debug kind => _34;
62 }
63 }
64
65 bb0: {
66 StorageLive(_1);
67 StorageLive(_2);
68 StorageLive(_3);
69 StorageLive(_4);
70 _4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb21];
71 }
72
73 bb1: {
74 _3 = &_4;
75 StorageLive(_5);
76 StorageLive(_6);
77 StorageLive(_7);
78 _7 = [const 65_u8, const 65_u8, const 65_u8, const 65_u8];
79 _6 = &_7;
80 _5 = &_6;
81 _2 = (move _3, move _5);
82 StorageDead(_5);
83 StorageDead(_3);
84 FakeRead(ForMatchedPlace(None), _2);
85 StorageLive(_8);
86 _8 = (_2.0: &&[u8]);
87 StorageLive(_9);
88 _9 = (_2.1: &&[u8; 4]);
89 StorageLive(_10);
90 StorageLive(_11);
91 _11 = &(*_8);
92 StorageLive(_12);
93 _12 = &(*_9);
94 _10 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _11, move _12) -> [return: bb2, unwind: bb21];
95 }
96
97 bb2: {
98 switchInt(move _10) -> [0: bb4, otherwise: bb3];
99 }
100
101 bb3: {
102 StorageDead(_12);
103 StorageDead(_11);
104 goto -> bb8;
105 }
106
107 bb4: {
108 goto -> bb5;
109 }
110
111 bb5: {
112 StorageDead(_12);
113 StorageDead(_11);
114 StorageLive(_14);
115 _14 = core::panicking::AssertKind::Eq;
116 FakeRead(ForLet(None), _14);
117 StorageLive(_15);
118 StorageLive(_16);
119 _16 = move _14;
120 StorageLive(_17);
121 StorageLive(_18);
122 _18 = &(*_8);
123 _17 = &(*_18);
124 StorageLive(_19);
125 StorageLive(_20);
126 _20 = &(*_9);
127 _19 = &(*_20);
128 StorageLive(_21);
129 _21 = Option::<Arguments<'_>>::None;
130 _15 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _16, move _17, move _19, move _21) -> bb21;
131 }
132
133 bb6: {
134 StorageDead(_21);
135 StorageDead(_19);
136 StorageDead(_17);
137 StorageDead(_16);
138 StorageDead(_20);
139 StorageDead(_18);
140 StorageDead(_15);
141 StorageDead(_14);
142 unreachable;
143 }
144
145 bb7: {
146 goto -> bb9;
147 }
148
149 bb8: {
150 _1 = const ();
151 goto -> bb9;
152 }
153
154 bb9: {
155 StorageDead(_10);
156 StorageDead(_9);
157 StorageDead(_8);
158 goto -> bb10;
159 }
160
161 bb10: {
162 StorageDead(_7);
163 StorageDead(_6);
164 StorageDead(_4);
165 StorageDead(_2);
166 StorageDead(_1);
167 StorageLive(_22);
168 StorageLive(_23);
169 StorageLive(_24);
170 StorageLive(_25);
171 _25 = function_with_bytes::<&*b"AAAA">() -> [return: bb11, unwind: bb21];
172 }
173
174 bb11: {
175 _24 = &_25;
176 StorageLive(_26);
177 StorageLive(_27);
178 _27 = const b"AAAA";
179 _26 = &_27;
180 _23 = (move _24, move _26);
181 StorageDead(_26);
182 StorageDead(_24);
183 FakeRead(ForMatchedPlace(None), _23);
184 StorageLive(_28);
185 _28 = (_23.0: &&[u8]);
186 StorageLive(_29);
187 _29 = (_23.1: &&[u8; 4]);
188 StorageLive(_30);
189 StorageLive(_31);
190 _31 = &(*_28);
191 StorageLive(_32);
192 _32 = &(*_29);
193 _30 = <&[u8] as PartialEq<&[u8; 4]>>::eq(move _31, move _32) -> [return: bb12, unwind: bb21];
194 }
195
196 bb12: {
197 switchInt(move _30) -> [0: bb14, otherwise: bb13];
198 }
199
200 bb13: {
201 StorageDead(_32);
202 StorageDead(_31);
203 goto -> bb18;
204 }
205
206 bb14: {
207 goto -> bb15;
208 }
209
210 bb15: {
211 StorageDead(_32);
212 StorageDead(_31);
213 StorageLive(_34);
214 _34 = core::panicking::AssertKind::Eq;
215 FakeRead(ForLet(None), _34);
216 StorageLive(_35);
217 StorageLive(_36);
218 _36 = move _34;
219 StorageLive(_37);
220 StorageLive(_38);
221 _38 = &(*_28);
222 _37 = &(*_38);
223 StorageLive(_39);
224 StorageLive(_40);
225 _40 = &(*_29);
226 _39 = &(*_40);
227 StorageLive(_41);
228 _41 = Option::<Arguments<'_>>::None;
229 _35 = core::panicking::assert_failed::<&[u8], &[u8; 4]>(move _36, move _37, move _39, move _41) -> bb21;
230 }
231
232 bb16: {
233 StorageDead(_41);
234 StorageDead(_39);
235 StorageDead(_37);
236 StorageDead(_36);
237 StorageDead(_40);
238 StorageDead(_38);
239 StorageDead(_35);
240 StorageDead(_34);
241 unreachable;
242 }
243
244 bb17: {
245 goto -> bb19;
246 }
247
248 bb18: {
249 _22 = const ();
250 goto -> bb19;
251 }
252
253 bb19: {
254 StorageDead(_30);
255 StorageDead(_29);
256 StorageDead(_28);
257 goto -> bb20;
258 }
259
260 bb20: {
261 StorageDead(_27);
262 StorageDead(_25);
263 StorageDead(_23);
264 StorageDead(_22);
265 _0 = const ();
266 return;
267 }
268
269 bb21 (cleanup): {
270 resume;
271 }
272 }
273
274 alloc4 (size: 4, align: 1) {
275 41 41 41 41 │ AAAA
276 }