[cfe-commits] r71556 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/x86_64-arguments.c
Daniel Dunbar
daniel at zuster.org
Tue May 12 08:22:45 PDT 2009
Author: ddunbar
Date: Tue May 12 10:22:40 2009
New Revision: 71556
URL: http://llvm.org/viewvc/llvm-project?rev=71556&view=rev
Log:
x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
- Merge algorithm was returning MEMORY as it should.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/test/CodeGen/x86_64-arguments.c
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=71556&r1=71555&r2=71556&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Tue May 12 10:22:40 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/trunk/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86_64-arguments.c?rev=71556&r1=71555&r2=71556&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/trunk/test/CodeGen/x86_64-arguments.c Tue May 12 10:22:40 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 cfe-commits
mailing list