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