From 29fc6f35a5a284e0c304b1877e9acf040bfca339 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Wed, 15 Sep 2010 00:52:23 +0000 Subject: [PATCH] Add x86MMX a few more places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113914 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Type.h | 3 ++- lib/Target/TargetData.cpp | 1 + lib/VMCore/ValueTypes.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/Type.h b/include/llvm/Type.h index b493879e957..0939d67265b 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -313,7 +313,8 @@ public: /// bool isSized() const { // If it's a primitive, it is always sized. - if (ID == IntegerTyID || isFloatingPointTy() || ID == PointerTyID) + if (ID == IntegerTyID || isFloatingPointTy() || ID == PointerTyID || + ID == X86_MMXTyID) return true; // If it is not something that can have a size (e.g. a function or label), // it doesn't have a size. diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 74e95e779b8..0a282c38c03 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -524,6 +524,7 @@ unsigned TargetData::getAlignment(const Type *Ty, bool abi_or_pref) const { case Type::X86_FP80TyID: AlignType = FLOAT_ALIGN; break; + case Type::X86_MMXTyID: case Type::VectorTyID: AlignType = VECTOR_ALIGN; break; diff --git a/lib/VMCore/ValueTypes.cpp b/lib/VMCore/ValueTypes.cpp index f744fe8aefe..b59e2027495 100644 --- a/lib/VMCore/ValueTypes.cpp +++ b/lib/VMCore/ValueTypes.cpp @@ -198,6 +198,7 @@ EVT EVT::getEVT(const Type *Ty, bool HandleUnknown){ case Type::FloatTyID: return MVT(MVT::f32); case Type::DoubleTyID: return MVT(MVT::f64); case Type::X86_FP80TyID: return MVT(MVT::f80); + case Type::X86_MMXTyID: return MVT(MVT::x86mmx); case Type::FP128TyID: return MVT(MVT::f128); case Type::PPC_FP128TyID: return MVT(MVT::ppcf128); case Type::PointerTyID: return MVT(MVT::iPTR);