[llvm-commits] [llvm] r166536 - in /llvm/trunk: lib/Target/X86/X86CallingConv.td test/CodeGen/X86/fast-cc-callee-pops.ll test/CodeGen/X86/fast-cc-merge-stack-adj.ll test/CodeGen/X86/fast-cc-pass-in-regs.ll
Rafael Espindola
rafael.espindola at gmail.com
Tue Oct 23 18:58:48 PDT 2012
Author: rafael
Date: Tue Oct 23 20:58:48 2012
New Revision: 166536
URL: http://llvm.org/viewvc/llvm-project?rev=166536&view=rev
Log:
Change x86_fastcallcc to require inreg markers. This allows it to known
the difference from "int x" (which should go in registers and
"struct y {int x;}" (which should not).
Clang will be updated in the next patches.
Modified:
llvm/trunk/lib/Target/X86/X86CallingConv.td
llvm/trunk/test/CodeGen/X86/fast-cc-callee-pops.ll
llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll
llvm/trunk/test/CodeGen/X86/fast-cc-pass-in-regs.ll
Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=166536&r1=166535&r2=166536&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/trunk/lib/Target/X86/X86CallingConv.td Tue Oct 23 20:58:48 2012
@@ -324,7 +324,7 @@
CCIfNest<CCAssignToReg<[EAX]>>,
// The first 2 integer arguments are passed in ECX/EDX
- CCIfType<[i32], CCAssignToReg<[ECX, EDX]>>,
+ CCIfInReg<CCIfType<[i32], CCAssignToReg<[ECX, EDX]>>>,
// Otherwise, same as everything else.
CCDelegateTo<CC_X86_32_Common>
Modified: llvm/trunk/test/CodeGen/X86/fast-cc-callee-pops.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-cc-callee-pops.ll?rev=166536&r1=166535&r2=166536&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-cc-callee-pops.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-cc-callee-pops.ll Tue Oct 23 20:58:48 2012
@@ -2,12 +2,12 @@
; Check that a fastcc function pops its stack variables before returning.
-define x86_fastcallcc void @func(i64 %X, i64 %Y, float %G, double %Z) nounwind {
+define x86_fastcallcc void @func(i64 inreg %X, i64 %Y, float %G, double %Z) nounwind {
ret void
; CHECK: ret{{.*}}20
}
-define x86_thiscallcc void @func2(i32 %X, i64 %Y, float %G, double %Z) nounwind {
+define x86_thiscallcc void @func2(i32 inreg %X, i64 %Y, float %G, double %Z) nounwind {
ret void
; CHECK: ret{{.*}}20
}
Modified: llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll?rev=166536&r1=166535&r2=166536&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll Tue Oct 23 20:58:48 2012
@@ -3,7 +3,7 @@
target triple = "i686-pc-linux-gnu"
-declare x86_fastcallcc void @func(i32*, i64)
+declare x86_fastcallcc void @func(i32*, i64 inreg)
define x86_fastcallcc void @caller(i32, i64) {
%X = alloca i32 ; <i32*> [#uses=1]
Modified: llvm/trunk/test/CodeGen/X86/fast-cc-pass-in-regs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-cc-pass-in-regs.ll?rev=166536&r1=166535&r2=166536&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-cc-pass-in-regs.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-cc-pass-in-regs.ll Tue Oct 23 20:58:48 2012
@@ -1,7 +1,7 @@
; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | FileCheck %s
; check that fastcc is passing stuff in regs.
-declare x86_fastcallcc i64 @callee(i64)
+declare x86_fastcallcc i64 @callee(i64 inreg)
define i64 @caller() {
%X = call x86_fastcallcc i64 @callee( i64 4294967299 ) ; <i64> [#uses=1]
@@ -9,7 +9,7 @@
ret i64 %X
}
-define x86_fastcallcc i64 @caller2(i64 %X) {
+define x86_fastcallcc i64 @caller2(i64 inreg %X) {
ret i64 %X
; CHECK: mov{{.*}}EAX, ECX
}
More information about the llvm-commits
mailing list