]> granicus.if.org Git - clang/commitdiff
x86_64 ABI: Make sure to pass vectors that we want to pass in memory
authorDaniel Dunbar <daniel@zuster.org>
Sun, 22 Feb 2009 07:22:25 +0000 (07:22 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 22 Feb 2009 07:22:25 +0000 (07:22 +0000)
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

lib/CodeGen/CGCall.cpp

index 71ef679f18e579a66f9cc53b6c737cbe87742822..45896314ecb23e960c0e8e3b7827dda52aa64197 100644 (file)
@@ -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();