summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2011-11-28 23:18:11 +0000
committerTanya Lattner <tonic@nondot.org>2011-11-28 23:18:11 +0000
commit71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426 (patch)
tree9ecfbe85947f16f6d573816f8bfe592b4535a9d4 /clang/lib/CodeGen
parenta7c7e2bb8473f35123e3102d6f1eadda4141043a (diff)
downloadbcm5719-llvm-71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426.tar.gz
bcm5719-llvm-71f1b2dcd43f8ba38ff76f2d1bfd59f8f8ed7426.zip
Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case. llvm-svn: 145312
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 73bb9902cb1..944eae85d51 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -1427,7 +1427,7 @@ llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
if (llvm::VectorType *VT = dyn_cast<llvm::VectorType>(IRType)){
llvm::Type *EltTy = VT->getElementType();
unsigned BitWidth = VT->getBitWidth();
- if ((BitWidth == 128 || BitWidth == 256) &&
+ if ((BitWidth >= 128 && BitWidth <= 256) &&
(EltTy->isFloatTy() || EltTy->isDoubleTy() ||
EltTy->isIntegerTy(8) || EltTy->isIntegerTy(16) ||
EltTy->isIntegerTy(32) || EltTy->isIntegerTy(64) ||
OpenPOWER on IntegriCloud