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