1//===- CodeGen/ValueTypes.h - Low-Level Target independ. 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 low-level target independent types which various
10// values in the code generator are. This allows the target specific behavior
11// of instructions to be described to target independent passes.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CODEGEN_VALUETYPES_H
16#define LLVM_CODEGEN_VALUETYPES_H
17
18#include "llvm/CodeGenTypes/MachineValueType.h"
19#include "llvm/Support/Compiler.h"
20#include "llvm/Support/MathExtras.h"
21#include "llvm/Support/TypeSize.h"
22#include <cassert>
23#include <cstdint>
24#include <string>
25
26namespace llvm {
27
28 class LLVMContext;
29 class Type;
30 struct fltSemantics;
31
32 /// Extended Value Type. Capable of holding value types which are not native
33 /// for any processor (such as the i12345 type), as well as the types an MVT
34 /// can represent.
35 struct EVT {
36 private:
37 MVT V = MVT::INVALID_SIMPLE_VALUE_TYPE;
38 Type *LLVMTy = nullptr;
39
40 public:
41 constexpr EVT() = default;
42 constexpr EVT(MVT::SimpleValueType SVT) : V(SVT) {}
43 constexpr EVT(MVT S) : V(S) {}
44
45 bool operator==(EVT VT) const {
46 return !(*this != VT);
47 }
48 bool operator!=(EVT VT) const {
49 return V.SimpleTy != VT.V.SimpleTy || LLVMTy != VT.LLVMTy;
50 }
51
52 /// Returns the EVT that represents a floating-point type with the given
53 /// number of bits. There are two floating-point types with 128 bits - this
54 /// returns f128 rather than ppcf128.
55 static EVT getFloatingPointVT(unsigned BitWidth) {
56 return MVT::getFloatingPointVT(BitWidth);
57 }
58
59 /// Returns the EVT that represents an integer with the given number of
60 /// bits.
61 static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) {
62 MVT M = MVT::getIntegerVT(BitWidth);
63 if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
64 return M;
65 return getExtendedIntegerVT(C&: Context, BitWidth);
66 }
67
68 /// Returns the EVT that represents a vector NumElements in length, where
69 /// each element is of type VT.
70 static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements,
71 bool IsScalable = false) {
72 MVT M = MVT::getVectorVT(VT: VT.V, NumElements, IsScalable);
73 if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
74 return M;
75 return getExtendedVectorVT(C&: Context, VT, NumElements, IsScalable);
76 }
77
78 /// Returns the EVT that represents a vector EC.Min elements in length,
79 /// where each element is of type VT.
80 static EVT getVectorVT(LLVMContext &Context, EVT VT, ElementCount EC) {
81 MVT M = MVT::getVectorVT(VT: VT.V, EC);
82 if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
83 return M;
84 return getExtendedVectorVT(Context, VT, EC);
85 }
86
87 /// Return a vector with the same number of elements as this vector, but
88 /// with the element type converted to an integer type with the same
89 /// bitwidth.
90 EVT changeVectorElementTypeToInteger() const {
91 if (isSimple())
92 return getSimpleVT().changeVectorElementTypeToInteger();
93 return changeExtendedVectorElementTypeToInteger();
94 }
95
96 /// Return a VT for a vector type whose attributes match ourselves
97 /// with the exception of the element type that is chosen by the caller.
98 EVT changeVectorElementType(LLVMContext &Context, EVT EltVT) const {
99 if (isSimple() && EltVT.isSimple()) {
100 MVT M = MVT::getVectorVT(VT: EltVT.getSimpleVT(), EC: getVectorElementCount());
101 if (M != MVT::INVALID_SIMPLE_VALUE_TYPE)
102 return M;
103 }
104 return getVectorVT(Context, VT: EltVT, EC: getVectorElementCount());
105 }
106
107 /// Return a VT for a vector type whose attributes match ourselves
108 /// with the exception of the element count that is chosen by the caller.
109 EVT changeVectorElementCount(LLVMContext &Context, ElementCount EC) const {
110 assert(isVector() && "Not a vector EVT!");
111 if (isSimple()) {
112 MVT M = getSimpleVT().changeVectorElementCount(EC);
113 if (M != MVT::INVALID_SIMPLE_VALUE_TYPE)
114 return M;
115 }
116 return getVectorVT(Context, VT: getVectorElementType(), EC);
117 }
118
119 /// Return a VT for a type whose attributes match ourselves with
120 /// the exception of the element count that is chosen by the caller.
121 EVT changeElementCount(LLVMContext &Context, ElementCount EC) const {
122 if (isSimple()) {
123 MVT M = getSimpleVT().changeElementCount(EC);
124 if (M != MVT::INVALID_SIMPLE_VALUE_TYPE)
125 return M;
126 }
127
128 EVT EltVT = getScalarType();
129 if (!isVector() && EC.isScalar())
130 return EltVT;
131 return getVectorVT(Context, VT: EltVT, EC);
132 }
133
134 /// Return a VT for a type whose attributes match ourselves with the
135 /// exception of the element type that is chosen by the caller.
136 EVT changeElementType(LLVMContext &Context, EVT EltVT) const {
137 EltVT = EltVT.getScalarType();
138 return isVector() ? changeVectorElementType(Context, EltVT) : EltVT;
139 }
140
141 /// Return the type converted to an equivalently sized integer or vector
142 /// with integer element type. Similar to changeVectorElementTypeToInteger,
143 /// but also handles scalars.
144 EVT changeTypeToInteger() const {
145 if (isVector())
146 return changeVectorElementTypeToInteger();
147
148 if (isSimple())
149 return getSimpleVT().changeTypeToInteger();
150 return changeExtendedTypeToInteger();
151 }
152
153 /// Test if the given EVT has zero size, this will fail if called on a
154 /// scalable type
155 bool isZeroSized() const {
156 return getSizeInBits().isZero();
157 }
158
159 /// Test if the given EVT is simple (as opposed to being extended).
160 bool isSimple() const {
161 return V.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE;
162 }
163
164 /// Test if the given EVT is extended (as opposed to being simple).
165 bool isExtended() const {
166 return !isSimple();
167 }
168
169 /// Return true if this is a FP or a vector FP type.
170 bool isFloatingPoint() const {
171 return isSimple() ? V.isFloatingPoint() : isExtendedFloatingPoint();
172 }
173
174 /// Return true if this is an integer or a vector integer type.
175 bool isInteger() const {
176 return isSimple() ? V.isInteger() : isExtendedInteger();
177 }
178
179 /// Return true if this is an integer, but not a vector.
180 bool isScalarInteger() const {
181 return isSimple() ? V.isScalarInteger() : isExtendedScalarInteger();
182 }
183
184 /// Return true if this is a vector type where the runtime
185 /// length is machine dependent
186 bool isScalableTargetExtVT() const {
187 return isSimple() && V.isScalableTargetExtVT();
188 }
189
190 /// Return true if this is a vector value type.
191 bool isVector() const {
192 return isSimple() ? V.isVector() : isExtendedVector();
193 }
194
195 /// Return true if this is a vector with matching element type.
196 bool isVectorOf(EVT EltVT) const {
197 return isVector() && getVectorElementType() == EltVT;
198 }
199
200 /// Return true if this is a vector type where the runtime
201 /// length is machine dependent
202 bool isScalableVector() const {
203 return isSimple() ? V.isScalableVector() : isExtendedScalableVector();
204 }
205
206 /// Return true if this is a scalable vector with matching element type.
207 bool isScalableVectorOf(EVT EltVT) const {
208 return isScalableVector() && getVectorElementType() == EltVT;
209 }
210
211 /// Return true if this is a vector value type.
212 bool isRISCVVectorTuple() const { return V.isRISCVVectorTuple(); }
213
214 bool isFixedLengthVector() const {
215 return isSimple() ? V.isFixedLengthVector()
216 : isExtendedFixedLengthVector();
217 }
218
219 /// Return true if this is a fixed length vector with matching element type.
220 bool isFixedLengthVectorOf(EVT EltVT) const {
221 return isFixedLengthVector() && getVectorElementType() == EltVT;
222 }
223
224 /// Return true if the type is a scalable type.
225 bool isScalableVT() const {
226 return isScalableVector() || isScalableTargetExtVT();
227 }
228
229 /// Return true if this is a 16-bit vector type.
230 bool is16BitVector() const {
231 return isSimple() ? V.is16BitVector() : isExtended16BitVector();
232 }
233
234 /// Return true if this is a 32-bit vector type.
235 bool is32BitVector() const {
236 return isSimple() ? V.is32BitVector() : isExtended32BitVector();
237 }
238
239 /// Return true if this is a 64-bit vector type.
240 bool is64BitVector() const {
241 return isSimple() ? V.is64BitVector() : isExtended64BitVector();
242 }
243
244 /// Return true if this is a 128-bit vector type.
245 bool is128BitVector() const {
246 return isSimple() ? V.is128BitVector() : isExtended128BitVector();
247 }
248
249 /// Return true if this is a 256-bit vector type.
250 bool is256BitVector() const {
251 return isSimple() ? V.is256BitVector() : isExtended256BitVector();
252 }
253
254 /// Return true if this is a 512-bit vector type.
255 bool is512BitVector() const {
256 return isSimple() ? V.is512BitVector() : isExtended512BitVector();
257 }
258
259 /// Return true if this is a 1024-bit vector type.
260 bool is1024BitVector() const {
261 return isSimple() ? V.is1024BitVector() : isExtended1024BitVector();
262 }
263
264 /// Return true if this is a 2048-bit vector type.
265 bool is2048BitVector() const {
266 return isSimple() ? V.is2048BitVector() : isExtended2048BitVector();
267 }
268
269 /// Return true if this is a capability type.
270 bool isCheriCapability() const {
271 return isSimple() ? V.isCheriCapability() : false;
272 }
273
274 /// Return true if this is an overloaded type for TableGen.
275 bool isOverloaded() const {
276 return (V == MVT::iAny || V == MVT::fAny || V == MVT::vAny ||
277 V == MVT::pAny);
278 }
279
280 /// Return true if the bit size is a multiple of 8.
281 bool isByteSized() const {
282 return !isZeroSized() && getSizeInBits().isKnownMultipleOf(RHS: 8);
283 }
284
285 /// Return true if the size is a power-of-two number of bytes.
286 bool isRound() const {
287 if (isScalableVector())
288 return false;
289 unsigned BitSize = getSizeInBits();
290 return BitSize >= 8 && !(BitSize & (BitSize - 1));
291 }
292
293 /// Return true if this has the same number of bits as VT.
294 bool bitsEq(EVT VT) const {
295 if (EVT::operator==(VT)) return true;
296 return getSizeInBits() == VT.getSizeInBits();
297 }
298
299 /// Return true if we know at compile time this has more bits than VT.
300 bool knownBitsGT(EVT VT) const {
301 return TypeSize::isKnownGT(LHS: getSizeInBits(), RHS: VT.getSizeInBits());
302 }
303
304 /// Return true if we know at compile time this has more than or the same
305 /// bits as VT.
306 bool knownBitsGE(EVT VT) const {
307 return TypeSize::isKnownGE(LHS: getSizeInBits(), RHS: VT.getSizeInBits());
308 }
309
310 /// Return true if we know at compile time this has fewer bits than VT.
311 bool knownBitsLT(EVT VT) const {
312 return TypeSize::isKnownLT(LHS: getSizeInBits(), RHS: VT.getSizeInBits());
313 }
314
315 /// Return true if we know at compile time this has fewer than or the same
316 /// bits as VT.
317 bool knownBitsLE(EVT VT) const {
318 return TypeSize::isKnownLE(LHS: getSizeInBits(), RHS: VT.getSizeInBits());
319 }
320
321 /// Return true if this has more bits than VT.
322 bool bitsGT(EVT VT) const {
323 if (EVT::operator==(VT)) return false;
324 assert(isScalableVector() == VT.isScalableVector() &&
325 "Comparison between scalable and fixed types");
326 return knownBitsGT(VT);
327 }
328
329 /// Return true if this has no less bits than VT.
330 bool bitsGE(EVT VT) const {
331 if (EVT::operator==(VT)) return true;
332 assert(isScalableVector() == VT.isScalableVector() &&
333 "Comparison between scalable and fixed types");
334 return knownBitsGE(VT);
335 }
336
337 /// Return true if this has less bits than VT.
338 bool bitsLT(EVT VT) const {
339 if (EVT::operator==(VT)) return false;
340 assert(isScalableVector() == VT.isScalableVector() &&
341 "Comparison between scalable and fixed types");
342 return knownBitsLT(VT);
343 }
344
345 /// Return true if this has no more bits than VT.
346 bool bitsLE(EVT VT) const {
347 if (EVT::operator==(VT)) return true;
348 assert(isScalableVector() == VT.isScalableVector() &&
349 "Comparison between scalable and fixed types");
350 return knownBitsLE(VT);
351 }
352
353 /// Return the SimpleValueType held in the specified simple EVT.
354 MVT getSimpleVT() const {
355 assert(isSimple() && "Expected a SimpleValueType!");
356 return V;
357 }
358
359 /// If this is a vector type, return the element type, otherwise return
360 /// this.
361 EVT getScalarType() const {
362 return isVector() ? getVectorElementType() : *this;
363 }
364
365 /// Given a vector type, return the type of each element.
366 EVT getVectorElementType() const {
367 assert(isVector() && "Invalid vector type!");
368 if (isSimple())
369 return V.getVectorElementType();
370 return getExtendedVectorElementType();
371 }
372
373 /// Given a vector type, return the number of elements it contains.
374 unsigned getVectorNumElements() const {
375 assert(isVector() && "Invalid vector type!");
376
377 if (isScalableVector())
378 llvm::reportFatalInternalError(
379 reason: "Possible incorrect use of EVT::getVectorNumElements() for "
380 "scalable vector. Scalable flag may be dropped, use "
381 "EVT::getVectorElementCount() instead");
382
383 return isSimple() ? V.getVectorNumElements()
384 : getExtendedVectorNumElements();
385 }
386
387 // Given a (possibly scalable) vector type, return the ElementCount
388 ElementCount getVectorElementCount() const {
389 assert((isVector()) && "Invalid vector type!");
390 if (isSimple())
391 return V.getVectorElementCount();
392
393 return getExtendedVectorElementCount();
394 }
395
396 /// Given a vector type, return the minimum number of elements it contains.
397 unsigned getVectorMinNumElements() const {
398 return getVectorElementCount().getKnownMinValue();
399 }
400
401 /// Given a RISCV vector tuple type, return the num_fields.
402 unsigned getRISCVVectorTupleNumFields() const {
403 return V.getRISCVVectorTupleNumFields();
404 }
405
406 /// Return the size of the specified value type in bits.
407 ///
408 /// If the value type is a scalable vector type, the scalable property will
409 /// be set and the runtime size will be a positive integer multiple of the
410 /// base size.
411 TypeSize getSizeInBits() const {
412 if (isSimple())
413 return V.getSizeInBits();
414 return getExtendedSizeInBits();
415 }
416
417 /// Return the size of the specified fixed width value type in bits. The
418 /// function will assert if the type is scalable.
419 uint64_t getFixedSizeInBits() const {
420 return getSizeInBits().getFixedValue();
421 }
422
423 uint64_t getScalarSizeInBits() const {
424 return getScalarType().getSizeInBits().getFixedValue();
425 }
426
427 /// Return the number of bytes overwritten by a store of the specified value
428 /// type.
429 ///
430 /// If the value type is a scalable vector type, the scalable property will
431 /// be set and the runtime size will be a positive integer multiple of the
432 /// base size.
433 TypeSize getStoreSize() const {
434 TypeSize BaseSize = getSizeInBits();
435 return {(BaseSize.getKnownMinValue() + 7) / 8, BaseSize.isScalable()};
436 }
437
438 // Return the number of bytes overwritten by a store of this value type or
439 // this value type's element type in the case of a vector.
440 uint64_t getScalarStoreSize() const {
441 return getScalarType().getStoreSize().getFixedValue();
442 }
443
444 /// Return the number of bits overwritten by a store of the specified value
445 /// type.
446 ///
447 /// If the value type is a scalable vector type, the scalable property will
448 /// be set and the runtime size will be a positive integer multiple of the
449 /// base size.
450 TypeSize getStoreSizeInBits() const {
451 return getStoreSize() * 8;
452 }
453
454 /// Rounds the bit-width of the given integer EVT up to the nearest power of
455 /// two (and at least to eight), and returns the integer EVT with that
456 /// number of bits.
457 EVT getRoundIntegerType(LLVMContext &Context) const {
458 assert(isInteger() && !isVector() && "Invalid integer type!");
459 unsigned BitWidth = getSizeInBits();
460 if (BitWidth <= 8)
461 return EVT(MVT::i8);
462 return getIntegerVT(Context, BitWidth: llvm::bit_ceil(Value: BitWidth));
463 }
464
465 /// Finds the smallest simple value type that is greater than or equal to
466 /// half the width of this EVT. If no simple value type can be found, an
467 /// extended integer value type of half the size (rounded up) is returned.
468 EVT getHalfSizedIntegerVT(LLVMContext &Context) const {
469 assert(isInteger() && !isVector() && "Invalid integer type!");
470 unsigned EVTSize = getSizeInBits();
471 for (unsigned IntVT = MVT::FIRST_INTEGER_VALUETYPE;
472 IntVT <= MVT::LAST_INTEGER_VALUETYPE; ++IntVT) {
473 EVT HalfVT = EVT((MVT::SimpleValueType)IntVT);
474 if (HalfVT.getSizeInBits() * 2 >= EVTSize)
475 return HalfVT;
476 }
477 return getIntegerVT(Context, BitWidth: (EVTSize + 1) / 2);
478 }
479
480 /// Return a VT for an integer element type with doubled bit width.
481 /// The type returned may be an extended type.
482 EVT widenIntegerElementType(LLVMContext &Context) const {
483 unsigned EVTSize = getScalarSizeInBits();
484 EVT EltVT = EVT::getIntegerVT(Context, BitWidth: 2 * EVTSize);
485 return changeElementType(Context, EltVT);
486 }
487
488 /// Return a VT for an integer vector type with the size of the
489 /// elements doubled. The type returned may be an extended type.
490 EVT widenIntegerVectorElementType(LLVMContext &Context) const {
491 EVT EltVT = getVectorElementType();
492 EltVT = EVT::getIntegerVT(Context, BitWidth: 2 * EltVT.getSizeInBits());
493 return EVT::getVectorVT(Context, VT: EltVT, EC: getVectorElementCount());
494 }
495
496 // Return a VT for a vector type with the same element type but
497 // half the number of elements. The type returned may be an
498 // extended type.
499 EVT getHalfNumVectorElementsVT(LLVMContext &Context) const {
500 EVT EltVT = getVectorElementType();
501 auto EltCnt = getVectorElementCount();
502 assert(EltCnt.isKnownEven() && "Splitting vector, but not in half!");
503 return EVT::getVectorVT(Context, VT: EltVT, EC: EltCnt.divideCoefficientBy(RHS: 2));
504 }
505
506 // Return a VT for a vector type with the same element type but
507 // double the number of elements. The type returned may be an
508 // extended type.
509 EVT getDoubleNumVectorElementsVT(LLVMContext &Context) const {
510 EVT EltVT = getVectorElementType();
511 auto EltCnt = getVectorElementCount();
512 return EVT::getVectorVT(Context, VT: EltVT, EC: EltCnt * 2);
513 }
514
515 /// Returns true if the given vector is a power of 2.
516 bool isPow2VectorType() const {
517 unsigned NElts = getVectorMinNumElements();
518 return !(NElts & (NElts - 1));
519 }
520
521 /// Widens the length of the given vector EVT up to the nearest power of 2
522 /// and returns that type.
523 EVT getPow2VectorType(LLVMContext &Context) const {
524 if (!isPow2VectorType()) {
525 ElementCount NElts = getVectorElementCount();
526 unsigned NewMinCount = 1 << Log2_32_Ceil(Value: NElts.getKnownMinValue());
527 NElts = ElementCount::get(MinVal: NewMinCount, Scalable: NElts.isScalable());
528 return EVT::getVectorVT(Context, VT: getVectorElementType(), EC: NElts);
529 }
530 else {
531 return *this;
532 }
533 }
534
535 /// Implement operator<<.
536 LLVM_ABI void print(raw_ostream &OS) const;
537
538 /// This function returns value type as a string, e.g. "i32".
539 std::string getEVTString() const {
540 std::string S;
541 llvm::raw_string_ostream Stream(S);
542 print(OS&: Stream);
543 return S;
544 }
545
546 /// Support for debugging, callable in GDB: VT.dump()
547 LLVM_ABI void dump() const;
548
549
550 /// This method returns an LLVM type corresponding to the specified EVT.
551 /// For integer types, this returns an unsigned type. Note that this will
552 /// abort for types that cannot be represented.
553 LLVM_ABI Type *getTypeForEVT(LLVMContext &Context) const;
554
555 /// Return the value type corresponding to the specified type.
556 /// If HandleUnknown is true, unknown types are returned as Other,
557 /// otherwise they are invalid.
558 /// NB: This includes pointer types, which require a DataLayout to convert
559 /// to a concrete value type.
560 LLVM_ABI static EVT getEVT(Type *Ty, bool HandleUnknown = false);
561
562 intptr_t getRawBits() const {
563 if (isSimple())
564 return V.SimpleTy;
565 else
566 return (intptr_t)(LLVMTy);
567 }
568
569 /// A meaningless but well-behaved order, useful for constructing
570 /// containers.
571 struct compareRawBits {
572 bool operator()(EVT L, EVT R) const {
573 if (L.V.SimpleTy == R.V.SimpleTy)
574 return L.LLVMTy < R.LLVMTy;
575 else
576 return L.V.SimpleTy < R.V.SimpleTy;
577 }
578 };
579
580 /// Returns an APFloat semantics tag appropriate for the value type. If this
581 /// is a vector type, the element semantics are returned.
582 LLVM_ABI const fltSemantics &getFltSemantics() const;
583
584 private:
585 // Methods for handling the Extended-type case in functions above.
586 // These are all out-of-line to prevent users of this header file
587 // from having a dependency on Type.h.
588 LLVM_ABI EVT changeExtendedTypeToInteger() const;
589 LLVM_ABI EVT changeExtendedVectorElementType(EVT EltVT) const;
590 LLVM_ABI EVT changeExtendedVectorElementTypeToInteger() const;
591 LLVM_ABI static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
592 LLVM_ABI static EVT getExtendedVectorVT(LLVMContext &C, EVT VT,
593 unsigned NumElements,
594 bool IsScalable);
595 LLVM_ABI static EVT getExtendedVectorVT(LLVMContext &Context, EVT VT,
596 ElementCount EC);
597 LLVM_ABI bool isExtendedFloatingPoint() const LLVM_READONLY;
598 LLVM_ABI bool isExtendedInteger() const LLVM_READONLY;
599 LLVM_ABI bool isExtendedScalarInteger() const LLVM_READONLY;
600 LLVM_ABI bool isExtendedVector() const LLVM_READONLY;
601 LLVM_ABI bool isExtended16BitVector() const LLVM_READONLY;
602 LLVM_ABI bool isExtended32BitVector() const LLVM_READONLY;
603 LLVM_ABI bool isExtended64BitVector() const LLVM_READONLY;
604 LLVM_ABI bool isExtended128BitVector() const LLVM_READONLY;
605 LLVM_ABI bool isExtended256BitVector() const LLVM_READONLY;
606 LLVM_ABI bool isExtended512BitVector() const LLVM_READONLY;
607 LLVM_ABI bool isExtended1024BitVector() const LLVM_READONLY;
608 LLVM_ABI bool isExtended2048BitVector() const LLVM_READONLY;
609 LLVM_ABI bool isExtendedFixedLengthVector() const LLVM_READONLY;
610 LLVM_ABI bool isExtendedScalableVector() const LLVM_READONLY;
611 LLVM_ABI EVT getExtendedVectorElementType() const;
612 LLVM_ABI unsigned getExtendedVectorNumElements() const LLVM_READONLY;
613 LLVM_ABI ElementCount getExtendedVectorElementCount() const LLVM_READONLY;
614 LLVM_ABI TypeSize getExtendedSizeInBits() const LLVM_READONLY;
615 };
616
617 inline raw_ostream &operator<<(raw_ostream &OS, const EVT &V) {
618 V.print(OS);
619 return OS;
620 }
621} // end namespace llvm
622
623#endif // LLVM_CODEGEN_VALUETYPES_H
624