Simplify this code; avoid duplicating the low-level implementation code.
[oota-llvm.git] / include / llvm / CodeGen / ValueTypes.h
1 //===- CodeGen/ValueTypes.h - Low-Level Target independ. types --*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the set of low-level target independent types which various
11 // values in the code generator are.  This allows the target specific behavior
12 // of instructions to be described to target independent passes.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CODEGEN_VALUETYPES_H
17 #define LLVM_CODEGEN_VALUETYPES_H
18
19 #include <cassert>
20 #include <string>
21 #include "llvm/System/DataTypes.h"
22 #include "llvm/Support/MathExtras.h"
23
24 namespace llvm {
25   class Type;
26   class LLVMContext;
27   struct EVT;
28
29   class MVT { // MVT = Machine Value Type
30   public:
31     enum SimpleValueType {
32       // If you change this numbering, you must change the values in
33       // ValueTypes.td as well!
34       Other          =   0,   // This is a non-standard value
35       i1             =   1,   // This is a 1 bit integer value
36       i8             =   2,   // This is an 8 bit integer value
37       i16            =   3,   // This is a 16 bit integer value
38       i32            =   4,   // This is a 32 bit integer value
39       i64            =   5,   // This is a 64 bit integer value
40       i128           =   6,   // This is a 128 bit integer value
41
42       FIRST_INTEGER_VALUETYPE = i1,
43       LAST_INTEGER_VALUETYPE  = i128,
44
45       f32            =   7,   // This is a 32 bit floating point value
46       f64            =   8,   // This is a 64 bit floating point value
47       f80            =   9,   // This is a 80 bit floating point value
48       f128           =  10,   // This is a 128 bit floating point value
49       ppcf128        =  11,   // This is a PPC 128-bit floating point value
50
51       v2i8           =  12,   //  2 x i8
52       v4i8           =  13,   //  4 x i8
53       v8i8           =  14,   //  8 x i8
54       v16i8          =  15,   // 16 x i8
55       v32i8          =  16,   // 32 x i8
56       v2i16          =  17,   //  2 x i16
57       v4i16          =  18,   //  4 x i16
58       v8i16          =  19,   //  8 x i16
59       v16i16         =  20,   // 16 x i16
60       v2i32          =  21,   //  2 x i32
61       v4i32          =  22,   //  4 x i32
62       v8i32          =  23,   //  8 x i32
63       v1i64          =  24,   //  1 x i64
64       v2i64          =  25,   //  2 x i64
65       v4i64          =  26,   //  4 x i64
66
67       v2f32          =  27,   //  2 x f32
68       v4f32          =  28,   //  4 x f32
69       v8f32          =  29,   //  8 x f32
70       v2f64          =  30,   //  2 x f64
71       v4f64          =  31,   //  4 x f64
72
73       FIRST_VECTOR_VALUETYPE = v2i8,
74       LAST_VECTOR_VALUETYPE  = v4f64,
75
76       Flag           =  32,   // This glues nodes together during pre-RA sched
77
78       isVoid         =  33,   // This has no value
79
80       LAST_VALUETYPE =  34,   // This always remains at the end of the list.
81
82       // This is the current maximum for LAST_VALUETYPE.
83       // EVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
84       // This value must be a multiple of 32.
85       MAX_ALLOWED_VALUETYPE = 64,
86
87       // Metadata - This is MDNode or MDString.
88       Metadata       = 250,
89
90       // iPTRAny - An int value the size of the pointer of the current
91       // target to any address space. This must only be used internal to
92       // tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
93       iPTRAny        = 251,
94
95       // vAny - A vector with any length and element size. This is used
96       // for intrinsics that have overloadings based on vector types.
97       // This is only for tblgen's consumption!
98       vAny           = 252,
99
100       // fAny - Any floating-point or vector floating-point value. This is used
101       // for intrinsics that have overloadings based on floating-point types.
102       // This is only for tblgen's consumption!
103       fAny           = 253,
104
105       // iAny - An integer or vector integer value of any bit width. This is
106       // used for intrinsics that have overloadings based on integer bit widths.
107       // This is only for tblgen's consumption!
108       iAny           = 254,
109
110       // iPTR - An int value the size of the pointer of the current
111       // target.  This should only be used internal to tblgen!
112       iPTR           = 255,
113
114       // LastSimpleValueType - The greatest valid SimpleValueType value.
115       LastSimpleValueType = 255,
116
117       // INVALID_SIMPLE_VALUE_TYPE - Simple value types greater than or equal
118       // to this are considered extended value types.
119       INVALID_SIMPLE_VALUE_TYPE = LastSimpleValueType + 1
120     };
121
122     SimpleValueType SimpleTy;
123
124     MVT() : SimpleTy((SimpleValueType)(INVALID_SIMPLE_VALUE_TYPE)) {}
125     MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
126     
127     bool operator>(const MVT& S)  const { return SimpleTy >  S.SimpleTy; }
128     bool operator<(const MVT& S)  const { return SimpleTy <  S.SimpleTy; }
129     bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
130     bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
131     bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
132     
133     /// isFloatingPoint - Return true if this is a FP, or a vector FP type.
134     bool isFloatingPoint() const {
135       return ((SimpleTy >= MVT::f32 && SimpleTy <= MVT::ppcf128) ||
136         (SimpleTy >= MVT::v2f32 && SimpleTy <= MVT::v4f64));
137     }
138
139     /// isInteger - Return true if this is an integer, or a vector integer type.
140     bool isInteger() const {
141       return ((SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE &&
142                SimpleTy <= MVT::LAST_INTEGER_VALUETYPE) ||
143                (SimpleTy >= MVT::v2i8 && SimpleTy <= MVT::v4i64));
144     }
145
146     /// isVector - Return true if this is a vector value type.
147     bool isVector() const {
148       return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE &&
149               SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
150     }
151     
152     /// isPow2VectorType - Returns true if the given vector is a power of 2.
153     bool isPow2VectorType() const {
154       unsigned NElts = getVectorNumElements();
155       return !(NElts & (NElts - 1));
156     }
157
158     /// getPow2VectorType - Widens the length of the given vector EVT up to
159     /// the nearest power of 2 and returns that type.
160     MVT getPow2VectorType() const {
161       if (!isPow2VectorType()) {
162         unsigned NElts = getVectorNumElements();
163         unsigned Pow2NElts = 1 <<  Log2_32_Ceil(NElts);
164         return MVT::getVectorVT(getVectorElementType(), Pow2NElts);
165       }
166       else {
167         return *this;
168       }
169     }
170
171     /// getScalarType - If this is a vector type, return the element type,
172     /// otherwise return this.
173     MVT getScalarType() const {
174       return isVector() ? getVectorElementType() : *this;
175     }
176     
177     MVT getVectorElementType() const {
178       switch (SimpleTy) {
179       default:
180         return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
181       case v2i8 :
182       case v4i8 :
183       case v8i8 :
184       case v16i8:
185       case v32i8: return i8;
186       case v2i16:
187       case v4i16:
188       case v8i16:
189       case v16i16: return i16;
190       case v2i32:
191       case v4i32:
192       case v8i32: return i32;
193       case v1i64:
194       case v2i64:
195       case v4i64: return i64;
196       case v2f32:
197       case v4f32:
198       case v8f32: return f32;
199       case v2f64:
200       case v4f64: return f64;
201       }
202     }
203     
204     unsigned getVectorNumElements() const {
205       switch (SimpleTy) {
206       default:
207         return ~0U;
208       case v32i8: return 32;
209       case v16i8:
210       case v16i16: return 16;
211       case v8i8 :
212       case v8i16:
213       case v8i32:
214       case v8f32: return 8;
215       case v4i8:
216       case v4i16:
217       case v4i32:
218       case v4i64:
219       case v4f32:
220       case v4f64: return 4;
221       case v2i8:
222       case v2i16:
223       case v2i32:
224       case v2i64:
225       case v2f32:
226       case v2f64: return 2;
227       case v1i64: return 1;
228       }
229     }
230     
231     unsigned getSizeInBits() const {
232       switch (SimpleTy) {
233       case iPTR:
234         assert(0 && "Value type size is target-dependent. Ask TLI.");
235       case iPTRAny:
236       case iAny:
237       case fAny:
238         assert(0 && "Value type is overloaded.");
239       default:
240         assert(0 && "getSizeInBits called on extended MVT.");
241       case i1  :  return 1;
242       case i8  :  return 8;
243       case i16 :
244       case v2i8:  return 16;
245       case f32 :
246       case i32 :
247       case v4i8:
248       case v2i16: return 32;
249       case f64 :
250       case i64 :
251       case v8i8:
252       case v4i16:
253       case v2i32:
254       case v1i64:
255       case v2f32: return 64;
256       case f80 :  return 80;
257       case f128:
258       case ppcf128:
259       case i128:
260       case v16i8:
261       case v8i16:
262       case v4i32:
263       case v2i64:
264       case v4f32:
265       case v2f64: return 128;
266       case v32i8:
267       case v16i16:
268       case v8i32:
269       case v4i64:
270       case v8f32:
271       case v4f64: return 256;
272       }
273     }
274     
275     static MVT getFloatingPointVT(unsigned BitWidth) {
276       switch (BitWidth) {
277       default:
278         assert(false && "Bad bit width!");
279       case 32:
280         return MVT::f32;
281       case 64:
282         return MVT::f64;
283       case 80:
284         return MVT::f80;
285       case 128:
286         return MVT::f128;
287       }
288     }
289     
290     static MVT getIntegerVT(unsigned BitWidth) {
291       switch (BitWidth) {
292       default:
293         return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
294       case 1:
295         return MVT::i1;
296       case 8:
297         return MVT::i8;
298       case 16:
299         return MVT::i16;
300       case 32:
301         return MVT::i32;
302       case 64:
303         return MVT::i64;
304       case 128:
305         return MVT::i128;
306       }
307     }
308     
309     static MVT getVectorVT(MVT VT, unsigned NumElements) {
310       switch (VT.SimpleTy) {
311       default:
312         break;
313       case MVT::i8:
314         if (NumElements == 2)  return MVT::v2i8;
315         if (NumElements == 4)  return MVT::v4i8;
316         if (NumElements == 8)  return MVT::v8i8;
317         if (NumElements == 16) return MVT::v16i8;
318         if (NumElements == 32) return MVT::v32i8;
319         break;
320       case MVT::i16:
321         if (NumElements == 2)  return MVT::v2i16;
322         if (NumElements == 4)  return MVT::v4i16;
323         if (NumElements == 8)  return MVT::v8i16;
324         if (NumElements == 16) return MVT::v16i16;
325         break;
326       case MVT::i32:
327         if (NumElements == 2)  return MVT::v2i32;
328         if (NumElements == 4)  return MVT::v4i32;
329         if (NumElements == 8)  return MVT::v8i32;
330         break;
331       case MVT::i64:
332         if (NumElements == 1)  return MVT::v1i64;
333         if (NumElements == 2)  return MVT::v2i64;
334         if (NumElements == 4)  return MVT::v4i64;
335         break;
336       case MVT::f32:
337         if (NumElements == 2)  return MVT::v2f32;
338         if (NumElements == 4)  return MVT::v4f32;
339         if (NumElements == 8)  return MVT::v8f32;
340         break;
341       case MVT::f64:
342         if (NumElements == 2)  return MVT::v2f64;
343         if (NumElements == 4)  return MVT::v4f64;
344         break;
345       }
346       return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
347     }
348     
349     static MVT getIntVectorWithNumElements(unsigned NumElts) {
350       switch (NumElts) {
351       default: return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
352       case  1: return MVT::v1i64;
353       case  2: return MVT::v2i32;
354       case  4: return MVT::v4i16;
355       case  8: return MVT::v8i8;
356       case 16: return MVT::v16i8;
357       }
358     }
359   };
360
361   struct EVT { // EVT = Extended Value Type
362   private:
363     MVT V;
364     const Type *LLVMTy;
365
366   public:
367     EVT() : V((MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE)),
368             LLVMTy(0) {}
369     EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(0) { }
370     EVT(MVT S) : V(S), LLVMTy(0) {}
371
372     bool operator==(const EVT VT) const {
373       if (V.SimpleTy == VT.V.SimpleTy) {
374         if (V.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
375           return LLVMTy == VT.LLVMTy;
376         return true;
377       }
378       return false;
379     }
380     bool operator!=(const EVT VT) const {
381       if (V.SimpleTy == VT.V.SimpleTy) {
382         if (V.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
383           return LLVMTy != VT.LLVMTy;
384         return false;
385       }
386       return true;
387     }
388
389     /// getFloatingPointVT - Returns the EVT that represents a floating point
390     /// type with the given number of bits.  There are two floating point types
391     /// with 128 bits - this returns f128 rather than ppcf128.
392     static EVT getFloatingPointVT(unsigned BitWidth) {
393       return MVT::getFloatingPointVT(BitWidth);
394     }
395
396     /// getIntegerVT - Returns the EVT that represents an integer with the given
397     /// number of bits.
398     static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) {
399       MVT M = MVT::getIntegerVT(BitWidth);
400       if (M.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
401         return getExtendedIntegerVT(Context, BitWidth);
402       else
403         return M;
404     }
405
406     /// getVectorVT - Returns the EVT that represents a vector NumElements in
407     /// length, where each element is of type VT.
408     static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements) {
409       MVT M = MVT::getVectorVT(VT.V, NumElements);
410       if (M.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
411         return getExtendedVectorVT(Context, VT, NumElements);
412       else
413         return M;
414     }
415
416     /// getIntVectorWithNumElements - Return any integer vector type that has
417     /// the specified number of elements.
418     static EVT getIntVectorWithNumElements(LLVMContext &C, unsigned NumElts) {
419       MVT M = MVT::getIntVectorWithNumElements(NumElts);
420       if (M.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
421         return getVectorVT(C, MVT::i8, NumElts);
422       else
423         return M;
424     }
425
426     /// isSimple - Test if the given EVT is simple (as opposed to being
427     /// extended).
428     bool isSimple() const {
429       return V.SimpleTy <= MVT::LastSimpleValueType;
430     }
431
432     /// isExtended - Test if the given EVT is extended (as opposed to
433     /// being simple).
434     bool isExtended() const {
435       return !isSimple();
436     }
437
438     /// isFloatingPoint - Return true if this is a FP, or a vector FP type.
439     bool isFloatingPoint() const {
440       return isSimple() ? V.isFloatingPoint() : isExtendedFloatingPoint();
441     }
442
443     /// isInteger - Return true if this is an integer, or a vector integer type.
444     bool isInteger() const {
445       return isSimple() ? V.isInteger() : isExtendedInteger();
446     }
447
448     /// isVector - Return true if this is a vector value type.
449     bool isVector() const {
450       return isSimple() ? V.isVector() : isExtendedVector();
451     }
452
453     /// is64BitVector - Return true if this is a 64-bit vector type.
454     bool is64BitVector() const {
455       return isSimple() ?
456              (V==MVT::v8i8 || V==MVT::v4i16 || V==MVT::v2i32 ||
457               V==MVT::v1i64 || V==MVT::v2f32) :
458              isExtended64BitVector();
459     }
460
461     /// is128BitVector - Return true if this is a 128-bit vector type.
462     bool is128BitVector() const {
463       return isSimple() ?
464              (V==MVT::v16i8 || V==MVT::v8i16 || V==MVT::v4i32 ||
465               V==MVT::v2i64 || V==MVT::v4f32 || V==MVT::v2f64) :
466              isExtended128BitVector();
467     }
468
469     /// is256BitVector - Return true if this is a 256-bit vector type.
470     inline bool is256BitVector() const {
471       return isSimple() ?
472              (V==MVT::v8f32 || V==MVT::v4f64 || V==MVT::v32i8 ||
473               V==MVT::v16i16 || V==MVT::v8i32 || V==MVT::v4i64) : 
474             isExtended256BitVector();
475     }
476
477     /// isOverloaded - Return true if this is an overloaded type for TableGen.
478     bool isOverloaded() const {
479       return (V==MVT::iAny || V==MVT::fAny || V==MVT::vAny || V==MVT::iPTRAny);
480     }
481
482     /// isByteSized - Return true if the bit size is a multiple of 8.
483     bool isByteSized() const {
484       return (getSizeInBits() & 7) == 0;
485     }
486
487     /// isRound - Return true if the size is a power-of-two number of bytes.
488     bool isRound() const {
489       unsigned BitSize = getSizeInBits();
490       return BitSize >= 8 && !(BitSize & (BitSize - 1));
491     }
492
493     /// bitsEq - Return true if this has the same number of bits as VT.
494     bool bitsEq(EVT VT) const {
495       return getSizeInBits() == VT.getSizeInBits();
496     }
497
498     /// bitsGT - Return true if this has more bits than VT.
499     bool bitsGT(EVT VT) const {
500       return getSizeInBits() > VT.getSizeInBits();
501     }
502
503     /// bitsGE - Return true if this has no less bits than VT.
504     bool bitsGE(EVT VT) const {
505       return getSizeInBits() >= VT.getSizeInBits();
506     }
507
508     /// bitsLT - Return true if this has less bits than VT.
509     bool bitsLT(EVT VT) const {
510       return getSizeInBits() < VT.getSizeInBits();
511     }
512
513     /// bitsLE - Return true if this has no more bits than VT.
514     bool bitsLE(EVT VT) const {
515       return getSizeInBits() <= VT.getSizeInBits();
516     }
517
518
519     /// getSimpleVT - Return the SimpleValueType held in the specified
520     /// simple EVT.
521     MVT getSimpleVT() const {
522       assert(isSimple() && "Expected a SimpleValueType!");
523       return V;
524     }
525
526     /// getScalarType - If this is a vector type, return the element type,
527     /// otherwise return this.
528     EVT getScalarType() const {
529       return isVector() ? getVectorElementType() : *this;
530     }
531     
532     /// getVectorElementType - Given a vector type, return the type of
533     /// each element.
534     EVT getVectorElementType() const {
535       assert(isVector() && "Invalid vector type!");
536       if (isSimple())
537         return V.getVectorElementType();
538       else
539         return getExtendedVectorElementType();
540     }
541
542     /// getVectorNumElements - Given a vector type, return the number of
543     /// elements it contains.
544     unsigned getVectorNumElements() const {
545       assert(isVector() && "Invalid vector type!");
546       if (isSimple())
547         return V.getVectorNumElements();
548       else
549         return getExtendedVectorNumElements();
550     }
551
552     /// getSizeInBits - Return the size of the specified value type in bits.
553     unsigned getSizeInBits() const {
554       if (isSimple())
555         return V.getSizeInBits();
556       else
557         return getExtendedSizeInBits();
558     }
559
560     /// getStoreSize - Return the number of bytes overwritten by a store
561     /// of the specified value type.
562     unsigned getStoreSize() const {
563       return (getSizeInBits() + 7) / 8;
564     }
565
566     /// getStoreSizeInBits - Return the number of bits overwritten by a store
567     /// of the specified value type.
568     unsigned getStoreSizeInBits() const {
569       return getStoreSize() * 8;
570     }
571
572     /// getRoundIntegerType - Rounds the bit-width of the given integer EVT up
573     /// to the nearest power of two (and at least to eight), and returns the
574     /// integer EVT with that number of bits.
575     EVT getRoundIntegerType(LLVMContext &Context) const {
576       assert(isInteger() && !isVector() && "Invalid integer type!");
577       unsigned BitWidth = getSizeInBits();
578       if (BitWidth <= 8)
579         return EVT(MVT::i8);
580       else
581         return getIntegerVT(Context, 1 << Log2_32_Ceil(BitWidth));
582     }
583
584     /// getHalfSizedIntegerVT - Finds the smallest simple value type that is
585     /// greater than or equal to half the width of this EVT. If no simple
586     /// value type can be found, an extended integer value type of half the
587     /// size (rounded up) is returned.
588     EVT getHalfSizedIntegerVT(LLVMContext &Context) const {
589       assert(isInteger() && !isVector() && "Invalid integer type!");
590       unsigned EVTSize = getSizeInBits();
591       for (unsigned IntVT = MVT::FIRST_INTEGER_VALUETYPE;
592           IntVT <= MVT::LAST_INTEGER_VALUETYPE;
593           ++IntVT) {
594         EVT HalfVT = EVT((MVT::SimpleValueType)IntVT);
595         if(HalfVT.getSizeInBits() * 2 >= EVTSize) { 
596           return HalfVT;
597         }
598       }
599       return getIntegerVT(Context, (EVTSize + 1) / 2);
600     }
601
602     /// isPow2VectorType - Returns true if the given vector is a power of 2.
603     bool isPow2VectorType() const {
604       unsigned NElts = getVectorNumElements();
605       return !(NElts & (NElts - 1));
606     }
607
608     /// getPow2VectorType - Widens the length of the given vector EVT up to
609     /// the nearest power of 2 and returns that type.
610     EVT getPow2VectorType(LLVMContext &Context) const {
611       if (!isPow2VectorType()) {
612         unsigned NElts = getVectorNumElements();
613         unsigned Pow2NElts = 1 <<  Log2_32_Ceil(NElts);
614         return EVT::getVectorVT(Context, getVectorElementType(), Pow2NElts);
615       }
616       else {
617         return *this;
618       }
619     }
620
621     /// getEVTString - This function returns value type as a string,
622     /// e.g. "i32".
623     std::string getEVTString() const;
624
625     /// getTypeForEVT - This method returns an LLVM type corresponding to the
626     /// specified EVT.  For integer types, this returns an unsigned type.  Note
627     /// that this will abort for types that cannot be represented.
628     const Type *getTypeForEVT(LLVMContext &Context) const;
629
630     /// getEVT - Return the value type corresponding to the specified type.
631     /// This returns all pointers as iPTR.  If HandleUnknown is true, unknown
632     /// types are returned as Other, otherwise they are invalid.
633     static EVT getEVT(const Type *Ty, bool HandleUnknown = false);
634
635     intptr_t getRawBits() {
636       if (isSimple())
637         return V.SimpleTy;
638       else
639         return (intptr_t)(LLVMTy);
640     }
641
642     /// compareRawBits - A meaningless but well-behaved order, useful for
643     /// constructing containers.
644     struct compareRawBits {
645       bool operator()(EVT L, EVT R) const {
646         if (L.V.SimpleTy == R.V.SimpleTy)
647           return L.LLVMTy < R.LLVMTy;
648         else
649           return L.V.SimpleTy < R.V.SimpleTy;
650       }
651     };
652
653   private:
654     // Methods for handling the Extended-type case in functions above.
655     // These are all out-of-line to prevent users of this header file
656     // from having a dependency on Type.h.
657     static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
658     static EVT getExtendedVectorVT(LLVMContext &C, EVT VT,
659                                    unsigned NumElements);
660     bool isExtendedFloatingPoint() const;
661     bool isExtendedInteger() const;
662     bool isExtendedVector() const;
663     bool isExtended64BitVector() const;
664     bool isExtended128BitVector() const;
665     bool isExtended256BitVector() const;
666     EVT getExtendedVectorElementType() const;
667     unsigned getExtendedVectorNumElements() const;
668     unsigned getExtendedSizeInBits() const;
669   };
670
671 } // End llvm namespace
672
673 #endif