[ARM] MVE big endian bitcasts
[llvm-complete.git] / test / CodeGen / AArch64 / GlobalISel / legalizer-info-validation.mir
blobbd3f36d1ba919ae3989366861fe2245de63512a4
1 # RUN: llc -mtriple=aarch64-- -run-pass=legalizer %s \
2 # RUN:     -mcpu=cortex-a75 -o - 2>&1 | FileCheck %s --check-prefixes=CHECK
4 # RUN: llc -mtriple=aarch64-- -run-pass=legalizer %s -debug-only=legalizer-info \
5 # RUN:     -mcpu=cortex-a75 -o - 2>&1 | FileCheck %s --check-prefixes=CHECK,DEBUG
7 # REQUIRES: asserts
9 # The main purpose of this test is to make sure we don't over-relax
10 # LegalizerInfo validation and lose its ability to catch bugs.
12 # Watch out for every "SKIPPED: user-defined predicate detected" in the
13 # check-lines below and keep each and every one of them justified.
16 # DEBUG:      G_ADD (opcode [[ADD_OPC:[0-9]+]]): 1 type index
17 # DEBUG-NEXT: .. the first uncovered type index: 1, OK
19 # DEBUG-NEXT: G_SUB (opcode [[SUB_OPC:[0-9]+]]): 1 type index
20 # DEBUG-NEXT: .. opcode [[SUB_OPC]] is aliased to [[ADD_OPC]]
21 # DEBUG-NEXT: .. opcode [[ADD_OPC]] is aliased to 0
22 # DEBUG-NEXT: .. the first uncovered type index: 1, OK
24 # DEBUG-NEXT: G_MUL (opcode {{[0-9]+}}): 1 type index
25 # DEBUG:      .. the first uncovered type index: 1, OK
27 # DEBUG-NEXT: G_SDIV (opcode {{[0-9]+}}): 1 type index
28 # DEBUG:      .. the first uncovered type index: 1, OK
30 # DEBUG-NEXT: G_UDIV (opcode {{[0-9]+}}): 1 type index
31 # DEBUG:      .. the first uncovered type index: 1, OK
33 # DEBUG-NEXT: G_SREM (opcode {{[0-9]+}}): 1 type index
34 # DEBUG:      .. the first uncovered type index: 1, OK
36 # DEBUG-NEXT: G_UREM (opcode {{[0-9]+}}): 1 type index
37 # DEBUG:      .. the first uncovered type index: 1, OK
39 # DEBUG-NEXT: G_AND (opcode {{[0-9]+}}): 1 type index
40 # DEBUG:      .. the first uncovered type index: 1, OK
42 # DEBUG-NEXT: G_OR (opcode {{[0-9]+}}): 1 type index
43 # DEBUG:      .. the first uncovered type index: 1, OK
45 # DEBUG-NEXT: G_XOR (opcode {{[0-9]+}}): 1 type index
46 # DEBUG:      .. the first uncovered type index: 1, OK
48 # DEBUG-NEXT: G_IMPLICIT_DEF (opcode {{[0-9]+}}): 1 type index
49 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
51 # DEBUG-NEXT: G_PHI (opcode {{[0-9]+}}): 1 type index
52 # DEBUG:      .. the first uncovered type index: 1, OK
54 # DEBUG-NEXT: G_FRAME_INDEX (opcode {{[0-9]+}}): 1 type index
55 # DEBUG:      .. the first uncovered type index: 1, OK
57 # DEBUG-NEXT: G_GLOBAL_VALUE (opcode {{[0-9]+}}): 1 type index
58 # DEBUG:      .. the first uncovered type index: 1, OK
60 # DEBUG-NEXT: G_EXTRACT (opcode {{[0-9]+}}): 2 type indices
61 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
63 # DEBUG-NEXT: G_UNMERGE_VALUES (opcode {{[0-9]+}}): 2 type indices
64 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
66 # DEBUG-NEXT: G_INSERT (opcode {{[0-9]+}}): 2 type indices
67 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
69 # DEBUG-NEXT: G_MERGE_VALUES (opcode {{[0-9]+}}): 2 type indices
70 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
72 # DEBUG-NEXT: G_BUILD_VECTOR (opcode {{[0-9]+}}): 2 type indices
73 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
75 # DEBUG-NEXT: G_BUILD_VECTOR_TRUNC (opcode {{[0-9]+}}): 2 type indices
76 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
78 # DEBUG-NEXT: G_CONCAT_VECTORS (opcode {{[0-9]+}}): 2 type indices
79 # DEBUG:      .. the first uncovered type index: 2, OK
81 # DEBUG-NEXT: G_PTRTOINT (opcode {{[0-9]+}}): 2 type indices
82 # DEBUG:      .. the first uncovered type index: 2, OK
84 # DEBUG-NEXT: G_INTTOPTR (opcode {{[0-9]+}}): 2 type indices
85 # DEBUG:      .. the first uncovered type index: 2, OK
87 # DEBUG-NEXT: G_BITCAST (opcode {{[0-9]+}}): 2 type indices
88 # DEBUG:      .. the first uncovered type index: 2, OK
90 # DEBUG-NEXT: G_INTRINSIC_TRUNC (opcode {{[0-9]+}}): 1 type index
91 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
93 # DEBUG-NEXT: G_INTRINSIC_ROUND (opcode {{[0-9]+}}): 1 type index
94 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
96 # DEBUG-NEXT: G_LOAD (opcode {{[0-9]+}}): 2 type indices
97 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
99 # DEBUG-NEXT: G_SEXTLOAD (opcode {{[0-9]+}}): 2 type indices
100 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
102 # DEBUG-NEXT: G_ZEXTLOAD (opcode {{[0-9]+}}): 2 type indices
103 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
105 # DEBUG-NEXT: G_STORE (opcode {{[0-9]+}}): 2 type indices
106 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
108 # DEBUG-NEXT: G_ATOMIC_CMPXCHG_WITH_SUCCESS (opcode {{[0-9]+}}): 3 type indices
109 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
111 # DEBUG-NEXT: G_ATOMIC_CMPXCHG (opcode {{[0-9]+}}): 2 type indices
112 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
114 # DEBUG-NEXT: G_ATOMICRMW_XCHG (opcode {{[0-9]+}}): 2 type indices
115 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
117 # DEBUG-NEXT: G_ATOMICRMW_ADD (opcode {{[0-9]+}}): 2 type indices
118 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
120 # DEBUG-NEXT: G_ATOMICRMW_SUB (opcode {{[0-9]+}}): 2 type indices
121 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
123 # DEBUG-NEXT: G_ATOMICRMW_AND (opcode {{[0-9]+}}): 2 type indices
124 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
126 # DEBUG-NEXT: G_ATOMICRMW_NAND (opcode {{[0-9]+}}): 2 type indices
127 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
129 # DEBUG-NEXT: G_ATOMICRMW_OR (opcode {{[0-9]+}}): 2 type indices
130 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
132 # DEBUG-NEXT: G_ATOMICRMW_XOR (opcode {{[0-9]+}}): 2 type indices
133 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
135 # DEBUG-NEXT: G_ATOMICRMW_MAX (opcode {{[0-9]+}}): 2 type indices
136 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
138 # DEBUG-NEXT: G_ATOMICRMW_MIN (opcode {{[0-9]+}}): 2 type indices
139 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
141 # DEBUG-NEXT: G_ATOMICRMW_UMAX (opcode {{[0-9]+}}): 2 type indices
142 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
144 # DEBUG-NEXT: G_ATOMICRMW_UMIN (opcode {{[0-9]+}}): 2 type indices
145 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
147 # DEBUG-NEXT: G_ATOMICRMW_FADD (opcode {{[0-9]+}}): 2 type indices
148 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
150 # DEBUG-NEXT: G_ATOMICRMW_FSUB (opcode {{[0-9]+}}): 2 type indices
151 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
153 # DEBUG-NEXT: G_FENCE (opcode {{[0-9]+}}): 0 type indices
154 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
156 # DEBUG-NEXT: G_BRCOND (opcode {{[0-9]+}}): 1 type index
157 # DEBUG:      .. the first uncovered type index: 1, OK
159 # DEBUG-NEXT: G_BRINDIRECT (opcode {{[0-9]+}}): 1 type index
160 # DEBUG:      .. the first uncovered type index: 1, OK
162 # DEBUG-NEXT: G_INTRINSIC (opcode {{[0-9]+}}): 0 type indices
163 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
165 # DEBUG-NEXT: G_INTRINSIC_W_SIDE_EFFECTS (opcode {{[0-9]+}}): 0 type indices
166 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
168 # DEBUG-NEXT: G_ANYEXT (opcode {{[0-9]+}}): 2 type indices
169 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
171 # DEBUG-NEXT: G_TRUNC (opcode {{[0-9]+}}): 2 type indices
172 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
174 # DEBUG-NEXT: G_CONSTANT (opcode {{[0-9]+}}): 1 type index
175 # DEBUG:      .. the first uncovered type index: 1, OK
177 # DEBUG-NEXT: G_FCONSTANT (opcode {{[0-9]+}}): 1 type index
178 # DEBUG:      .. the first uncovered type index: 1, OK
180 # DEBUG-NEXT: G_VASTART (opcode {{[0-9]+}}): 1 type index
181 # DEBUG:      .. the first uncovered type index: 1, OK
183 # DEBUG-NEXT: G_VAARG (opcode {{[0-9]+}}): 2 type indices
184 # DEBUG:      .. the first uncovered type index: 2, OK
186 # DEBUG-NEXT: G_SEXT (opcode {{[0-9]+}}): 2 type indices
187 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
189 # DEBUG-NEXT: G_ZEXT (opcode {{[0-9]+}}): 2 type indices
190 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
192 # DEBUG-NEXT: G_SHL (opcode {{[0-9]+}}): 2 type indices
193 # DEBUG:.. type index coverage check SKIPPED: user-defined predicate detected
195 # DEBUG-NEXT: G_LSHR (opcode {{[0-9]+}}): 2 type indices
196 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
198 # DEBUG-NEXT: G_ASHR (opcode {{[0-9]+}}): 2 type indices
199 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
201 # DEBUG-NEXT: G_ICMP (opcode {{[0-9]+}}): 2 type indices
202 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
204 # DEBUG-NEXT: G_FCMP (opcode {{[0-9]+}}): 2 type indices
205 # DEBUG:      .. the first uncovered type index: 2, OK
207 # DEBUG-NEXT: G_SELECT (opcode {{[0-9]+}}): 2 type indices
208 # DEBUG:      .. the first uncovered type index: 2, OK
210 # DEBUG-NEXT: G_UADDO (opcode {{[0-9]+}}): 2 type indices
211 # DEBUG:      .. the first uncovered type index: 2, OK
213 # DEBUG-NEXT: G_UADDE (opcode {{[0-9]+}}): 2 type indices
214 # DEBUG:      .. the first uncovered type index: 2, OK
216 # DEBUG-NEXT: G_USUBO (opcode {{[0-9]+}}): 2 type indices
217 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
219 # DEBUG-NEXT: G_USUBE (opcode {{[0-9]+}}): 2 type indices
220 # DEBUG:      .. the first uncovered type index: 2, OK
222 # DEBUG-NEXT: G_SADDO (opcode {{[0-9]+}}): 2 type indices
223 # DEBUG:      .. the first uncovered type index: 2, OK
225 # DEBUG-NEXT: G_SADDE (opcode {{[0-9]+}}): 2 type indices
226 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
228 # DEBUG-NEXT: G_SSUBO (opcode {{[0-9]+}}): 2 type indices
229 # DEBUG:      .. the first uncovered type index: 2, OK
231 # DEBUG-NEXT: G_SSUBE (opcode {{[0-9]+}}): 2 type indices
232 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
234 # DEBUG-NEXT: G_UMULO (opcode {{[0-9]+}}): 2 type indices
235 # DEBUG:      .. the first uncovered type index: 2, OK
237 # DEBUG-NEXT: G_SMULO (opcode {{[0-9]+}}): 2 type indices
238 # DEBUG:      .. the first uncovered type index: 2, OK
240 # DEBUG-NEXT: G_UMULH (opcode {{[0-9]+}}): 1 type index
241 # DEBUG:      .. the first uncovered type index: 1, OK
243 # DEBUG-NEXT: G_SMULH (opcode {{[0-9]+}}): 1 type index
244 # DEBUG:      .. the first uncovered type index: 1, OK
246 # DEBUG-NEXT: G_FADD (opcode {{[0-9]+}}): 1 type index
247 # DEBUG:      .. the first uncovered type index: 1, OK
249 # DEBUG-NEXT: G_FSUB (opcode {{[0-9]+}}): 1 type index
250 # DEBUG:      .. the first uncovered type index: 1, OK
252 # DEBUG-NEXT: G_FMUL (opcode {{[0-9]+}}): 1 type index
253 # DEBUG:      .. the first uncovered type index: 1, OK
255 # DEBUG-NEXT: G_FMA (opcode {{[0-9]+}}): 1 type index
256 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
258 # DEBUG-NEXT: G_FDIV (opcode {{[0-9]+}}): 1 type index
259 # DEBUG:      .. the first uncovered type index: 1, OK
261 # DEBUG-NEXT: G_FREM (opcode {{[0-9]+}}): 1 type index
262 # DEBUG:      .. the first uncovered type index: 1, OK
264 # DEBUG-NEXT: G_FPOW (opcode {{[0-9]+}}): 1 type index
265 # DEBUG:      .. the first uncovered type index: 1, OK
267 # DEBUG-NEXT: G_FEXP (opcode {{[0-9]+}}): 1 type index
268 # DEBUG:      .. the first uncovered type index: 1, OK
270 # DEBUG-NEXT: G_FEXP2 (opcode {{[0-9]+}}): 1 type index
271 # DEBUG:      .. the first uncovered type index: 1, OK
273 # DEBUG-NEXT: G_FLOG (opcode {{[0-9]+}}): 1 type index
274 # DEBUG:      .. the first uncovered type index: 1, OK
276 # DEBUG-NEXT: G_FLOG2 (opcode {{[0-9]+}}): 1 type index
277 # DEBUG:      .. the first uncovered type index: 1, OK
279 # DEBUG-NEXT: G_FLOG10 (opcode {{[0-9]+}}): 1 type index
280 # DEBUG:      .. the first uncovered type index: 1, OK
282 # DEBUG-NEXT: G_FNEG (opcode {{[0-9]+}}): 1 type index
283 # DEBUG:      .. the first uncovered type index: 1, OK
285 # DEBUG-NEXT: G_FPEXT (opcode {{[0-9]+}}): 2 type indices
286 # DEBUG:      .. the first uncovered type index: 2, OK
288 # DEBUG-NEXT: G_FPTRUNC (opcode {{[0-9]+}}): 2 type indices
289 # DEBUG:      .. the first uncovered type index: 2, OK
291 # DEBUG-NEXT: G_FPTOSI (opcode {{[0-9]+}}): 2 type indices
292 # DEBUG:      .. the first uncovered type index: 2, OK
294 # DEBUG-NEXT: G_FPTOUI (opcode {{[0-9]+}}): 2 type indices
295 # DEBUG:      .. the first uncovered type index: 2, OK
297 # DEBUG-NEXT: G_SITOFP (opcode {{[0-9]+}}): 2 type indices
298 # DEBUG:      .. the first uncovered type index: 2, OK
300 # DEBUG-NEXT: G_UITOFP (opcode {{[0-9]+}}): 2 type indices
301 # DEBUG:      .. the first uncovered type index: 2, OK
303 # DEBUG-NEXT: G_FABS (opcode {{[0-9]+}}): 1 type index
304 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
306 # DEBUG-NEXT: G_FCOPYSIGN (opcode {{[0-9]+}}): 2 type indices
307 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
309 # DEBUG-NEXT: G_FCANONICALIZE (opcode {{[0-9]+}}): 1 type index
310 # DEBUG: .. type index coverage check SKIPPED: no rules defined
312 # DEBUG-NEXT: G_FMINNUM (opcode {{[0-9]+}}): 1 type index
313 # DEBUG: .. type index coverage check SKIPPED: no rules defined
315 # DEBUG-NEXT: G_FMAXNUM (opcode {{[0-9]+}}): 1 type index
316 # DEBUG: .. type index coverage check SKIPPED: no rules defined
318 # DEBUG-NEXT: G_FMINNUM_IEEE (opcode {{[0-9]+}}): 1 type index
319 # DEBUG: .. type index coverage check SKIPPED: no rules defined
321 # DEBUG-NEXT: G_FMAXNUM_IEEE (opcode {{[0-9]+}}): 1 type index
322 # DEBUG: .. type index coverage check SKIPPED: no rules defined
324 # DEBUG-NEXT: G_FMINIMUM (opcode {{[0-9]+}}): 1 type index
325 # DEBUG: .. type index coverage check SKIPPED: no rules defined
327 # DEBUG-NEXT: G_FMAXIMUM (opcode {{[0-9]+}}): 1 type index
328 # DEBUG: .. type index coverage check SKIPPED: no rules defined
330 # DEBUG-NEXT: G_GEP (opcode {{[0-9]+}}): 2 type indices
331 # DEBUG:      .. the first uncovered type index: 2, OK
333 # DEBUG-NEXT: G_PTR_MASK (opcode {{[0-9]+}}): 1 type index
334 # DEBUG:      .. the first uncovered type index: 1, OK
336 # DEBUG: G_SMIN (opcode {{[0-9]+}}): 1 type index
337 # DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
339 # DEBUG: G_SMAX (opcode {{[0-9]+}}): 1 type index
340 # DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
342 # DEBUG: G_UMIN (opcode {{[0-9]+}}): 1 type index
343 # DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
345 # DEBUG: G_UMAX (opcode {{[0-9]+}}): 1 type index
346 # DEBUG-NEXT: .. type index coverage check SKIPPED: no rules defined
348 # DEBUG-NEXT: G_BR (opcode {{[0-9]+}}): 0 type indices
349 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
351 # DEBUG-NEXT: G_BRJT (opcode {{[0-9]+}}): 2 type indices
352 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
354 # DEBUG-NEXT: G_INSERT_VECTOR_ELT (opcode {{[0-9]+}}): 3 type indices
355 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
357 # DEBUG-NEXT: G_EXTRACT_VECTOR_ELT (opcode {{[0-9]+}}): 3 type indices
358 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
360 # DEBUG-NEXT: G_SHUFFLE_VECTOR (opcode {{[0-9]+}}): 3 type indices
361 # DEBUG:      .. type index coverage check SKIPPED: user-defined predicate detected
363 # DEBUG-NEXT: G_CTTZ (opcode {{[0-9]+}}): 2 type indices
364 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
366 # DEBUG-NEXT: G_CTTZ_ZERO_UNDEF (opcode {{[0-9]+}}): 2 type indices
367 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
369 # DEBUG-NEXT: G_CTLZ (opcode {{[0-9]+}}): 2 type indices
370 # DEBUG:      .. the first uncovered type index: 2, OK
372 # DEBUG-NEXT: G_CTLZ_ZERO_UNDEF (opcode {{[0-9]+}}): 2 type indices
373 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
375 # DEBUG-NEXT: G_CTPOP (opcode {{[0-9]+}}): 2 type indices
376 # DEBUG:      .. type index coverage check SKIPPED: no rules defined
378 # DEBUG-NEXT: G_BSWAP (opcode {{[0-9]+}}): 1 type index
379 # DEBUG:      .. the first uncovered type index: 1, OK
381 # DEBUG-NEXT: G_FCEIL (opcode {{[0-9]+}}): 1 type index
382 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
384 # DEBUG-NEXT: G_FCOS (opcode {{[0-9]+}}): 1 type index
385 # DEBUG: .. the first uncovered type index: 1, OK
387 # DEBUG-NEXT: G_FSIN (opcode {{[0-9]+}}): 1 type index
388 # DEBUG: .. the first uncovered type index: 1, OK
390 # DEBUG-NEXT: G_FSQRT (opcode {{[0-9]+}}): 1 type index
391 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
393 # DEBUG-NEXT: G_FFLOOR (opcode {{[0-9]+}}): 1 type index
394 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
396 # DEBUG-NEXT: G_FRINT (opcode {{[0-9]+}}): 1 type index
397 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
399 # DEBUG-NEXT: G_FNEARBYINT (opcode {{[0-9]+}}): 1 type index
400 # DEBUG: .. type index coverage check SKIPPED: user-defined predicate detected
402 # CHECK-NOT: ill-defined
405 name: dummy
406 body: |
407   bb.0: