]> granicus.if.org Git - clang/commitdiff
x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
authorDaniel Dunbar <daniel@zuster.org>
Fri, 30 Jan 2009 19:38:39 +0000 (19:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 30 Jan 2009 19:38:39 +0000 (19:38 +0000)
matches gcc 4.2 (not llvm-gcc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp

index 21eccdc2a363d508ae9b113d7bfea1b5ea75bfbc..cf4f60e3665966d0412126b854992d8628413ade 100644 (file)
@@ -521,10 +521,13 @@ void X86_64ABIInfo::classify(QualType Ty,
   } else if (const VectorType *VT = Ty->getAsVectorType()) {
     uint64_t Size = Context.getTypeSize(VT);
     if (Size == 64) {
-      // FIXME: For some reason, gcc appears to be treating <1 x
-      // double> as INTEGER; this seems wrong, but we will match for
-      // now (icc rejects <1 x double>, so...).
-      Lo = (VT->getElementType() == Context.DoubleTy) ? Integer : SSE;
+      // gcc passes <1 x double> in memory.
+      if (VT->getElementType() == Context.DoubleTy) {
+        Lo = Memory;
+        return;
+      }
+
+      Lo = Integer;
 
       // If this type crosses an eightbyte boundary, it should be
       // split.