[llvm-branch-commits] [llvm-branch] r99599 - in /llvm/branches/Apple/Morbo: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/pic.ll test/CodeGen/X86/sibcall.ll test/CodeGen/X86/xor-icmp.ll

Evan Cheng evan.cheng at apple.com
Thu Mar 25 19:15:52 PDT 2010


Author: evancheng
Date: Thu Mar 25 21:15:52 2010
New Revision: 99599

URL: http://llvm.org/viewvc/llvm-project?rev=99599&view=rev
Log:
Merge 99598.

Modified:
    llvm/branches/Apple/Morbo/lib/Target/X86/X86ISelLowering.cpp
    llvm/branches/Apple/Morbo/test/CodeGen/X86/pic.ll
    llvm/branches/Apple/Morbo/test/CodeGen/X86/sibcall.ll
    llvm/branches/Apple/Morbo/test/CodeGen/X86/xor-icmp.ll

Modified: llvm/branches/Apple/Morbo/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/X86/X86ISelLowering.cpp?rev=99599&r1=99598&r2=99599&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/X86/X86ISelLowering.cpp Thu Mar 25 21:15:52 2010
@@ -2301,8 +2301,9 @@
   // Look for obvious safe cases to perform tail call optimization that does not
   // requite ABI changes. This is what gcc calls sibcall.
 
-  // Do not sibcall optimize vararg calls for now.
-  if (isVarArg)
+  // Do not sibcall optimize vararg calls unless the call site is not passing any
+  // arguments.
+  if (isVarArg && !Outs.empty())
     return false;
 
   // Also avoid sibcall optimization if either caller or callee uses struct

Modified: llvm/branches/Apple/Morbo/test/CodeGen/X86/pic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/X86/pic.ll?rev=99599&r1=99598&r2=99599&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/X86/pic.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/X86/pic.ll Thu Mar 25 21:15:52 2010
@@ -194,10 +194,10 @@
 
 ; LINUX: .LJTI8_0:
 ; LINUX:   .long	 .LBB8_2 at GOTOFF
-; LINUX:   .long	 .LBB8_2 at GOTOFF
-; LINUX:   .long	 .LBB8_7 at GOTOFF
-; LINUX:   .long	 .LBB8_3 at GOTOFF
-; LINUX:   .long	 .LBB8_7 at GOTOFF
+; LINUX:   .long	 .LBB8_8 at GOTOFF
+; LINUX:   .long	 .LBB8_14 at GOTOFF
+; LINUX:   .long	 .LBB8_9 at GOTOFF
+; LINUX:   .long	 .LBB8_10 at GOTOFF
 }
 
 declare void @foo1(...)

Modified: llvm/branches/Apple/Morbo/test/CodeGen/X86/sibcall.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/X86/sibcall.ll?rev=99599&r1=99598&r2=99599&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/X86/sibcall.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/X86/sibcall.ll Thu Mar 25 21:15:52 2010
@@ -271,3 +271,34 @@
 }
 
 declare double @bar4()
+
+; rdar://6283267
+define void @t17() nounwind ssp {
+entry:
+; 32: t17:
+; 32: jmp {{_?}}bar5
+
+; 64: t17:
+; 64: xorb %al, %al
+; 64: jmp {{_?}}bar5
+  tail call void (...)* @bar5() nounwind
+  ret void
+}
+
+declare void @bar5(...)
+
+; rdar://7774847
+define void @t18() nounwind ssp {
+entry:
+; 32: t18:
+; 32: call {{_?}}bar6
+; 32: fstp %st(0)
+
+; 64: t18:
+; 64: xorb %al, %al
+; 64: jmp {{_?}}bar6
+  %0 = tail call double (...)* @bar6() nounwind
+  ret void
+}
+
+declare double @bar6(...)

Modified: llvm/branches/Apple/Morbo/test/CodeGen/X86/xor-icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/test/CodeGen/X86/xor-icmp.ll?rev=99599&r1=99598&r2=99599&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/test/CodeGen/X86/xor-icmp.ll (original)
+++ llvm/branches/Apple/Morbo/test/CodeGen/X86/xor-icmp.ll Thu Mar 25 21:15:52 2010
@@ -43,7 +43,7 @@
 ; X32: cmpl
 ; X32: sete
 ; X32-NOT: xor
-; X32: je
+; X32: jne
 
 ; X64: t2:
 ; X64: testl
@@ -51,7 +51,7 @@
 ; X64: testl
 ; X64: sete
 ; X64-NOT: xor
-; X64: je
+; X64: jne
 entry:
   %0 = icmp eq i32 %x, 0                          ; <i1> [#uses=1]
   %1 = icmp eq i32 %y, 0                          ; <i1> [#uses=1]





More information about the llvm-branch-commits mailing list