LLVM  16.0.0git
MachineValueType.h
Go to the documentation of this file.
1 //===- Support/MachineValueType.h - Machine-Level types ---------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the set of machine-level target independent types which
10 // legal values in the code generator use.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_SUPPORT_MACHINEVALUETYPE_H
15 #define LLVM_SUPPORT_MACHINEVALUETYPE_H
16 
17 #include "llvm/ADT/Sequence.h"
21 #include "llvm/Support/TypeSize.h"
22 #include <cassert>
23 
24 namespace llvm {
25 
26  class Type;
27 
28  /// Machine Value Type. Every type that is supported natively by some
29  /// processor targeted by LLVM occurs here. This means that any legal value
30  /// type can be represented by an MVT.
31  class MVT {
32  public:
33  enum SimpleValueType : uint8_t {
34  // clang-format off
35 
36  // Simple value types that aren't explicitly part of this enumeration
37  // are considered extended value types.
39 
40  // If you change this numbering, you must change the values in
41  // ValueTypes.td as well!
42  Other = 1, // This is a non-standard value
43  i1 = 2, // This is a 1 bit integer value
44  i2 = 3, // This is a 2 bit integer value
45  i4 = 4, // This is a 4 bit integer value
46  i8 = 5, // This is an 8 bit integer value
47  i16 = 6, // This is a 16 bit integer value
48  i32 = 7, // This is a 32 bit integer value
49  i64 = 8, // This is a 64 bit integer value
50  i128 = 9, // This is a 128 bit integer value
51 
54 
55  bf16 = 10, // This is a 16 bit brain floating point value
56  f16 = 11, // This is a 16 bit floating point value
57  f32 = 12, // This is a 32 bit floating point value
58  f64 = 13, // This is a 64 bit floating point value
59  f80 = 14, // This is a 80 bit floating point value
60  f128 = 15, // This is a 128 bit floating point value
61  ppcf128 = 16, // This is a PPC 128-bit floating point value
62 
65 
66  v1i1 = 17, // 1 x i1
67  v2i1 = 18, // 2 x i1
68  v4i1 = 19, // 4 x i1
69  v8i1 = 20, // 8 x i1
70  v16i1 = 21, // 16 x i1
71  v32i1 = 22, // 32 x i1
72  v64i1 = 23, // 64 x i1
73  v128i1 = 24, // 128 x i1
74  v256i1 = 25, // 256 x i1
75  v512i1 = 26, // 512 x i1
76  v1024i1 = 27, // 1024 x i1
77  v2048i1 = 28, // 2048 x i1
78 
79  v128i2 = 29, // 128 x i2
80  v256i2 = 30, // 256 x i2
81 
82  v64i4 = 31, // 64 x i4
83  v128i4 = 32, // 128 x i4
84 
85  v1i8 = 33, // 1 x i8
86  v2i8 = 34, // 2 x i8
87  v4i8 = 35, // 4 x i8
88  v8i8 = 36, // 8 x i8
89  v16i8 = 37, // 16 x i8
90  v32i8 = 38, // 32 x i8
91  v64i8 = 39, // 64 x i8
92  v128i8 = 40, // 128 x i8
93  v256i8 = 41, // 256 x i8
94  v512i8 = 42, // 512 x i8
95  v1024i8 = 43, // 1024 x i8
96 
97  v1i16 = 44, // 1 x i16
98  v2i16 = 45, // 2 x i16
99  v3i16 = 46, // 3 x i16
100  v4i16 = 47, // 4 x i16
101  v8i16 = 48, // 8 x i16
102  v16i16 = 49, // 16 x i16
103  v32i16 = 50, // 32 x i16
104  v64i16 = 51, // 64 x i16
105  v128i16 = 52, // 128 x i16
106  v256i16 = 53, // 256 x i16
107  v512i16 = 54, // 512 x i16
108 
109  v1i32 = 55, // 1 x i32
110  v2i32 = 56, // 2 x i32
111  v3i32 = 57, // 3 x i32
112  v4i32 = 58, // 4 x i32
113  v5i32 = 59, // 5 x i32
114  v6i32 = 60, // 6 x i32
115  v7i32 = 61, // 7 x i32
116  v8i32 = 62, // 8 x i32
117  v9i32 = 63, // 9 x i32
118  v10i32 = 64, // 10 x i32
119  v11i32 = 65, // 11 x i32
120  v12i32 = 66, // 12 x i32
121  v16i32 = 67, // 16 x i32
122  v32i32 = 68, // 32 x i32
123  v64i32 = 69, // 64 x i32
124  v128i32 = 70, // 128 x i32
125  v256i32 = 71, // 256 x i32
126  v512i32 = 72, // 512 x i32
127  v1024i32 = 73, // 1024 x i32
128  v2048i32 = 74, // 2048 x i32
129 
130  v1i64 = 75, // 1 x i64
131  v2i64 = 76, // 2 x i64
132  v3i64 = 77, // 3 x i64
133  v4i64 = 78, // 4 x i64
134  v8i64 = 79, // 8 x i64
135  v16i64 = 80, // 16 x i64
136  v32i64 = 81, // 32 x i64
137  v64i64 = 82, // 64 x i64
138  v128i64 = 83, // 128 x i64
139  v256i64 = 84, // 256 x i64
140 
141  v1i128 = 85, // 1 x i128
142 
145 
146  v1f16 = 86, // 1 x f16
147  v2f16 = 87, // 2 x f16
148  v3f16 = 88, // 3 x f16
149  v4f16 = 89, // 4 x f16
150  v8f16 = 90, // 8 x f16
151  v16f16 = 91, // 16 x f16
152  v32f16 = 92, // 32 x f16
153  v64f16 = 93, // 64 x f16
154  v128f16 = 94, // 128 x f16
155  v256f16 = 95, // 256 x f16
156  v512f16 = 96, // 512 x f16
157 
158  v2bf16 = 97, // 2 x bf16
159  v3bf16 = 98, // 3 x bf16
160  v4bf16 = 99, // 4 x bf16
161  v8bf16 = 100, // 8 x bf16
162  v16bf16 = 101, // 16 x bf16
163  v32bf16 = 102, // 32 x bf16
164  v64bf16 = 103, // 64 x bf16
165  v128bf16 = 104, // 128 x bf16
166 
167  v1f32 = 105, // 1 x f32
168  v2f32 = 106, // 2 x f32
169  v3f32 = 107, // 3 x f32
170  v4f32 = 108, // 4 x f32
171  v5f32 = 109, // 5 x f32
172  v6f32 = 110, // 6 x f32
173  v7f32 = 111, // 7 x f32
174  v8f32 = 112, // 8 x f32
175  v9f32 = 113, // 9 x f32
176  v10f32 = 114, // 10 x f32
177  v11f32 = 115, // 11 x f32
178  v12f32 = 116, // 12 x f32
179  v16f32 = 117, // 16 x f32
180 
181  v32f32 = 118, // 32 x f32
182  v64f32 = 119, // 64 x f32
183  v128f32 = 120, // 128 x f32
184  v256f32 = 121, // 256 x f32
185  v512f32 = 122, // 512 x f32
186  v1024f32 = 123, // 1024 x f32
187  v2048f32 = 124, // 2048 x f32
188 
189  v1f64 = 125, // 1 x f64
190  v2f64 = 126, // 2 x f64
191  v3f64 = 127, // 3 x f64
192  v4f64 = 128, // 4 x f64
193  v8f64 = 129, // 8 x f64
194  v16f64 = 130, // 16 x f64
195  v32f64 = 131, // 32 x f64
196  v64f64 = 132, // 64 x f64
197  v128f64 = 133, // 128 x f64
198  v256f64 = 134, // 256 x f64
199 
202 
205 
206  nxv1i1 = 135, // n x 1 x i1
207  nxv2i1 = 136, // n x 2 x i1
208  nxv4i1 = 137, // n x 4 x i1
209  nxv8i1 = 138, // n x 8 x i1
210  nxv16i1 = 139, // n x 16 x i1
211  nxv32i1 = 140, // n x 32 x i1
212  nxv64i1 = 141, // n x 64 x i1
213 
214  nxv1i8 = 142, // n x 1 x i8
215  nxv2i8 = 143, // n x 2 x i8
216  nxv4i8 = 144, // n x 4 x i8
217  nxv8i8 = 145, // n x 8 x i8
218  nxv16i8 = 146, // n x 16 x i8
219  nxv32i8 = 147, // n x 32 x i8
220  nxv64i8 = 148, // n x 64 x i8
221 
222  nxv1i16 = 149, // n x 1 x i16
223  nxv2i16 = 150, // n x 2 x i16
224  nxv4i16 = 151, // n x 4 x i16
225  nxv8i16 = 152, // n x 8 x i16
226  nxv16i16 = 153, // n x 16 x i16
227  nxv32i16 = 154, // n x 32 x i16
228 
229  nxv1i32 = 155, // n x 1 x i32
230  nxv2i32 = 156, // n x 2 x i32
231  nxv4i32 = 157, // n x 4 x i32
232  nxv8i32 = 158, // n x 8 x i32
233  nxv16i32 = 159, // n x 16 x i32
234  nxv32i32 = 160, // n x 32 x i32
235 
236  nxv1i64 = 161, // n x 1 x i64
237  nxv2i64 = 162, // n x 2 x i64
238  nxv4i64 = 163, // n x 4 x i64
239  nxv8i64 = 164, // n x 8 x i64
240  nxv16i64 = 165, // n x 16 x i64
241  nxv32i64 = 166, // n x 32 x i64
242 
245 
246  nxv1f16 = 167, // n x 1 x f16
247  nxv2f16 = 168, // n x 2 x f16
248  nxv4f16 = 169, // n x 4 x f16
249  nxv8f16 = 170, // n x 8 x f16
250  nxv16f16 = 171, // n x 16 x f16
251  nxv32f16 = 172, // n x 32 x f16
252 
253  nxv1bf16 = 173, // n x 1 x bf16
254  nxv2bf16 = 174, // n x 2 x bf16
255  nxv4bf16 = 175, // n x 4 x bf16
256  nxv8bf16 = 176, // n x 8 x bf16
257  nxv16bf16 = 177, // n x 16 x bf16
258  nxv32bf16 = 178, // n x 32 x bf16
259 
260  nxv1f32 = 179, // n x 1 x f32
261  nxv2f32 = 180, // n x 2 x f32
262  nxv4f32 = 181, // n x 4 x f32
263  nxv8f32 = 182, // n x 8 x f32
264  nxv16f32 = 183, // n x 16 x f32
265 
266  nxv1f64 = 184, // n x 1 x f64
267  nxv2f64 = 185, // n x 2 x f64
268  nxv4f64 = 186, // n x 4 x f64
269  nxv8f64 = 187, // n x 8 x f64
270 
273 
276 
279 
280  x86mmx = 188, // This is an X86 MMX value
281 
282  Glue = 189, // This glues nodes together during pre-RA sched
283 
284  isVoid = 190, // This has no value
285 
286  Untyped = 191, // This value takes a register, but has
287  // unspecified type. The register class
288  // will be determined by the opcode.
289 
290  funcref = 192, // WebAssembly's funcref type
291  externref = 193, // WebAssembly's externref type
292  x86amx = 194, // This is an X86 AMX value
293  i64x8 = 195, // 8 Consecutive GPRs (AArch64)
294 
295  FIRST_VALUETYPE = 1, // This is always the beginning of the list.
296  LAST_VALUETYPE = i64x8, // This always remains at the end of the list.
298 
299  // This is the current maximum for LAST_VALUETYPE.
300  // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
301  // This value must be a multiple of 32.
303 
304  // A value of type llvm::TokenTy
305  token = 248,
306 
307  // This is MDNode or MDString.
308  Metadata = 249,
309 
310  // An int value the size of the pointer of the current
311  // target to any address space. This must only be used internal to
312  // tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
313  iPTRAny = 250,
314 
315  // A vector with any length and element size. This is used
316  // for intrinsics that have overloadings based on vector types.
317  // This is only for tblgen's consumption!
318  vAny = 251,
319 
320  // Any floating-point or vector floating-point value. This is used
321  // for intrinsics that have overloadings based on floating-point types.
322  // This is only for tblgen's consumption!
323  fAny = 252,
324 
325  // An integer or vector integer value of any bit width. This is
326  // used for intrinsics that have overloadings based on integer bit widths.
327  // This is only for tblgen's consumption!
328  iAny = 253,
329 
330  // An int value the size of the pointer of the current
331  // target. This should only be used internal to tblgen!
332  iPTR = 254,
333 
334  // Any type. This is used for intrinsics that have overloadings.
335  // This is only for tblgen's consumption!
336  Any = 255
337 
338  // clang-format on
339  };
340 
342 
343  constexpr MVT() = default;
344  constexpr MVT(SimpleValueType SVT) : SimpleTy(SVT) {}
345 
346  bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; }
347  bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; }
348  bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
349  bool operator!=(const MVT& S) const { return SimpleTy != S.SimpleTy; }
350  bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
351  bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
352 
353  /// Return true if this is a valid simple valuetype.
354  bool isValid() const {
355  return (SimpleTy >= MVT::FIRST_VALUETYPE &&
357  }
358 
359  /// Return true if this is a FP or a vector FP type.
360  bool isFloatingPoint() const {
361  return ((SimpleTy >= MVT::FIRST_FP_VALUETYPE &&
367  }
368 
369  /// Return true if this is an integer or a vector integer type.
370  bool isInteger() const {
377  }
378 
379  /// Return true if this is an integer, not including vectors.
380  bool isScalarInteger() const {
383  }
384 
385  /// Return true if this is a vector value type.
386  bool isVector() const {
389  }
390 
391  /// Return true if this is a vector value type where the
392  /// runtime length is machine dependent
393  bool isScalableVector() const {
396  }
397 
398  bool isFixedLengthVector() const {
401  }
402 
403  /// Return true if this is a 16-bit vector type.
404  bool is16BitVector() const {
405  return (SimpleTy == MVT::v2i8 || SimpleTy == MVT::v1i16 ||
407  }
408 
409  /// Return true if this is a 32-bit vector type.
410  bool is32BitVector() const {
411  return (SimpleTy == MVT::v32i1 || SimpleTy == MVT::v4i8 ||
414  SimpleTy == MVT::v1f32);
415  }
416 
417  /// Return true if this is a 64-bit vector type.
418  bool is64BitVector() const {
419  return (SimpleTy == MVT::v64i1 || SimpleTy == MVT::v8i8 ||
423  SimpleTy == MVT::v1f64);
424  }
425 
426  /// Return true if this is a 128-bit vector type.
427  bool is128BitVector() const {
428  return (SimpleTy == MVT::v128i1 || SimpleTy == MVT::v16i8 ||
433  }
434 
435  /// Return true if this is a 256-bit vector type.
436  bool is256BitVector() const {
437  return (SimpleTy == MVT::v16f16 || SimpleTy == MVT::v16bf16 ||
442  SimpleTy == MVT::v64i4);
443  }
444 
445  /// Return true if this is a 512-bit vector type.
446  bool is512BitVector() const {
447  return (SimpleTy == MVT::v32f16 || SimpleTy == MVT::v32bf16 ||
452  SimpleTy == MVT::v8i64);
453  }
454 
455  /// Return true if this is a 1024-bit vector type.
456  bool is1024BitVector() const {
457  return (SimpleTy == MVT::v1024i1 || SimpleTy == MVT::v128i8 ||
462  }
463 
464  /// Return true if this is a 2048-bit vector type.
465  bool is2048BitVector() const {
466  return (SimpleTy == MVT::v256i8 || SimpleTy == MVT::v128i16 ||
471  }
472 
473  /// Return true if this is an overloaded type for TableGen.
474  bool isOverloaded() const {
475  return (SimpleTy == MVT::Any || SimpleTy == MVT::iAny ||
478  }
479 
480  /// Return a vector with the same number of elements as this vector, but
481  /// with the element type converted to an integer type with the same
482  /// bitwidth.
484  MVT EltTy = getVectorElementType();
485  MVT IntTy = MVT::getIntegerVT(EltTy.getSizeInBits());
486  MVT VecTy = MVT::getVectorVT(IntTy, getVectorElementCount());
488  "Simple vector VT not representable by simple integer vector VT!");
489  return VecTy;
490  }
491 
492  /// Return a VT for a vector type whose attributes match ourselves
493  /// with the exception of the element type that is chosen by the caller.
495  MVT VecTy = MVT::getVectorVT(EltVT, getVectorElementCount());
497  "Simple vector VT not representable by simple integer vector VT!");
498  return VecTy;
499  }
500 
501  /// Return the type converted to an equivalently sized integer or vector
502  /// with integer element type. Similar to changeVectorElementTypeToInteger,
503  /// but also handles scalars.
505  if (isVector())
508  }
509 
510  /// Return a VT for a vector type with the same element type but
511  /// half the number of elements.
513  MVT EltVT = getVectorElementType();
514  auto EltCnt = getVectorElementCount();
515  assert(EltCnt.isKnownEven() && "Splitting vector, but not in half!");
516  return getVectorVT(EltVT, EltCnt.divideCoefficientBy(2));
517  }
518 
519  /// Returns true if the given vector is a power of 2.
520  bool isPow2VectorType() const {
521  unsigned NElts = getVectorMinNumElements();
522  return !(NElts & (NElts - 1));
523  }
524 
525  /// Widens the length of the given vector MVT up to the nearest power of 2
526  /// and returns that type.
528  if (isPow2VectorType())
529  return *this;
530 
532  unsigned NewMinCount = 1 << Log2_32_Ceil(NElts.getKnownMinValue());
533  NElts = ElementCount::get(NewMinCount, NElts.isScalable());
534  return MVT::getVectorVT(getVectorElementType(), NElts);
535  }
536 
537  /// If this is a vector, return the element type, otherwise return this.
538  MVT getScalarType() const {
539  return isVector() ? getVectorElementType() : *this;
540  }
541 
543  // clang-format off
544  switch (SimpleTy) {
545  default:
546  llvm_unreachable("Not a vector MVT!");
547  case v1i1:
548  case v2i1:
549  case v4i1:
550  case v8i1:
551  case v16i1:
552  case v32i1:
553  case v64i1:
554  case v128i1:
555  case v256i1:
556  case v512i1:
557  case v1024i1:
558  case v2048i1:
559  case nxv1i1:
560  case nxv2i1:
561  case nxv4i1:
562  case nxv8i1:
563  case nxv16i1:
564  case nxv32i1:
565  case nxv64i1: return i1;
566  case v128i2:
567  case v256i2: return i2;
568  case v64i4:
569  case v128i4: return i4;
570  case v1i8:
571  case v2i8:
572  case v4i8:
573  case v8i8:
574  case v16i8:
575  case v32i8:
576  case v64i8:
577  case v128i8:
578  case v256i8:
579  case v512i8:
580  case v1024i8:
581  case nxv1i8:
582  case nxv2i8:
583  case nxv4i8:
584  case nxv8i8:
585  case nxv16i8:
586  case nxv32i8:
587  case nxv64i8: return i8;
588  case v1i16:
589  case v2i16:
590  case v3i16:
591  case v4i16:
592  case v8i16:
593  case v16i16:
594  case v32i16:
595  case v64i16:
596  case v128i16:
597  case v256i16:
598  case v512i16:
599  case nxv1i16:
600  case nxv2i16:
601  case nxv4i16:
602  case nxv8i16:
603  case nxv16i16:
604  case nxv32i16: return i16;
605  case v1i32:
606  case v2i32:
607  case v3i32:
608  case v4i32:
609  case v5i32:
610  case v6i32:
611  case v7i32:
612  case v8i32:
613  case v9i32:
614  case v10i32:
615  case v11i32:
616  case v12i32:
617  case v16i32:
618  case v32i32:
619  case v64i32:
620  case v128i32:
621  case v256i32:
622  case v512i32:
623  case v1024i32:
624  case v2048i32:
625  case nxv1i32:
626  case nxv2i32:
627  case nxv4i32:
628  case nxv8i32:
629  case nxv16i32:
630  case nxv32i32: return i32;
631  case v1i64:
632  case v2i64:
633  case v3i64:
634  case v4i64:
635  case v8i64:
636  case v16i64:
637  case v32i64:
638  case v64i64:
639  case v128i64:
640  case v256i64:
641  case nxv1i64:
642  case nxv2i64:
643  case nxv4i64:
644  case nxv8i64:
645  case nxv16i64:
646  case nxv32i64: return i64;
647  case v1i128: return i128;
648  case v1f16:
649  case v2f16:
650  case v3f16:
651  case v4f16:
652  case v8f16:
653  case v16f16:
654  case v32f16:
655  case v64f16:
656  case v128f16:
657  case v256f16:
658  case v512f16:
659  case nxv1f16:
660  case nxv2f16:
661  case nxv4f16:
662  case nxv8f16:
663  case nxv16f16:
664  case nxv32f16: return f16;
665  case v2bf16:
666  case v3bf16:
667  case v4bf16:
668  case v8bf16:
669  case v16bf16:
670  case v32bf16:
671  case v64bf16:
672  case v128bf16:
673  case nxv1bf16:
674  case nxv2bf16:
675  case nxv4bf16:
676  case nxv8bf16:
677  case nxv16bf16:
678  case nxv32bf16: return bf16;
679  case v1f32:
680  case v2f32:
681  case v3f32:
682  case v4f32:
683  case v5f32:
684  case v6f32:
685  case v7f32:
686  case v8f32:
687  case v9f32:
688  case v10f32:
689  case v11f32:
690  case v12f32:
691  case v16f32:
692  case v32f32:
693  case v64f32:
694  case v128f32:
695  case v256f32:
696  case v512f32:
697  case v1024f32:
698  case v2048f32:
699  case nxv1f32:
700  case nxv2f32:
701  case nxv4f32:
702  case nxv8f32:
703  case nxv16f32: return f32;
704  case v1f64:
705  case v2f64:
706  case v3f64:
707  case v4f64:
708  case v8f64:
709  case v16f64:
710  case v32f64:
711  case v64f64:
712  case v128f64:
713  case v256f64:
714  case nxv1f64:
715  case nxv2f64:
716  case nxv4f64:
717  case nxv8f64: return f64;
718  }
719  // clang-format on
720  }
721 
722  /// Given a vector type, return the minimum number of elements it contains.
723  unsigned getVectorMinNumElements() const {
724  switch (SimpleTy) {
725  default:
726  llvm_unreachable("Not a vector MVT!");
727  case v2048i1:
728  case v2048i32:
729  case v2048f32: return 2048;
730  case v1024i1:
731  case v1024i8:
732  case v1024i32:
733  case v1024f32: return 1024;
734  case v512i1:
735  case v512i8:
736  case v512i16:
737  case v512i32:
738  case v512f16:
739  case v512f32: return 512;
740  case v256i1:
741  case v256i2:
742  case v256i8:
743  case v256i16:
744  case v256f16:
745  case v256i32:
746  case v256i64:
747  case v256f32:
748  case v256f64: return 256;
749  case v128i1:
750  case v128i2:
751  case v128i4:
752  case v128i8:
753  case v128i16:
754  case v128i32:
755  case v128i64:
756  case v128f16:
757  case v128bf16:
758  case v128f32:
759  case v128f64: return 128;
760  case v64i1:
761  case v64i4:
762  case v64i8:
763  case v64i16:
764  case v64i32:
765  case v64i64:
766  case v64f16:
767  case v64bf16:
768  case v64f32:
769  case v64f64:
770  case nxv64i1:
771  case nxv64i8: return 64;
772  case v32i1:
773  case v32i8:
774  case v32i16:
775  case v32i32:
776  case v32i64:
777  case v32f16:
778  case v32bf16:
779  case v32f32:
780  case v32f64:
781  case nxv32i1:
782  case nxv32i8:
783  case nxv32i16:
784  case nxv32i32:
785  case nxv32i64:
786  case nxv32f16:
787  case nxv32bf16: return 32;
788  case v16i1:
789  case v16i8:
790  case v16i16:
791  case v16i32:
792  case v16i64:
793  case v16f16:
794  case v16bf16:
795  case v16f32:
796  case v16f64:
797  case nxv16i1:
798  case nxv16i8:
799  case nxv16i16:
800  case nxv16i32:
801  case nxv16i64:
802  case nxv16f16:
803  case nxv16bf16:
804  case nxv16f32: return 16;
805  case v12i32:
806  case v12f32: return 12;
807  case v11i32:
808  case v11f32: return 11;
809  case v10i32:
810  case v10f32: return 10;
811  case v9i32:
812  case v9f32: return 9;
813  case v8i1:
814  case v8i8:
815  case v8i16:
816  case v8i32:
817  case v8i64:
818  case v8f16:
819  case v8bf16:
820  case v8f32:
821  case v8f64:
822  case nxv8i1:
823  case nxv8i8:
824  case nxv8i16:
825  case nxv8i32:
826  case nxv8i64:
827  case nxv8f16:
828  case nxv8bf16:
829  case nxv8f32:
830  case nxv8f64: return 8;
831  case v7i32:
832  case v7f32: return 7;
833  case v6i32:
834  case v6f32: return 6;
835  case v5i32:
836  case v5f32: return 5;
837  case v4i1:
838  case v4i8:
839  case v4i16:
840  case v4i32:
841  case v4i64:
842  case v4f16:
843  case v4bf16:
844  case v4f32:
845  case v4f64:
846  case nxv4i1:
847  case nxv4i8:
848  case nxv4i16:
849  case nxv4i32:
850  case nxv4i64:
851  case nxv4f16:
852  case nxv4bf16:
853  case nxv4f32:
854  case nxv4f64: return 4;
855  case v3i16:
856  case v3i32:
857  case v3i64:
858  case v3f16:
859  case v3bf16:
860  case v3f32:
861  case v3f64: return 3;
862  case v2i1:
863  case v2i8:
864  case v2i16:
865  case v2i32:
866  case v2i64:
867  case v2f16:
868  case v2bf16:
869  case v2f32:
870  case v2f64:
871  case nxv2i1:
872  case nxv2i8:
873  case nxv2i16:
874  case nxv2i32:
875  case nxv2i64:
876  case nxv2f16:
877  case nxv2bf16:
878  case nxv2f32:
879  case nxv2f64: return 2;
880  case v1i1:
881  case v1i8:
882  case v1i16:
883  case v1i32:
884  case v1i64:
885  case v1i128:
886  case v1f16:
887  case v1f32:
888  case v1f64:
889  case nxv1i1:
890  case nxv1i8:
891  case nxv1i16:
892  case nxv1i32:
893  case nxv1i64:
894  case nxv1f16:
895  case nxv1bf16:
896  case nxv1f32:
897  case nxv1f64: return 1;
898  }
899  }
900 
903  }
904 
905  unsigned getVectorNumElements() const {
906  if (isScalableVector())
908  "Possible incorrect use of MVT::getVectorNumElements() for "
909  "scalable vector. Scalable flag may be dropped, use "
910  "MVT::getVectorElementCount() instead");
911  return getVectorMinNumElements();
912  }
913 
914  /// Returns the size of the specified MVT in bits.
915  ///
916  /// If the value type is a scalable vector type, the scalable property will
917  /// be set and the runtime size will be a positive integer multiple of the
918  /// base size.
920  switch (SimpleTy) {
921  default:
922  llvm_unreachable("getSizeInBits called on extended MVT.");
923  case Other:
924  llvm_unreachable("Value type is non-standard value, Other.");
925  case iPTR:
926  llvm_unreachable("Value type size is target-dependent. Ask TLI.");
927  case iPTRAny:
928  case iAny:
929  case fAny:
930  case vAny:
931  case Any:
932  llvm_unreachable("Value type is overloaded.");
933  case token:
934  llvm_unreachable("Token type is a sentinel that cannot be used "
935  "in codegen and has no size");
936  case Metadata:
937  llvm_unreachable("Value type is metadata.");
938  case i1:
939  case v1i1: return TypeSize::Fixed(1);
940  case nxv1i1: return TypeSize::Scalable(1);
941  case i2:
942  case v2i1: return TypeSize::Fixed(2);
943  case nxv2i1: return TypeSize::Scalable(2);
944  case i4:
945  case v4i1: return TypeSize::Fixed(4);
946  case nxv4i1: return TypeSize::Scalable(4);
947  case i8 :
948  case v1i8:
949  case v8i1: return TypeSize::Fixed(8);
950  case nxv1i8:
951  case nxv8i1: return TypeSize::Scalable(8);
952  case i16 :
953  case f16:
954  case bf16:
955  case v16i1:
956  case v2i8:
957  case v1i16:
958  case v1f16: return TypeSize::Fixed(16);
959  case nxv16i1:
960  case nxv2i8:
961  case nxv1i16:
962  case nxv1bf16:
963  case nxv1f16: return TypeSize::Scalable(16);
964  case f32 :
965  case i32 :
966  case v32i1:
967  case v4i8:
968  case v2i16:
969  case v2f16:
970  case v2bf16:
971  case v1f32:
972  case v1i32: return TypeSize::Fixed(32);
973  case nxv32i1:
974  case nxv4i8:
975  case nxv2i16:
976  case nxv1i32:
977  case nxv2f16:
978  case nxv2bf16:
979  case nxv1f32: return TypeSize::Scalable(32);
980  case v3i16:
981  case v3f16:
982  case v3bf16: return TypeSize::Fixed(48);
983  case x86mmx:
984  case f64 :
985  case i64 :
986  case v64i1:
987  case v8i8:
988  case v4i16:
989  case v2i32:
990  case v1i64:
991  case v4f16:
992  case v4bf16:
993  case v2f32:
994  case v1f64: return TypeSize::Fixed(64);
995  case nxv64i1:
996  case nxv8i8:
997  case nxv4i16:
998  case nxv2i32:
999  case nxv1i64:
1000  case nxv4f16:
1001  case nxv4bf16:
1002  case nxv2f32:
1003  case nxv1f64: return TypeSize::Scalable(64);
1004  case f80 : return TypeSize::Fixed(80);
1005  case v3i32:
1006  case v3f32: return TypeSize::Fixed(96);
1007  case f128:
1008  case ppcf128:
1009  case i128:
1010  case v128i1:
1011  case v16i8:
1012  case v8i16:
1013  case v4i32:
1014  case v2i64:
1015  case v1i128:
1016  case v8f16:
1017  case v8bf16:
1018  case v4f32:
1019  case v2f64: return TypeSize::Fixed(128);
1020  case nxv16i8:
1021  case nxv8i16:
1022  case nxv4i32:
1023  case nxv2i64:
1024  case nxv8f16:
1025  case nxv8bf16:
1026  case nxv4f32:
1027  case nxv2f64: return TypeSize::Scalable(128);
1028  case v5i32:
1029  case v5f32: return TypeSize::Fixed(160);
1030  case v6i32:
1031  case v3i64:
1032  case v6f32:
1033  case v3f64: return TypeSize::Fixed(192);
1034  case v7i32:
1035  case v7f32: return TypeSize::Fixed(224);
1036  case v256i1:
1037  case v128i2:
1038  case v64i4:
1039  case v32i8:
1040  case v16i16:
1041  case v8i32:
1042  case v4i64:
1043  case v16f16:
1044  case v16bf16:
1045  case v8f32:
1046  case v4f64: return TypeSize::Fixed(256);
1047  case nxv32i8:
1048  case nxv16i16:
1049  case nxv8i32:
1050  case nxv4i64:
1051  case nxv16f16:
1052  case nxv16bf16:
1053  case nxv8f32:
1054  case nxv4f64: return TypeSize::Scalable(256);
1055  case v9i32:
1056  case v9f32: return TypeSize::Fixed(288);
1057  case v10i32:
1058  case v10f32: return TypeSize::Fixed(320);
1059  case v11i32:
1060  case v11f32: return TypeSize::Fixed(352);
1061  case v12i32:
1062  case v12f32: return TypeSize::Fixed(384);
1063  case i64x8:
1064  case v512i1:
1065  case v256i2:
1066  case v128i4:
1067  case v64i8:
1068  case v32i16:
1069  case v16i32:
1070  case v8i64:
1071  case v32f16:
1072  case v32bf16:
1073  case v16f32:
1074  case v8f64: return TypeSize::Fixed(512);
1075  case nxv64i8:
1076  case nxv32i16:
1077  case nxv16i32:
1078  case nxv8i64:
1079  case nxv32f16:
1080  case nxv32bf16:
1081  case nxv16f32:
1082  case nxv8f64: return TypeSize::Scalable(512);
1083  case v1024i1:
1084  case v128i8:
1085  case v64i16:
1086  case v32i32:
1087  case v16i64:
1088  case v64f16:
1089  case v64bf16:
1090  case v32f32:
1091  case v16f64: return TypeSize::Fixed(1024);
1092  case nxv32i32:
1093  case nxv16i64: return TypeSize::Scalable(1024);
1094  case v2048i1:
1095  case v256i8:
1096  case v128i16:
1097  case v64i32:
1098  case v32i64:
1099  case v128f16:
1100  case v128bf16:
1101  case v64f32:
1102  case v32f64: return TypeSize::Fixed(2048);
1103  case nxv32i64: return TypeSize::Scalable(2048);
1104  case v512i8:
1105  case v256i16:
1106  case v128i32:
1107  case v64i64:
1108  case v256f16:
1109  case v128f32:
1110  case v64f64: return TypeSize::Fixed(4096);
1111  case v1024i8:
1112  case v512i16:
1113  case v256i32:
1114  case v128i64:
1115  case v512f16:
1116  case v256f32:
1117  case x86amx:
1118  case v128f64: return TypeSize::Fixed(8192);
1119  case v512i32:
1120  case v256i64:
1121  case v512f32:
1122  case v256f64: return TypeSize::Fixed(16384);
1123  case v1024i32:
1124  case v1024f32: return TypeSize::Fixed(32768);
1125  case v2048i32:
1126  case v2048f32: return TypeSize::Fixed(65536);
1127  case funcref:
1128  case externref: return TypeSize::Fixed(0); // opaque type
1129  }
1130  }
1131 
1132  /// Return the size of the specified fixed width value type in bits. The
1133  /// function will assert if the type is scalable.
1135  return getSizeInBits().getFixedSize();
1136  }
1137 
1140  }
1141 
1142  /// Return the number of bytes overwritten by a store of the specified value
1143  /// type.
1144  ///
1145  /// If the value type is a scalable vector type, the scalable property will
1146  /// be set and the runtime size will be a positive integer multiple of the
1147  /// base size.
1149  TypeSize BaseSize = getSizeInBits();
1150  return {(BaseSize.getKnownMinSize() + 7) / 8, BaseSize.isScalable()};
1151  }
1152 
1153  // Return the number of bytes overwritten by a store of this value type or
1154  // this value type's element type in the case of a vector.
1157  }
1158 
1159  /// Return the number of bits overwritten by a store of the specified value
1160  /// type.
1161  ///
1162  /// If the value type is a scalable vector type, the scalable property will
1163  /// be set and the runtime size will be a positive integer multiple of the
1164  /// base size.
1166  return getStoreSize() * 8;
1167  }
1168 
1169  /// Returns true if the number of bits for the type is a multiple of an
1170  /// 8-bit byte.
1171  bool isByteSized() const { return getSizeInBits().isKnownMultipleOf(8); }
1172 
1173  /// Return true if we know at compile time this has more bits than VT.
1174  bool knownBitsGT(MVT VT) const {
1176  }
1177 
1178  /// Return true if we know at compile time this has more than or the same
1179  /// bits as VT.
1180  bool knownBitsGE(MVT VT) const {
1182  }
1183 
1184  /// Return true if we know at compile time this has fewer bits than VT.
1185  bool knownBitsLT(MVT VT) const {
1187  }
1188 
1189  /// Return true if we know at compile time this has fewer than or the same
1190  /// bits as VT.
1191  bool knownBitsLE(MVT VT) const {
1193  }
1194 
1195  /// Return true if this has more bits than VT.
1196  bool bitsGT(MVT VT) const {
1198  "Comparison between scalable and fixed types");
1199  return knownBitsGT(VT);
1200  }
1201 
1202  /// Return true if this has no less bits than VT.
1203  bool bitsGE(MVT VT) const {
1205  "Comparison between scalable and fixed types");
1206  return knownBitsGE(VT);
1207  }
1208 
1209  /// Return true if this has less bits than VT.
1210  bool bitsLT(MVT VT) const {
1212  "Comparison between scalable and fixed types");
1213  return knownBitsLT(VT);
1214  }
1215 
1216  /// Return true if this has no more bits than VT.
1217  bool bitsLE(MVT VT) const {
1219  "Comparison between scalable and fixed types");
1220  return knownBitsLE(VT);
1221  }
1222 
1223  static MVT getFloatingPointVT(unsigned BitWidth) {
1224  switch (BitWidth) {
1225  default:
1226  llvm_unreachable("Bad bit width!");
1227  case 16:
1228  return MVT::f16;
1229  case 32:
1230  return MVT::f32;
1231  case 64:
1232  return MVT::f64;
1233  case 80:
1234  return MVT::f80;
1235  case 128:
1236  return MVT::f128;
1237  }
1238  }
1239 
1240  static MVT getIntegerVT(unsigned BitWidth) {
1241  switch (BitWidth) {
1242  default:
1244  case 1:
1245  return MVT::i1;
1246  case 2:
1247  return MVT::i2;
1248  case 4:
1249  return MVT::i4;
1250  case 8:
1251  return MVT::i8;
1252  case 16:
1253  return MVT::i16;
1254  case 32:
1255  return MVT::i32;
1256  case 64:
1257  return MVT::i64;
1258  case 128:
1259  return MVT::i128;
1260  }
1261  }
1262 
1263  static MVT getVectorVT(MVT VT, unsigned NumElements) {
1264  // clang-format off
1265  switch (VT.SimpleTy) {
1266  default:
1267  break;
1268  case MVT::i1:
1269  if (NumElements == 1) return MVT::v1i1;
1270  if (NumElements == 2) return MVT::v2i1;
1271  if (NumElements == 4) return MVT::v4i1;
1272  if (NumElements == 8) return MVT::v8i1;
1273  if (NumElements == 16) return MVT::v16i1;
1274  if (NumElements == 32) return MVT::v32i1;
1275  if (NumElements == 64) return MVT::v64i1;
1276  if (NumElements == 128) return MVT::v128i1;
1277  if (NumElements == 256) return MVT::v256i1;
1278  if (NumElements == 512) return MVT::v512i1;
1279  if (NumElements == 1024) return MVT::v1024i1;
1280  if (NumElements == 2048) return MVT::v2048i1;
1281  break;
1282  case MVT::i2:
1283  if (NumElements == 128) return MVT::v128i2;
1284  if (NumElements == 256) return MVT::v256i2;
1285  break;
1286  case MVT::i4:
1287  if (NumElements == 64) return MVT::v64i4;
1288  if (NumElements == 128) return MVT::v128i4;
1289  break;
1290  case MVT::i8:
1291  if (NumElements == 1) return MVT::v1i8;
1292  if (NumElements == 2) return MVT::v2i8;
1293  if (NumElements == 4) return MVT::v4i8;
1294  if (NumElements == 8) return MVT::v8i8;
1295  if (NumElements == 16) return MVT::v16i8;
1296  if (NumElements == 32) return MVT::v32i8;
1297  if (NumElements == 64) return MVT::v64i8;
1298  if (NumElements == 128) return MVT::v128i8;
1299  if (NumElements == 256) return MVT::v256i8;
1300  if (NumElements == 512) return MVT::v512i8;
1301  if (NumElements == 1024) return MVT::v1024i8;
1302  break;
1303  case MVT::i16:
1304  if (NumElements == 1) return MVT::v1i16;
1305  if (NumElements == 2) return MVT::v2i16;
1306  if (NumElements == 3) return MVT::v3i16;
1307  if (NumElements == 4) return MVT::v4i16;
1308  if (NumElements == 8) return MVT::v8i16;
1309  if (NumElements == 16) return MVT::v16i16;
1310  if (NumElements == 32) return MVT::v32i16;
1311  if (NumElements == 64) return MVT::v64i16;
1312  if (NumElements == 128) return MVT::v128i16;
1313  if (NumElements == 256) return MVT::v256i16;
1314  if (NumElements == 512) return MVT::v512i16;
1315  break;
1316  case MVT::i32:
1317  if (NumElements == 1) return MVT::v1i32;
1318  if (NumElements == 2) return MVT::v2i32;
1319  if (NumElements == 3) return MVT::v3i32;
1320  if (NumElements == 4) return MVT::v4i32;
1321  if (NumElements == 5) return MVT::v5i32;
1322  if (NumElements == 6) return MVT::v6i32;
1323  if (NumElements == 7) return MVT::v7i32;
1324  if (NumElements == 8) return MVT::v8i32;
1325  if (NumElements == 9) return MVT::v9i32;
1326  if (NumElements == 10) return MVT::v10i32;
1327  if (NumElements == 11) return MVT::v11i32;
1328  if (NumElements == 12) return MVT::v12i32;
1329  if (NumElements == 16) return MVT::v16i32;
1330  if (NumElements == 32) return MVT::v32i32;
1331  if (NumElements == 64) return MVT::v64i32;
1332  if (NumElements == 128) return MVT::v128i32;
1333  if (NumElements == 256) return MVT::v256i32;
1334  if (NumElements == 512) return MVT::v512i32;
1335  if (NumElements == 1024) return MVT::v1024i32;
1336  if (NumElements == 2048) return MVT::v2048i32;
1337  break;
1338  case MVT::i64:
1339  if (NumElements == 1) return MVT::v1i64;
1340  if (NumElements == 2) return MVT::v2i64;
1341  if (NumElements == 3) return MVT::v3i64;
1342  if (NumElements == 4) return MVT::v4i64;
1343  if (NumElements == 8) return MVT::v8i64;
1344  if (NumElements == 16) return MVT::v16i64;
1345  if (NumElements == 32) return MVT::v32i64;
1346  if (NumElements == 64) return MVT::v64i64;
1347  if (NumElements == 128) return MVT::v128i64;
1348  if (NumElements == 256) return MVT::v256i64;
1349  break;
1350  case MVT::i128:
1351  if (NumElements == 1) return MVT::v1i128;
1352  break;
1353  case MVT::f16:
1354  if (NumElements == 1) return MVT::v1f16;
1355  if (NumElements == 2) return MVT::v2f16;
1356  if (NumElements == 3) return MVT::v3f16;
1357  if (NumElements == 4) return MVT::v4f16;
1358  if (NumElements == 8) return MVT::v8f16;
1359  if (NumElements == 16) return MVT::v16f16;
1360  if (NumElements == 32) return MVT::v32f16;
1361  if (NumElements == 64) return MVT::v64f16;
1362  if (NumElements == 128) return MVT::v128f16;
1363  if (NumElements == 256) return MVT::v256f16;
1364  if (NumElements == 512) return MVT::v512f16;
1365  break;
1366  case MVT::bf16:
1367  if (NumElements == 2) return MVT::v2bf16;
1368  if (NumElements == 3) return MVT::v3bf16;
1369  if (NumElements == 4) return MVT::v4bf16;
1370  if (NumElements == 8) return MVT::v8bf16;
1371  if (NumElements == 16) return MVT::v16bf16;
1372  if (NumElements == 32) return MVT::v32bf16;
1373  if (NumElements == 64) return MVT::v64bf16;
1374  if (NumElements == 128) return MVT::v128bf16;
1375  break;
1376  case MVT::f32:
1377  if (NumElements == 1) return MVT::v1f32;
1378  if (NumElements == 2) return MVT::v2f32;
1379  if (NumElements == 3) return MVT::v3f32;
1380  if (NumElements == 4) return MVT::v4f32;
1381  if (NumElements == 5) return MVT::v5f32;
1382  if (NumElements == 6) return MVT::v6f32;
1383  if (NumElements == 7) return MVT::v7f32;
1384  if (NumElements == 8) return MVT::v8f32;
1385  if (NumElements == 9) return MVT::v9f32;
1386  if (NumElements == 10) return MVT::v10f32;
1387  if (NumElements == 11) return MVT::v11f32;
1388  if (NumElements == 12) return MVT::v12f32;
1389  if (NumElements == 16) return MVT::v16f32;
1390  if (NumElements == 32) return MVT::v32f32;
1391  if (NumElements == 64) return MVT::v64f32;
1392  if (NumElements == 128) return MVT::v128f32;
1393  if (NumElements == 256) return MVT::v256f32;
1394  if (NumElements == 512) return MVT::v512f32;
1395  if (NumElements == 1024) return MVT::v1024f32;
1396  if (NumElements == 2048) return MVT::v2048f32;
1397  break;
1398  case MVT::f64:
1399  if (NumElements == 1) return MVT::v1f64;
1400  if (NumElements == 2) return MVT::v2f64;
1401  if (NumElements == 3) return MVT::v3f64;
1402  if (NumElements == 4) return MVT::v4f64;
1403  if (NumElements == 8) return MVT::v8f64;
1404  if (NumElements == 16) return MVT::v16f64;
1405  if (NumElements == 32) return MVT::v32f64;
1406  if (NumElements == 64) return MVT::v64f64;
1407  if (NumElements == 128) return MVT::v128f64;
1408  if (NumElements == 256) return MVT::v256f64;
1409  break;
1410  }
1412  // clang-format on
1413  }
1414 
1415  static MVT getScalableVectorVT(MVT VT, unsigned NumElements) {
1416  switch(VT.SimpleTy) {
1417  default:
1418  break;
1419  case MVT::i1:
1420  if (NumElements == 1) return MVT::nxv1i1;
1421  if (NumElements == 2) return MVT::nxv2i1;
1422  if (NumElements == 4) return MVT::nxv4i1;
1423  if (NumElements == 8) return MVT::nxv8i1;
1424  if (NumElements == 16) return MVT::nxv16i1;
1425  if (NumElements == 32) return MVT::nxv32i1;
1426  if (NumElements == 64) return MVT::nxv64i1;
1427  break;
1428  case MVT::i8:
1429  if (NumElements == 1) return MVT::nxv1i8;
1430  if (NumElements == 2) return MVT::nxv2i8;
1431  if (NumElements == 4) return MVT::nxv4i8;
1432  if (NumElements == 8) return MVT::nxv8i8;
1433  if (NumElements == 16) return MVT::nxv16i8;
1434  if (NumElements == 32) return MVT::nxv32i8;
1435  if (NumElements == 64) return MVT::nxv64i8;
1436  break;
1437  case MVT::i16:
1438  if (NumElements == 1) return MVT::nxv1i16;
1439  if (NumElements == 2) return MVT::nxv2i16;
1440  if (NumElements == 4) return MVT::nxv4i16;
1441  if (NumElements == 8) return MVT::nxv8i16;
1442  if (NumElements == 16) return MVT::nxv16i16;
1443  if (NumElements == 32) return MVT::nxv32i16;
1444  break;
1445  case MVT::i32:
1446  if (NumElements == 1) return MVT::nxv1i32;
1447  if (NumElements == 2) return MVT::nxv2i32;
1448  if (NumElements == 4) return MVT::nxv4i32;
1449  if (NumElements == 8) return MVT::nxv8i32;
1450  if (NumElements == 16) return MVT::nxv16i32;
1451  if (NumElements == 32) return MVT::nxv32i32;
1452  break;
1453  case MVT::i64:
1454  if (NumElements == 1) return MVT::nxv1i64;
1455  if (NumElements == 2) return MVT::nxv2i64;
1456  if (NumElements == 4) return MVT::nxv4i64;
1457  if (NumElements == 8) return MVT::nxv8i64;
1458  if (NumElements == 16) return MVT::nxv16i64;
1459  if (NumElements == 32) return MVT::nxv32i64;
1460  break;
1461  case MVT::f16:
1462  if (NumElements == 1) return MVT::nxv1f16;
1463  if (NumElements == 2) return MVT::nxv2f16;
1464  if (NumElements == 4) return MVT::nxv4f16;
1465  if (NumElements == 8) return MVT::nxv8f16;
1466  if (NumElements == 16) return MVT::nxv16f16;
1467  if (NumElements == 32) return MVT::nxv32f16;
1468  break;
1469  case MVT::bf16:
1470  if (NumElements == 1) return MVT::nxv1bf16;
1471  if (NumElements == 2) return MVT::nxv2bf16;
1472  if (NumElements == 4) return MVT::nxv4bf16;
1473  if (NumElements == 8) return MVT::nxv8bf16;
1474  if (NumElements == 16) return MVT::nxv16bf16;
1475  if (NumElements == 32) return MVT::nxv32bf16;
1476  break;
1477  case MVT::f32:
1478  if (NumElements == 1) return MVT::nxv1f32;
1479  if (NumElements == 2) return MVT::nxv2f32;
1480  if (NumElements == 4) return MVT::nxv4f32;
1481  if (NumElements == 8) return MVT::nxv8f32;
1482  if (NumElements == 16) return MVT::nxv16f32;
1483  break;
1484  case MVT::f64:
1485  if (NumElements == 1) return MVT::nxv1f64;
1486  if (NumElements == 2) return MVT::nxv2f64;
1487  if (NumElements == 4) return MVT::nxv4f64;
1488  if (NumElements == 8) return MVT::nxv8f64;
1489  break;
1490  }
1492  }
1493 
1494  static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable) {
1495  if (IsScalable)
1496  return getScalableVectorVT(VT, NumElements);
1497  return getVectorVT(VT, NumElements);
1498  }
1499 
1500  static MVT getVectorVT(MVT VT, ElementCount EC) {
1501  if (EC.isScalable())
1502  return getScalableVectorVT(VT, EC.getKnownMinValue());
1503  return getVectorVT(VT, EC.getKnownMinValue());
1504  }
1505 
1506  /// Return the value type corresponding to the specified type. This returns
1507  /// all pointers as iPTR. If HandleUnknown is true, unknown types are
1508  /// returned as Other, otherwise they are invalid.
1509  static MVT getVT(Type *Ty, bool HandleUnknown = false);
1510 
1511  public:
1512  /// SimpleValueType Iteration
1513  /// @{
1514  static auto all_valuetypes() {
1517  }
1518 
1519  static auto integer_valuetypes() {
1523  }
1524 
1525  static auto fp_valuetypes() {
1528  }
1529 
1530  static auto vector_valuetypes() {
1534  }
1535 
1540  }
1541 
1546  }
1547 
1552  }
1553 
1558  }
1559 
1564  }
1565 
1570  }
1571  /// @}
1572  };
1573 
1574 } // end namespace llvm
1575 
1576 #endif // LLVM_SUPPORT_MACHINEVALUETYPE_H
llvm::MVT::v3i16
@ v3i16
Definition: MachineValueType.h:99
llvm::MVT::nxv4i1
@ nxv4i1
Definition: MachineValueType.h:208
llvm::MVT::v1i16
@ v1i16
Definition: MachineValueType.h:97
llvm::MVT::FIRST_FP_SCALABLE_VECTOR_VALUETYPE
@ FIRST_FP_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:271
llvm::MVT::FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE
@ FIRST_INTEGER_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:243
llvm::MVT::nxv4i64
@ nxv4i64
Definition: MachineValueType.h:238
llvm::enum_seq_inclusive
auto enum_seq_inclusive(EnumT Begin, EnumT End)
Iterate over an enum type from Begin to End inclusive.
Definition: Sequence.h:354
llvm::MVT::v16bf16
@ v16bf16
Definition: MachineValueType.h:162
llvm::MVT::v2048i1
@ v2048i1
Definition: MachineValueType.h:77
llvm::MVT::v512i16
@ v512i16
Definition: MachineValueType.h:107
llvm::MVT::getScalarStoreSize
uint64_t getScalarStoreSize() const
Definition: MachineValueType.h:1155
llvm::MVT::FIRST_SCALABLE_VECTOR_VALUETYPE
@ FIRST_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:274
llvm::MVT::nxv2i1
@ nxv2i1
Definition: MachineValueType.h:207
llvm::MVT::getVectorElementType
MVT getVectorElementType() const
Definition: MachineValueType.h:542
llvm::MVT::getStoreSize
TypeSize getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
Definition: MachineValueType.h:1148
llvm::MVT::v4f16
@ v4f16
Definition: MachineValueType.h:149
llvm::MVT::v256f16
@ v256f16
Definition: MachineValueType.h:155
MathExtras.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MVT::v128i1
@ v128i1
Definition: MachineValueType.h:73
llvm::MVT::nxv1i32
@ nxv1i32
Definition: MachineValueType.h:229
llvm::MVT::getFixedSizeInBits
uint64_t getFixedSizeInBits() const
Return the size of the specified fixed width value type in bits.
Definition: MachineValueType.h:1134
llvm::MVT::isByteSized
bool isByteSized() const
Returns true if the number of bits for the type is a multiple of an 8-bit byte.
Definition: MachineValueType.h:1171
llvm::MVT::nxv2f64
@ nxv2f64
Definition: MachineValueType.h:267
llvm::MVT::operator>=
bool operator>=(const MVT &S) const
Definition: MachineValueType.h:350
llvm::MVT::isFixedLengthVector
bool isFixedLengthVector() const
Definition: MachineValueType.h:398
llvm::MVT::LAST_FP_FIXEDLEN_VECTOR_VALUETYPE
@ LAST_FP_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:201
llvm::MVT::isInteger
bool isInteger() const
Return true if this is an integer or a vector integer type.
Definition: MachineValueType.h:370
llvm::MVT::v1f64
@ v1f64
Definition: MachineValueType.h:189
llvm::LinearPolySize< TypeSize >::isKnownGT
static bool isKnownGT(const LinearPolySize &LHS, const LinearPolySize &RHS)
Definition: TypeSize.h:334
llvm::MVT::v11i32
@ v11i32
Definition: MachineValueType.h:119
llvm::ElementCount
Definition: TypeSize.h:404
llvm::MVT::v128i32
@ v128i32
Definition: MachineValueType.h:124
llvm::TypeSize::getFixedSize
ScalarTy getFixedSize() const
Definition: TypeSize.h:444
llvm::MVT::ppcf128
@ ppcf128
Definition: MachineValueType.h:61
llvm::MVT::v512i8
@ v512i8
Definition: MachineValueType.h:94
llvm::MVT::is256BitVector
bool is256BitVector() const
Return true if this is a 256-bit vector type.
Definition: MachineValueType.h:436
llvm::MVT::nxv32f16
@ nxv32f16
Definition: MachineValueType.h:251
llvm::MVT::v3f64
@ v3f64
Definition: MachineValueType.h:191
llvm::MVT::v32f64
@ v32f64
Definition: MachineValueType.h:195
llvm::MVT::i128
@ i128
Definition: MachineValueType.h:50
llvm::MVT::nxv2f32
@ nxv2f32
Definition: MachineValueType.h:261
llvm::MVT::nxv16f16
@ nxv16f16
Definition: MachineValueType.h:250
llvm::MVT::v16f64
@ v16f64
Definition: MachineValueType.h:194
TypeSize.h
llvm::MVT::bitsLT
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
Definition: MachineValueType.h:1210
llvm::LinearPolySize< TypeSize >::isKnownLE
static bool isKnownLE(const LinearPolySize &LHS, const LinearPolySize &RHS)
Definition: TypeSize.h:340
llvm::MVT::isVector
bool isVector() const
Return true if this is a vector value type.
Definition: MachineValueType.h:386
llvm::MVT::nxv1f64
@ nxv1f64
Definition: MachineValueType.h:266
llvm::MVT::v64f32
@ v64f32
Definition: MachineValueType.h:182
llvm::MVT::v2i1
@ v2i1
Definition: MachineValueType.h:67
ErrorHandling.h
llvm::MVT::v64i64
@ v64i64
Definition: MachineValueType.h:137
llvm::MVT::v512i32
@ v512i32
Definition: MachineValueType.h:126
llvm::MVT::nxv2i64
@ nxv2i64
Definition: MachineValueType.h:237
llvm::MVT::FIRST_FP_VALUETYPE
@ FIRST_FP_VALUETYPE
Definition: MachineValueType.h:63
llvm::MVT::Glue
@ Glue
Definition: MachineValueType.h:282
llvm::MVT::fAny
@ fAny
Definition: MachineValueType.h:323
llvm::MVT::v64f16
@ v64f16
Definition: MachineValueType.h:153
llvm::MVT::nxv4f16
@ nxv4f16
Definition: MachineValueType.h:248
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::MVT::LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE
@ LAST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:144
llvm::MVT::knownBitsGT
bool knownBitsGT(MVT VT) const
Return true if we know at compile time this has more bits than VT.
Definition: MachineValueType.h:1174
llvm::MVT::fp_fixedlen_vector_valuetypes
static auto fp_fixedlen_vector_valuetypes()
Definition: MachineValueType.h:1554
llvm::MVT::scalable_vector_valuetypes
static auto scalable_vector_valuetypes()
Definition: MachineValueType.h:1542
llvm::MVT::nxv4f64
@ nxv4f64
Definition: MachineValueType.h:268
llvm::MVT::getPow2VectorType
MVT getPow2VectorType() const
Widens the length of the given vector MVT up to the nearest power of 2 and returns that type.
Definition: MachineValueType.h:527
llvm::MVT::v256i32
@ v256i32
Definition: MachineValueType.h:125
llvm::MVT::v2048i32
@ v2048i32
Definition: MachineValueType.h:128
llvm::MVT::LAST_VECTOR_VALUETYPE
@ LAST_VECTOR_VALUETYPE
Definition: MachineValueType.h:278
llvm::MVT::i4
@ i4
Definition: MachineValueType.h:45
llvm::MVT::v2f64
@ v2f64
Definition: MachineValueType.h:190
Sequence.h
llvm::MVT::LAST_FIXEDLEN_VECTOR_VALUETYPE
@ LAST_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:204
llvm::MVT::v3f16
@ v3f16
Definition: MachineValueType.h:148
llvm::MVT::nxv8i16
@ nxv8i16
Definition: MachineValueType.h:225
llvm::MVT::v128i4
@ v128i4
Definition: MachineValueType.h:83
llvm::LinearPolySize::isScalable
bool isScalable() const
Returns whether the size is scaled by a runtime quantity (vscale).
Definition: TypeSize.h:298
llvm::MVT::is32BitVector
bool is32BitVector() const
Return true if this is a 32-bit vector type.
Definition: MachineValueType.h:410
llvm::MVT::nxv32i16
@ nxv32i16
Definition: MachineValueType.h:227
llvm::LinearPolySize< TypeSize >::isKnownLT
static bool isKnownLT(const LinearPolySize &LHS, const LinearPolySize &RHS)
Definition: TypeSize.h:328
llvm::MVT::v128bf16
@ v128bf16
Definition: MachineValueType.h:165
llvm::MVT::isScalableVector
bool isScalableVector() const
Return true if this is a vector value type where the runtime length is machine dependent.
Definition: MachineValueType.h:393
llvm::MVT::nxv8bf16
@ nxv8bf16
Definition: MachineValueType.h:256
llvm::MVT::SimpleValueType
SimpleValueType
Definition: MachineValueType.h:33
llvm::MVT::isValid
bool isValid() const
Return true if this is a valid simple valuetype.
Definition: MachineValueType.h:354
llvm::TypeSize::Scalable
static TypeSize Scalable(ScalarTy MinVal)
Definition: TypeSize.h:442
llvm::MVT::v4bf16
@ v4bf16
Definition: MachineValueType.h:160
llvm::MVT::integer_valuetypes
static auto integer_valuetypes()
Definition: MachineValueType.h:1519
llvm::MVT::funcref
@ funcref
Definition: MachineValueType.h:290
llvm::MVT::v256f32
@ v256f32
Definition: MachineValueType.h:184
llvm::MVT::MVT
constexpr MVT()=default
llvm::MVT::i1
@ i1
Definition: MachineValueType.h:43
llvm::MVT::nxv16f32
@ nxv16f32
Definition: MachineValueType.h:264
llvm::MVT::v8f16
@ v8f16
Definition: MachineValueType.h:150
llvm::MVT::operator<
bool operator<(const MVT &S) const
Definition: MachineValueType.h:347
llvm::LinearPolySize< ElementCount >::get
static ElementCount get(ScalarTy MinVal, bool Scalable)
Definition: TypeSize.h:289
llvm::MVT::v8f64
@ v8f64
Definition: MachineValueType.h:193
llvm::MVT::changeTypeToInteger
MVT changeTypeToInteger()
Return the type converted to an equivalently sized integer or vector with integer element type.
Definition: MachineValueType.h:504
llvm::MVT::knownBitsLE
bool knownBitsLE(MVT VT) const
Return true if we know at compile time this has fewer than or the same bits as VT.
Definition: MachineValueType.h:1191
llvm::MVT::nxv2bf16
@ nxv2bf16
Definition: MachineValueType.h:254
llvm::MVT::v7f32
@ v7f32
Definition: MachineValueType.h:173
llvm::MVT::operator<=
bool operator<=(const MVT &S) const
Definition: MachineValueType.h:351
llvm::MVT::v32bf16
@ v32bf16
Definition: MachineValueType.h:163
llvm::MVT::LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE
@ LAST_INTEGER_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:244
llvm::MVT::v1f16
@ v1f16
Definition: MachineValueType.h:146
llvm::MVT::f64
@ f64
Definition: MachineValueType.h:58
llvm::MVT::integer_scalable_vector_valuetypes
static auto integer_scalable_vector_valuetypes()
Definition: MachineValueType.h:1560
llvm::MVT::x86amx
@ x86amx
Definition: MachineValueType.h:292
llvm::MVT::getScalarSizeInBits
uint64_t getScalarSizeInBits() const
Definition: MachineValueType.h:1138
llvm::MVT::i2
@ i2
Definition: MachineValueType.h:44
llvm::MVT::x86mmx
@ x86mmx
Definition: MachineValueType.h:280
llvm::MVT::SimpleTy
SimpleValueType SimpleTy
Definition: MachineValueType.h:341
llvm::MVT::v64i1
@ v64i1
Definition: MachineValueType.h:72
llvm::MVT::v64i32
@ v64i32
Definition: MachineValueType.h:123
llvm::MVT::nxv32i8
@ nxv32i8
Definition: MachineValueType.h:219
llvm::MVT::v16i1
@ v16i1
Definition: MachineValueType.h:70
llvm::MVT::nxv2f16
@ nxv2f16
Definition: MachineValueType.h:247
llvm::MVT::v256i16
@ v256i16
Definition: MachineValueType.h:106
llvm::TypeSize::Fixed
static TypeSize Fixed(ScalarTy MinVal)
Definition: TypeSize.h:441
llvm::MVT::v256f64
@ v256f64
Definition: MachineValueType.h:198
llvm::MVT::isVoid
@ isVoid
Definition: MachineValueType.h:284
llvm::MVT::bitsLE
bool bitsLE(MVT VT) const
Return true if this has no more bits than VT.
Definition: MachineValueType.h:1217
llvm::MVT::v10f32
@ v10f32
Definition: MachineValueType.h:176
llvm::MVT::v8i1
@ v8i1
Definition: MachineValueType.h:69
llvm::MVT::v4f64
@ v4f64
Definition: MachineValueType.h:192
llvm::MVT::v9f32
@ v9f32
Definition: MachineValueType.h:175
llvm::MVT::v1i1
@ v1i1
Definition: MachineValueType.h:66
llvm::MVT::v16f16
@ v16f16
Definition: MachineValueType.h:151
llvm::MVT::nxv4i8
@ nxv4i8
Definition: MachineValueType.h:216
llvm::MVT::nxv4f32
@ nxv4f32
Definition: MachineValueType.h:262
llvm::MVT::LAST_SCALABLE_VECTOR_VALUETYPE
@ LAST_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:275
llvm::MVT::INVALID_SIMPLE_VALUE_TYPE
@ INVALID_SIMPLE_VALUE_TYPE
Definition: MachineValueType.h:38
llvm::MVT::v6i32
@ v6i32
Definition: MachineValueType.h:114
llvm::MVT::v64i4
@ v64i4
Definition: MachineValueType.h:82
llvm::MVT::v1024i32
@ v1024i32
Definition: MachineValueType.h:127
llvm::MVT::FIRST_INTEGER_VALUETYPE
@ FIRST_INTEGER_VALUETYPE
Definition: MachineValueType.h:52
llvm::MVT::v9i32
@ v9i32
Definition: MachineValueType.h:117
llvm::MVT::v1i64
@ v1i64
Definition: MachineValueType.h:130
llvm::Metadata
Root of the metadata hierarchy.
Definition: Metadata.h:62
llvm::MVT::getVectorVT
static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable)
Definition: MachineValueType.h:1494
llvm::MVT::getStoreSizeInBits
TypeSize getStoreSizeInBits() const
Return the number of bits overwritten by a store of the specified value type.
Definition: MachineValueType.h:1165
llvm::MVT::v7i32
@ v7i32
Definition: MachineValueType.h:115
llvm::MVT::v4i16
@ v4i16
Definition: MachineValueType.h:100
llvm::MVT::v4i8
@ v4i8
Definition: MachineValueType.h:87
llvm::MVT::nxv4i16
@ nxv4i16
Definition: MachineValueType.h:224
llvm::MVT::getScalarType
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
Definition: MachineValueType.h:538
llvm::MVT::nxv16bf16
@ nxv16bf16
Definition: MachineValueType.h:257
llvm::Log2_32_Ceil
unsigned Log2_32_Ceil(uint32_t Value)
Return the ceil log base 2 of the specified value, 32 if the value is zero.
Definition: MathExtras.h:560
llvm::MVT::nxv16i16
@ nxv16i16
Definition: MachineValueType.h:226
llvm::MVT::isFloatingPoint
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
Definition: MachineValueType.h:360
llvm::MVT::f80
@ f80
Definition: MachineValueType.h:59
llvm::MVT::nxv32bf16
@ nxv32bf16
Definition: MachineValueType.h:258
llvm::MVT::iPTRAny
@ iPTRAny
Definition: MachineValueType.h:313
llvm::MVT::v2i8
@ v2i8
Definition: MachineValueType.h:86
llvm::MVT::v4i64
@ v4i64
Definition: MachineValueType.h:133
llvm::MVT::v32i16
@ v32i16
Definition: MachineValueType.h:103
llvm::MVT::nxv16i8
@ nxv16i8
Definition: MachineValueType.h:218
llvm::MVT::v5f32
@ v5f32
Definition: MachineValueType.h:171
llvm::MVT::nxv1bf16
@ nxv1bf16
Definition: MachineValueType.h:253
llvm::MVT::i64x8
@ i64x8
Definition: MachineValueType.h:293
llvm::MVT::nxv8i64
@ nxv8i64
Definition: MachineValueType.h:239
llvm::MVT::v16i8
@ v16i8
Definition: MachineValueType.h:89
llvm::MVT::bitsGE
bool bitsGE(MVT VT) const
Return true if this has no less bits than VT.
Definition: MachineValueType.h:1203
llvm::MVT::v16i16
@ v16i16
Definition: MachineValueType.h:102
llvm::MVT::v2i64
@ v2i64
Definition: MachineValueType.h:131
llvm::MVT::v2f16
@ v2f16
Definition: MachineValueType.h:147
llvm::MVT::v3i64
@ v3i64
Definition: MachineValueType.h:132
uint64_t
llvm::MVT::is16BitVector
bool is16BitVector() const
Return true if this is a 16-bit vector type.
Definition: MachineValueType.h:404
llvm::MVT::MAX_ALLOWED_VALUETYPE
@ MAX_ALLOWED_VALUETYPE
Definition: MachineValueType.h:302
llvm::MVT::v32i64
@ v32i64
Definition: MachineValueType.h:136
llvm::MVT::v16f32
@ v16f32
Definition: MachineValueType.h:179
llvm::MVT::externref
@ externref
Definition: MachineValueType.h:291
llvm::MVT::v128i8
@ v128i8
Definition: MachineValueType.h:92
llvm::MVT::v6f32
@ v6f32
Definition: MachineValueType.h:172
llvm::MVT::v1f32
@ v1f32
Definition: MachineValueType.h:167
llvm::MVT::FIRST_VALUETYPE
@ FIRST_VALUETYPE
Definition: MachineValueType.h:295
llvm::MVT::nxv32i64
@ nxv32i64
Definition: MachineValueType.h:241
llvm::MVT::v32i1
@ v32i1
Definition: MachineValueType.h:71
llvm::MVT::v2048f32
@ v2048f32
Definition: MachineValueType.h:187
llvm::MVT::v11f32
@ v11f32
Definition: MachineValueType.h:177
llvm::MVT::v12i32
@ v12i32
Definition: MachineValueType.h:120
llvm::MVT::v2bf16
@ v2bf16
Definition: MachineValueType.h:158
TemplateParamKind::Type
@ Type
llvm::MVT::v4f32
@ v4f32
Definition: MachineValueType.h:170
llvm::MVT::getVectorVT
static MVT getVectorVT(MVT VT, ElementCount EC)
Definition: MachineValueType.h:1500
llvm::MVT::getVectorNumElements
unsigned getVectorNumElements() const
Definition: MachineValueType.h:905
llvm::MVT::i8
@ i8
Definition: MachineValueType.h:46
llvm::MVT::v128i16
@ v128i16
Definition: MachineValueType.h:105
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MVT::v5i32
@ v5i32
Definition: MachineValueType.h:113
llvm::MVT::nxv16i32
@ nxv16i32
Definition: MachineValueType.h:233
llvm::MVT::Other
@ Other
Definition: MachineValueType.h:42
llvm::MVT::getSizeInBits
TypeSize getSizeInBits() const
Returns the size of the specified MVT in bits.
Definition: MachineValueType.h:919
llvm::MVT::nxv64i1
@ nxv64i1
Definition: MachineValueType.h:212
llvm::MVT::all_valuetypes
static auto all_valuetypes()
SimpleValueType Iteration.
Definition: MachineValueType.h:1514
llvm::MVT::nxv4i32
@ nxv4i32
Definition: MachineValueType.h:231
llvm::LinearPolySize< TypeSize >::isKnownGE
static bool isKnownGE(const LinearPolySize &LHS, const LinearPolySize &RHS)
Definition: TypeSize.h:346
iterator_range.h
llvm::MVT::getFloatingPointVT
static MVT getFloatingPointVT(unsigned BitWidth)
Definition: MachineValueType.h:1223
llvm::MVT
Machine Value Type.
Definition: MachineValueType.h:31
llvm::MVT::nxv4bf16
@ nxv4bf16
Definition: MachineValueType.h:255
llvm::MVT::v256i1
@ v256i1
Definition: MachineValueType.h:74
llvm::LinearPolySize::getKnownMinValue
ScalarTy getKnownMinValue() const
Returns the minimum value this size can represent.
Definition: TypeSize.h:296
llvm::MVT::nxv1i64
@ nxv1i64
Definition: MachineValueType.h:236
llvm::MVT::bf16
@ bf16
Definition: MachineValueType.h:55
llvm::MVT::v3i32
@ v3i32
Definition: MachineValueType.h:111
llvm::LinearPolySize::isKnownMultipleOf
bool isKnownMultipleOf(ScalarTy RHS) const
This function tells the caller whether the element count is known at compile time to be a multiple of...
Definition: TypeSize.h:305
llvm::MVT::getVectorVT
static MVT getVectorVT(MVT VT, unsigned NumElements)
Definition: MachineValueType.h:1263
llvm::MVT::fp_scalable_vector_valuetypes
static auto fp_scalable_vector_valuetypes()
Definition: MachineValueType.h:1566
llvm::MVT::nxv2i32
@ nxv2i32
Definition: MachineValueType.h:230
llvm::MVT::nxv1f32
@ nxv1f32
Definition: MachineValueType.h:260
llvm::MVT::fixedlen_vector_valuetypes
static auto fixedlen_vector_valuetypes()
Definition: MachineValueType.h:1536
llvm::MVT::changeVectorElementTypeToInteger
MVT changeVectorElementTypeToInteger() const
Return a vector with the same number of elements as this vector, but with the element type converted ...
Definition: MachineValueType.h:483
llvm::MVT::i64
@ i64
Definition: MachineValueType.h:49
llvm::MVT::v2i32
@ v2i32
Definition: MachineValueType.h:110
llvm::MVT::is2048BitVector
bool is2048BitVector() const
Return true if this is a 2048-bit vector type.
Definition: MachineValueType.h:465
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::MVT::v2f32
@ v2f32
Definition: MachineValueType.h:168
llvm::MVT::isPow2VectorType
bool isPow2VectorType() const
Returns true if the given vector is a power of 2.
Definition: MachineValueType.h:520
llvm::MVT::is128BitVector
bool is128BitVector() const
Return true if this is a 128-bit vector type.
Definition: MachineValueType.h:427
llvm::MVT::v12f32
@ v12f32
Definition: MachineValueType.h:178
llvm::MVT::v64i8
@ v64i8
Definition: MachineValueType.h:91
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MVT::FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE
@ FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:200
llvm::MVT::nxv1i8
@ nxv1i8
Definition: MachineValueType.h:214
llvm::MVT::v64i16
@ v64i16
Definition: MachineValueType.h:104
llvm::MVT::nxv32i32
@ nxv32i32
Definition: MachineValueType.h:234
llvm::MVT::v4i32
@ v4i32
Definition: MachineValueType.h:112
llvm::MVT::iPTR
@ iPTR
Definition: MachineValueType.h:332
llvm::MVT::is64BitVector
bool is64BitVector() const
Return true if this is a 64-bit vector type.
Definition: MachineValueType.h:418
llvm::MVT::v512i1
@ v512i1
Definition: MachineValueType.h:75
llvm::MVT::v32i32
@ v32i32
Definition: MachineValueType.h:122
llvm::MVT::v1i128
@ v1i128
Definition: MachineValueType.h:141
llvm::MVT::v128f32
@ v128f32
Definition: MachineValueType.h:183
llvm::MVT::v8i64
@ v8i64
Definition: MachineValueType.h:134
llvm::MVT::v64bf16
@ v64bf16
Definition: MachineValueType.h:164
llvm::MVT::getVectorElementCount
ElementCount getVectorElementCount() const
Definition: MachineValueType.h:901
llvm::MVT::v16i32
@ v16i32
Definition: MachineValueType.h:121
llvm::MVT::v256i64
@ v256i64
Definition: MachineValueType.h:139
llvm::MVT::v1i32
@ v1i32
Definition: MachineValueType.h:109
llvm::MVT::nxv64i8
@ nxv64i8
Definition: MachineValueType.h:220
llvm::MVT::nxv16i1
@ nxv16i1
Definition: MachineValueType.h:210
llvm::MVT::v8bf16
@ v8bf16
Definition: MachineValueType.h:161
llvm::MVT::nxv2i16
@ nxv2i16
Definition: MachineValueType.h:223
llvm::MVT::operator>
bool operator>(const MVT &S) const
Definition: MachineValueType.h:346
llvm::Any
Definition: Any.h:28
llvm::MVT::operator!=
bool operator!=(const MVT &S) const
Definition: MachineValueType.h:349
llvm::MVT::Metadata
@ Metadata
Definition: MachineValueType.h:308
llvm::MVT::v128i64
@ v128i64
Definition: MachineValueType.h:138
llvm::MVT::v32f16
@ v32f16
Definition: MachineValueType.h:152
llvm::MVT::isOverloaded
bool isOverloaded() const
Return true if this is an overloaded type for TableGen.
Definition: MachineValueType.h:474
llvm::MVT::token
@ token
Definition: MachineValueType.h:305
llvm::MVT::operator==
bool operator==(const MVT &S) const
Definition: MachineValueType.h:348
llvm::MVT::FIRST_VECTOR_VALUETYPE
@ FIRST_VECTOR_VALUETYPE
Definition: MachineValueType.h:277
llvm::MVT::iAny
@ iAny
Definition: MachineValueType.h:328
llvm::MVT::FIRST_FIXEDLEN_VECTOR_VALUETYPE
@ FIRST_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:203
llvm::MVT::v256i8
@ v256i8
Definition: MachineValueType.h:93
llvm::MVT::v8i16
@ v8i16
Definition: MachineValueType.h:101
llvm::TypeSize
Definition: TypeSize.h:435
llvm::MVT::knownBitsGE
bool knownBitsGE(MVT VT) const
Return true if we know at compile time this has more than or the same bits as VT.
Definition: MachineValueType.h:1180
llvm::MVT::FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE
@ FIRST_INTEGER_FIXEDLEN_VECTOR_VALUETYPE
Definition: MachineValueType.h:143
llvm::MVT::getVectorMinNumElements
unsigned getVectorMinNumElements() const
Given a vector type, return the minimum number of elements it contains.
Definition: MachineValueType.h:723
llvm::BitWidth
constexpr unsigned BitWidth
Definition: BitmaskEnum.h:147
llvm::MVT::i32
@ i32
Definition: MachineValueType.h:48
llvm::MVT::v512f16
@ v512f16
Definition: MachineValueType.h:156
llvm::MVT::nxv8i8
@ nxv8i8
Definition: MachineValueType.h:217
llvm::MVT::v512f32
@ v512f32
Definition: MachineValueType.h:185
llvm::MVT::v8i32
@ v8i32
Definition: MachineValueType.h:116
llvm::MVT::v3f32
@ v3f32
Definition: MachineValueType.h:169
llvm::MVT::nxv8i32
@ nxv8i32
Definition: MachineValueType.h:232
llvm::force_iteration_on_noniterable_enum
constexpr force_iteration_on_noniterable_enum_t force_iteration_on_noniterable_enum
Definition: Sequence.h:108
llvm::MVT::nxv1i16
@ nxv1i16
Definition: MachineValueType.h:222
llvm::MVT::nxv8f16
@ nxv8f16
Definition: MachineValueType.h:249
llvm::MVT::v1024i1
@ v1024i1
Definition: MachineValueType.h:76
llvm::MVT::v128i2
@ v128i2
Definition: MachineValueType.h:79
llvm::MVT::getHalfNumVectorElementsVT
MVT getHalfNumVectorElementsVT() const
Return a VT for a vector type with the same element type but half the number of elements.
Definition: MachineValueType.h:512
llvm::MVT::f128
@ f128
Definition: MachineValueType.h:60
llvm::MVT::v1i8
@ v1i8
Definition: MachineValueType.h:85
llvm::MVT::nxv8i1
@ nxv8i1
Definition: MachineValueType.h:209
llvm::MVT::Any
@ Any
Definition: MachineValueType.h:336
llvm::MVT::v64f64
@ v64f64
Definition: MachineValueType.h:196
llvm::MVT::f16
@ f16
Definition: MachineValueType.h:56
llvm::MVT::LAST_FP_VALUETYPE
@ LAST_FP_VALUETYPE
Definition: MachineValueType.h:64
llvm::MVT::v32f32
@ v32f32
Definition: MachineValueType.h:181
llvm::MVT::vector_valuetypes
static auto vector_valuetypes()
Definition: MachineValueType.h:1530
llvm::MVT::LAST_VALUETYPE
@ LAST_VALUETYPE
Definition: MachineValueType.h:296
llvm::MVT::nxv1i1
@ nxv1i1
Definition: MachineValueType.h:206
llvm::MVT::getVT
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
Definition: ValueTypes.cpp:563
llvm::MVT::isScalarInteger
bool isScalarInteger() const
Return true if this is an integer, not including vectors.
Definition: MachineValueType.h:380
llvm::MVT::getScalableVectorVT
static MVT getScalableVectorVT(MVT VT, unsigned NumElements)
Definition: MachineValueType.h:1415
llvm::MVT::changeVectorElementType
MVT changeVectorElementType(MVT EltVT) const
Return a VT for a vector type whose attributes match ourselves with the exception of the element type...
Definition: MachineValueType.h:494
llvm::TypeSize::getKnownMinSize
ScalarTy getKnownMinSize() const
Definition: TypeSize.h:445
llvm::MVT::Untyped
@ Untyped
Definition: MachineValueType.h:286
llvm::MVT::is1024BitVector
bool is1024BitVector() const
Return true if this is a 1024-bit vector type.
Definition: MachineValueType.h:456
llvm::MVT::v1024i8
@ v1024i8
Definition: MachineValueType.h:95
llvm::MVT::v32i8
@ v32i8
Definition: MachineValueType.h:90
llvm::MVT::i16
@ i16
Definition: MachineValueType.h:47
llvm::MVT::v256i2
@ v256i2
Definition: MachineValueType.h:80
llvm::MVT::knownBitsLT
bool knownBitsLT(MVT VT) const
Return true if we know at compile time this has fewer bits than VT.
Definition: MachineValueType.h:1185
llvm::MVT::nxv32i1
@ nxv32i1
Definition: MachineValueType.h:211
llvm::MVT::fp_valuetypes
static auto fp_valuetypes()
Definition: MachineValueType.h:1525
llvm::MVT::LAST_INTEGER_VALUETYPE
@ LAST_INTEGER_VALUETYPE
Definition: MachineValueType.h:53
llvm::MVT::vAny
@ vAny
Definition: MachineValueType.h:318
llvm::MVT::v128f64
@ v128f64
Definition: MachineValueType.h:197
llvm::MVT::v8i8
@ v8i8
Definition: MachineValueType.h:88
llvm::MVT::nxv2i8
@ nxv2i8
Definition: MachineValueType.h:215
llvm::MVT::LAST_FP_SCALABLE_VECTOR_VALUETYPE
@ LAST_FP_SCALABLE_VECTOR_VALUETYPE
Definition: MachineValueType.h:272
llvm::MVT::nxv16i64
@ nxv16i64
Definition: MachineValueType.h:240
llvm::MVT::v8f32
@ v8f32
Definition: MachineValueType.h:174
llvm::MVT::v2i16
@ v2i16
Definition: MachineValueType.h:98
llvm::MVT::v16i64
@ v16i64
Definition: MachineValueType.h:135
llvm::MVT::v10i32
@ v10i32
Definition: MachineValueType.h:118
llvm::MVT::bitsGT
bool bitsGT(MVT VT) const
Return true if this has more bits than VT.
Definition: MachineValueType.h:1196
llvm::MVT::v128f16
@ v128f16
Definition: MachineValueType.h:154
llvm::MVT::f32
@ f32
Definition: MachineValueType.h:57
llvm::MVT::nxv1f16
@ nxv1f16
Definition: MachineValueType.h:246
llvm::MVT::v3bf16
@ v3bf16
Definition: MachineValueType.h:159
llvm::MVT::MVT
constexpr MVT(SimpleValueType SVT)
Definition: MachineValueType.h:344
llvm::MVT::nxv8f64
@ nxv8f64
Definition: MachineValueType.h:269
llvm::MVT::VALUETYPE_SIZE
@ VALUETYPE_SIZE
Definition: MachineValueType.h:297
llvm::MVT::v1024f32
@ v1024f32
Definition: MachineValueType.h:186
llvm::MVT::is512BitVector
bool is512BitVector() const
Return true if this is a 512-bit vector type.
Definition: MachineValueType.h:446
llvm::reportInvalidSizeRequest
void reportInvalidSizeRequest(const char *Msg)
Reports a diagnostic message to indicate an invalid size request has been done on a scalable vector.
Definition: TypeSize.cpp:38
llvm::MVT::v4i1
@ v4i1
Definition: MachineValueType.h:68
llvm::MVT::getIntegerVT
static MVT getIntegerVT(unsigned BitWidth)
Definition: MachineValueType.h:1240
llvm::MVT::nxv8f32
@ nxv8f32
Definition: MachineValueType.h:263
llvm::MVT::integer_fixedlen_vector_valuetypes
static auto integer_fixedlen_vector_valuetypes()
Definition: MachineValueType.h:1548