1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2024-12-15 04:30:12 +00:00

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
This commit is contained in:
Duncan Sands 2009-04-19 06:23:05 +00:00
parent 0941b0f655
commit 4a930ecd2a

View File

@ -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