[llvm-branch-commits] [cfe-branch] r71557 - in /cfe/branches/Apple/Dib: lib/CodeGen/CGCall.cpp test/CodeGen/x86_64-arguments.c

Mike Stump mrs at apple.com
Tue May 12 08:40:34 PDT 2009


Author: mrs
Date: Tue May 12 10:40:19 2009
New Revision: 71557

URL: http://llvm.org/viewvc/llvm-project?rev=71557&view=rev
Log:
Merge in 71556:

x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
 - Merge algorithm was returning MEMORY as it should.

Modified:
    cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp
    cfe/branches/Apple/Dib/test/CodeGen/x86_64-arguments.c

Modified: cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp?rev=71557&r1=71556&r2=71557&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp (original)
+++ cfe/branches/Apple/Dib/lib/CodeGen/CGCall.cpp Tue May 12 10:40:19 2009
@@ -633,7 +633,8 @@
     return Field;
   else if (Accum == Integer || Field == Integer) 
     return Integer;
-  else if (Field == X87 || Field == X87Up || Field == ComplexX87)
+  else if (Field == X87 || Field == X87Up || Field == ComplexX87 ||
+           Accum == X87 || Accum == X87Up)
     return Memory;
   else
     return SSE;

Modified: cfe/branches/Apple/Dib/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/test/CodeGen/x86_64-arguments.c?rev=71557&r1=71556&r2=71557&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/branches/Apple/Dib/test/CodeGen/x86_64-arguments.c Tue May 12 10:40:19 2009
@@ -52,4 +52,7 @@
 struct s10 { int a; int b; int : 0; };
 void f10(struct s10 a0) {}
 
+// RUN: grep 'define void @f11(.union.anon. noalias sret .agg.result)' %t &&
+union { long double a; float b; } f11() {}
+
 // RUN: true





More information about the llvm-branch-commits mailing list