[llvm-commits] [llvm] r72106 - in /llvm/trunk: lib/Target/ARM/ARMCallingConv.td test/CodeGen/ARM/arguments-nosplit-double.ll test/CodeGen/ARM/arguments-nosplit-i64.ll
Bob Wilson
bob.wilson at apple.com
Tue May 19 03:02:41 PDT 2009
Author: bwilson
Date: Tue May 19 05:02:36 2009
New Revision: 72106
URL: http://llvm.org/viewvc/llvm-project?rev=72106&view=rev
Log:
Fix pr4058 and pr4059. Do not split i64 or double arguments between r3 and
the stack. Patch by Sandeep Patel.
Added:
llvm/trunk/test/CodeGen/ARM/arguments-nosplit-double.ll
llvm/trunk/test/CodeGen/ARM/arguments-nosplit-i64.ll
Modified:
llvm/trunk/lib/Target/ARM/ARMCallingConv.td
Modified: llvm/trunk/lib/Target/ARM/ARMCallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCallingConv.td?rev=72106&r1=72105&r2=72106&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCallingConv.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMCallingConv.td Tue May 19 05:02:36 2009
@@ -51,11 +51,14 @@
// i64/f64 is passed in even pairs of GPRs
// i64 is 8-aligned i32 here, so we may need to eat R1 as a pad register
+ // (and the same is true for f64 if VFP is not enabled)
CCIfType<[i32], CCIfAlign<"8", CCAssignToRegWithShadow<[R0, R2], [R0, R1]>>>,
CCIfType<[f64], CCCustom<"CC_ARM_AAPCS_Custom_f64">>,
CCIfType<[f32], CCBitConvertToType<i32>>,
- CCIfType<[i32], CCAssignToReg<[R0, R1, R2, R3]>>,
+ CCIfType<[i32], CCIf<"State.getNextStackOffset() == 0 &&"
+ "ArgFlags.getOrigAlign() != 8",
+ CCAssignToReg<[R0, R1, R2, R3]>>>,
CCIfType<[i32], CCAssignToStack<4, 4>>,
CCIfType<[f64], CCAssignToStack<8, 8>>
Added: llvm/trunk/test/CodeGen/ARM/arguments-nosplit-double.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/arguments-nosplit-double.ll?rev=72106&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/arguments-nosplit-double.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/arguments-nosplit-double.ll Tue May 19 05:02:36 2009
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | not grep r3
+; PR4059
+
+define i32 @f(i64 %z, i32 %a, double %b) {
+ %tmp = call i32 @g(double %b)
+ ret i32 %tmp
+}
+
+declare i32 @g(double)
Added: llvm/trunk/test/CodeGen/ARM/arguments-nosplit-i64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/arguments-nosplit-i64.ll?rev=72106&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/arguments-nosplit-i64.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/arguments-nosplit-i64.ll Tue May 19 05:02:36 2009
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -mtriple=arm-linux-gnueabi | not grep r3
+; PR4058
+
+define i32 @f(i64 %z, i32 %a, i64 %b) {
+ %tmp = call i32 @g(i64 %b)
+ ret i32 %tmp
+}
+
+declare i32 @g(i64)
More information about the llvm-commits
mailing list