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