aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
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
commitce275675d33142c235d7027db16abe43da616ee4 (patch)
treeb09458c34afd60e9aec1c01e4c4da139d96ea57d /lib/CodeGen/TargetInfo.cpp
parentad5459a67c7c04960df52d21af08b2e99af537b4 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 73bb9902cb..944eae85d5 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/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) ||