From 4a930ecd2aa0a423f92658ec6880497b011ee669 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 19 Apr 2009 06:23:05 +0000 Subject: [PATCH] Remove the SimpleTy enumerated type field from the MVT value type union: this field was causing problems for some compilers on 64 bit systems, presumably because SimpleTy is 32 bits wide while the other fields are 64 bits wide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69515 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ValueTypes.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 3c6f0425363..95c3a114801 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -107,7 +107,6 @@ namespace llvm { /// union { uintptr_t V; - SimpleValueType SimpleTy; const Type *LLVMTy; }; @@ -229,41 +228,36 @@ namespace llvm { /// isFloatingPoint - Return true if this is a FP, or a vector FP type. bool isFloatingPoint() const { return isSimple() ? - ((SimpleTy >= f32 && SimpleTy <= ppcf128) || - (SimpleTy >= v2f32 && SimpleTy <= v2f64)) : + ((V >= f32 && V <= ppcf128) || (V >= v2f32 && V <= v2f64)) : isExtendedFloatingPoint(); } /// isInteger - Return true if this is an integer, or a vector integer type. bool isInteger() const { return isSimple() ? - ((SimpleTy >= FIRST_INTEGER_VALUETYPE && - SimpleTy <= LAST_INTEGER_VALUETYPE) || - (SimpleTy >= v2i8 && SimpleTy <= v2i64)) : - isExtendedInteger(); + ((V >= FIRST_INTEGER_VALUETYPE && V <= LAST_INTEGER_VALUETYPE) || + (V >= v2i8 && V <= v2i64)) : isExtendedInteger(); } /// isVector - Return true if this is a vector value type. bool isVector() const { return isSimple() ? - (SimpleTy >= FIRST_VECTOR_VALUETYPE && - SimpleTy <= LAST_VECTOR_VALUETYPE) : + (V >= FIRST_VECTOR_VALUETYPE && V <= LAST_VECTOR_VALUETYPE) : isExtendedVector(); } /// is64BitVector - Return true if this is a 64-bit vector type. bool is64BitVector() const { return isSimple() ? - (SimpleTy==v8i8 || SimpleTy==v4i16 || SimpleTy==v2i32 || - SimpleTy==v1i64 || SimpleTy==v2f32) : + (V==v8i8 || V==v4i16 || V==v2i32 || V==v1i64 || V==v2f32) : isExtended64BitVector(); } /// is128BitVector - Return true if this is a 128-bit vector type. bool is128BitVector() const { return isSimple() ? - (SimpleTy==v16i8 || SimpleTy==v8i16 || SimpleTy==v4i32 || - SimpleTy==v2i64 || SimpleTy==v4f32 || SimpleTy==v2f64) : + (V==v16i8 || V==v8i16 || V==v4i32 || + V==v2i64 || V==v4f32 || V==v2f64) : isExtended128BitVector(); } @@ -308,7 +302,7 @@ namespace llvm { /// simple MVT. SimpleValueType getSimpleVT() const { assert(isSimple() && "Expected a SimpleValueType!"); - return SimpleTy; + return SimpleValueType(V); } /// getVectorElementType - Given a vector type, return the type of -- 2.34.1