summary refs log tree commit diff
path: root/tests/mir-opt/gvn.wide_ptr_ops.GVN.panic-abort.diff
blob: e49d759b8fc31c239e6352cf307f1747b6332c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
- // MIR for `wide_ptr_ops` before GVN
+ // MIR for `wide_ptr_ops` after GVN
  
  fn wide_ptr_ops() -> () {
      let mut _0: ();
      let _1: *const dyn std::marker::Send;
      let mut _2: *const dyn std::marker::Send;
      let _3: &dyn std::marker::Send;
      let mut _4: &i32;
      let _5: &i32;
      let _6: i32;
      let mut _8: *const dyn std::marker::Send;
      let _9: &dyn std::marker::Send;
      let mut _10: &i32;
      let _11: &i32;
      let _12: i32;
      let mut _14: *const dyn std::marker::Send;
      let mut _15: *const dyn std::marker::Send;
      let mut _16: *const dyn std::marker::Send;
      let mut _18: *const dyn std::marker::Send;
      let mut _19: *const dyn std::marker::Send;
      let mut _20: *const dyn std::marker::Send;
      let mut _22: *const dyn std::marker::Send;
      let mut _23: *const dyn std::marker::Send;
      let mut _24: *const dyn std::marker::Send;
      let mut _26: *const dyn std::marker::Send;
      let mut _27: *const dyn std::marker::Send;
      let mut _28: *const dyn std::marker::Send;
      let mut _30: *const dyn std::marker::Send;
      let mut _31: *const dyn std::marker::Send;
      let mut _32: *const dyn std::marker::Send;
      let mut _34: *const dyn std::marker::Send;
      let mut _35: *const dyn std::marker::Send;
      let mut _36: *const dyn std::marker::Send;
      let mut _38: (usize, usize);
      let mut _40: (usize, usize);
      let _41: ();
      let mut _42: bool;
      let mut _43: bool;
      let mut _44: *const [u8];
      let mut _45: *const [u8];
      let _46: ();
      let mut _47: bool;
      let mut _48: *const [u8];
      let mut _49: *const [u8];
      let _50: ();
      let mut _51: bool;
      let mut _52: *const [u8];
      let mut _53: *const [u8];
      let _54: ();
      let mut _55: bool;
      let mut _56: *const [u8];
      let mut _57: *const [u8];
      let _58: ();
      let mut _59: bool;
      let mut _60: bool;
      let mut _61: *const [u8];
      let mut _62: *const [u8];
      let _63: ();
      let mut _64: bool;
      let mut _65: bool;
      let mut _66: *const [u8];
      let mut _67: *const [u8];
      let mut _69: &i32;
      scope 1 {
          debug a => _1;
          let _7: *const dyn std::marker::Send;
          let mut _68: &i32;
          scope 2 {
              debug b => _7;
              let _13: bool;
              scope 3 {
                  debug _val => _13;
                  let _17: bool;
                  scope 4 {
                      debug _val => _17;
                      let _21: bool;
                      scope 5 {
                          debug _val => _21;
                          let _25: bool;
                          scope 6 {
                              debug _val => _25;
                              let _29: bool;
                              scope 7 {
                                  debug _val => _29;
                                  let _33: bool;
                                  scope 8 {
                                      debug _val => _33;
                                      let _37: *const [u8];
                                      scope 9 {
                                          debug a => _37;
                                          let _39: *const [u8];
                                          scope 11 {
                                              debug b => _39;
                                          }
                                          scope 12 {
                                          }
                                      }
                                      scope 10 {
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
  
      bb0: {
-         StorageLive(_1);
+         nop;
          StorageLive(_2);
          StorageLive(_3);
          StorageLive(_4);
          StorageLive(_5);
          _69 = const _;
          _5 = &(*_69);
          _4 = &(*_5);
          _3 = move _4 as &dyn std::marker::Send (PointerCoercion(Unsize));
          StorageDead(_4);
          _2 = &raw const (*_3);
          _1 = move _2 as *const dyn std::marker::Send (PointerCoercion(Unsize));
          StorageDead(_2);
          StorageDead(_5);
          StorageDead(_3);
-         StorageLive(_7);
+         nop;
          StorageLive(_8);
          StorageLive(_9);
          StorageLive(_10);
          StorageLive(_11);
          _68 = const _;
          _11 = &(*_68);
          _10 = &(*_11);
          _9 = move _10 as &dyn std::marker::Send (PointerCoercion(Unsize));
          StorageDead(_10);
          _8 = &raw const (*_9);
          _7 = move _8 as *const dyn std::marker::Send (PointerCoercion(Unsize));
          StorageDead(_8);
          StorageDead(_11);
          StorageDead(_9);
          StorageLive(_13);
          StorageLive(_14);
          _14 = _1;
-         StorageLive(_15);
+         nop;
          StorageLive(_16);
          _16 = _7;
-         _15 = move _16 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _15 = _7 as *const dyn std::marker::Send (PointerCoercion(Unsize));
          StorageDead(_16);
-         _13 = Eq(move _14, move _15);
-         StorageDead(_15);
+         _13 = Eq(_1, _15);
+         nop;
          StorageDead(_14);
          StorageLive(_17);
          StorageLive(_18);
          _18 = _1;
          StorageLive(_19);
          StorageLive(_20);
          _20 = _7;
-         _19 = move _20 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _19 = _15;
          StorageDead(_20);
-         _17 = Ne(move _18, move _19);
+         _17 = Ne(_1, _15);
          StorageDead(_19);
          StorageDead(_18);
          StorageLive(_21);
          StorageLive(_22);
          _22 = _1;
          StorageLive(_23);
          StorageLive(_24);
          _24 = _7;
-         _23 = move _24 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _23 = _15;
          StorageDead(_24);
-         _21 = Lt(move _22, move _23);
+         _21 = Lt(_1, _15);
          StorageDead(_23);
          StorageDead(_22);
          StorageLive(_25);
          StorageLive(_26);
          _26 = _1;
          StorageLive(_27);
          StorageLive(_28);
          _28 = _7;
-         _27 = move _28 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _27 = _15;
          StorageDead(_28);
-         _25 = Le(move _26, move _27);
+         _25 = Le(_1, _15);
          StorageDead(_27);
          StorageDead(_26);
          StorageLive(_29);
          StorageLive(_30);
          _30 = _1;
          StorageLive(_31);
          StorageLive(_32);
          _32 = _7;
-         _31 = move _32 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _31 = _15;
          StorageDead(_32);
-         _29 = Gt(move _30, move _31);
+         _29 = Gt(_1, _15);
          StorageDead(_31);
          StorageDead(_30);
          StorageLive(_33);
          StorageLive(_34);
          _34 = _1;
          StorageLive(_35);
          StorageLive(_36);
          _36 = _7;
-         _35 = move _36 as *const dyn std::marker::Send (PointerCoercion(Unsize));
+         _35 = _15;
          StorageDead(_36);
-         _33 = Ge(move _34, move _35);
+         _33 = Ge(_1, _15);
          StorageDead(_35);
          StorageDead(_34);
-         StorageLive(_37);
+         nop;
          StorageLive(_38);
-         _38 = (const 1_usize, const 1_usize);
-         _37 = move _38 as *const [u8] (Transmute);
+         _38 = const (1_usize, 1_usize);
+         _37 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageDead(_38);
-         StorageLive(_39);
+         nop;
          StorageLive(_40);
-         _40 = (const 1_usize, const 2_usize);
-         _39 = move _40 as *const [u8] (Transmute);
+         _40 = const (1_usize, 2_usize);
+         _39 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
          StorageDead(_40);
          StorageLive(_41);
-         StorageLive(_42);
+         nop;
          StorageLive(_43);
          StorageLive(_44);
-         _44 = _37;
+         _44 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_45);
-         _45 = _39;
-         _43 = Eq(move _44, move _45);
+         _45 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _43 = Eq(const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8], const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8]);
          StorageDead(_45);
          StorageDead(_44);
          _42 = Not(move _43);
          StorageDead(_43);
-         _41 = opaque::<bool>(move _42) -> [return: bb1, unwind unreachable];
+         _41 = opaque::<bool>(_42) -> [return: bb1, unwind unreachable];
      }
  
      bb1: {
-         StorageDead(_42);
+         nop;
          StorageDead(_41);
          StorageLive(_46);
          StorageLive(_47);
          StorageLive(_48);
-         _48 = _37;
+         _48 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_49);
-         _49 = _39;
-         _47 = Ne(move _48, move _49);
+         _49 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _47 = _42;
          StorageDead(_49);
          StorageDead(_48);
-         _46 = opaque::<bool>(move _47) -> [return: bb2, unwind unreachable];
+         _46 = opaque::<bool>(_42) -> [return: bb2, unwind unreachable];
      }
  
      bb2: {
          StorageDead(_47);
          StorageDead(_46);
          StorageLive(_50);
          StorageLive(_51);
          StorageLive(_52);
-         _52 = _37;
+         _52 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_53);
-         _53 = _39;
-         _51 = Le(move _52, move _53);
+         _53 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _51 = Le(const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8], const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8]);
          StorageDead(_53);
          StorageDead(_52);
          _50 = opaque::<bool>(move _51) -> [return: bb3, unwind unreachable];
      }
  
      bb3: {
          StorageDead(_51);
          StorageDead(_50);
          StorageLive(_54);
          StorageLive(_55);
          StorageLive(_56);
-         _56 = _37;
+         _56 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_57);
-         _57 = _39;
-         _55 = Lt(move _56, move _57);
+         _57 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _55 = Lt(const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8], const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8]);
          StorageDead(_57);
          StorageDead(_56);
          _54 = opaque::<bool>(move _55) -> [return: bb4, unwind unreachable];
      }
  
      bb4: {
          StorageDead(_55);
          StorageDead(_54);
          StorageLive(_58);
          StorageLive(_59);
          StorageLive(_60);
          StorageLive(_61);
-         _61 = _37;
+         _61 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_62);
-         _62 = _39;
-         _60 = Ge(move _61, move _62);
+         _62 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _60 = Ge(const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8], const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8]);
          StorageDead(_62);
          StorageDead(_61);
          _59 = Not(move _60);
          StorageDead(_60);
          _58 = opaque::<bool>(move _59) -> [return: bb5, unwind unreachable];
      }
  
      bb5: {
          StorageDead(_59);
          StorageDead(_58);
          StorageLive(_63);
          StorageLive(_64);
          StorageLive(_65);
          StorageLive(_66);
-         _66 = _37;
+         _66 = const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8];
          StorageLive(_67);
-         _67 = _39;
-         _65 = Gt(move _66, move _67);
+         _67 = const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8];
+         _65 = Gt(const Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [u8], const Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [u8]);
          StorageDead(_67);
          StorageDead(_66);
          _64 = Not(move _65);
          StorageDead(_65);
          _63 = opaque::<bool>(move _64) -> [return: bb6, unwind unreachable];
      }
  
      bb6: {
          StorageDead(_64);
          StorageDead(_63);
          _0 = const ();
-         StorageDead(_39);
-         StorageDead(_37);
+         nop;
+         nop;
          StorageDead(_33);
          StorageDead(_29);
          StorageDead(_25);
          StorageDead(_21);
          StorageDead(_17);
          StorageDead(_13);
-         StorageDead(_7);
-         StorageDead(_1);
+         nop;
+         nop;
          return;
      }
+ }
+ 
+ ALLOC1 (size: 16, align: 8) {
+     01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 │ ................
+ }
+ 
+ ALLOC0 (size: 16, align: 8) {
+     01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
  }