From: Daniel Dunbar Date: Sun, 22 Feb 2009 07:22:25 +0000 (+0000) Subject: x86_64 ABI: Make sure to pass vectors that we want to pass in memory X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=775e43b3bd47d9388608a57f7489982d3024fdc5;p=clang x86_64 ABI: Make sure to pass vectors that we want to pass in memory as byval. Otherwise LLVM will have its own opinion about where to put things. We now pass all gcc dg.compat tests on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65266 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 71ef679f18..45896314ec 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -843,7 +843,7 @@ ABIArgInfo X86_64ABIInfo::classifyArgumentType(QualType Ty, ASTContext &Context, case X87: case ComplexX87: // Choose appropriate in memory type. - if (CodeGenFunction::hasAggregateLLVMType(Ty)) + if (Ty->isVectorType() || CodeGenFunction::hasAggregateLLVMType(Ty)) return ABIArgInfo::getIndirect(0); else return ABIArgInfo::getDirect();