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 71ef679..4589631 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -843,7 +843,7 @@
   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();