[llvm-commits] [llvm] r46262 - in /llvm/trunk: lib/Target/X86/X86CallingConv.td test/CodeGen/X86/sse-varargs.ll
Evan Cheng
evan.cheng at apple.com
Tue Jan 22 15:26:54 PST 2008
Author: evancheng
Date: Tue Jan 22 17:26:53 2008
New Revision: 46262
URL: http://llvm.org/viewvc/llvm-project?rev=46262&view=rev
Log:
SSE varargs arguments are passed in memory.
Added:
llvm/trunk/test/CodeGen/X86/sse-varargs.ll
Modified:
llvm/trunk/lib/Target/X86/X86CallingConv.td
Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=46262&r1=46261&r2=46262&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/trunk/lib/Target/X86/X86CallingConv.td Tue Jan 22 17:26:53 2008
@@ -190,8 +190,8 @@
CCIfType<[f80], CCAssignToStack<0, 4>>,
// The first 4 vector arguments are passed in XMM registers.
- CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
- CCAssignToReg<[XMM0, XMM1, XMM2, XMM3]>>,
+ CCIfNotVarArg<CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
+ CCAssignToReg<[XMM0, XMM1, XMM2, XMM3]>>>,
// Other vectors get 16-byte stack slots that are 16-byte aligned.
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>,
Added: llvm/trunk/test/CodeGen/X86/sse-varargs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-varargs.ll?rev=46262&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse-varargs.ll (added)
+++ llvm/trunk/test/CodeGen/X86/sse-varargs.ll Tue Jan 22 17:26:53 2008
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xmm | grep esp
+
+define i32 @t() nounwind {
+entry:
+ tail call void (i32, ...)* @foo( i32 1, <4 x i32> < i32 10, i32 11, i32 12, i32 13 > ) nounwind
+ ret i32 0
+}
+
+declare void @foo(i32, ...)
More information about the llvm-commits
mailing list