[llvm-commits] [llvm] r123367 - in /llvm/trunk: lib/Target/X86/X86Subtarget.cpp test/CodeGen/X86/2008-07-19-movups-spills.ll test/CodeGen/X86/2008-10-27-StackRealignment.ll test/CodeGen/X86/2009-08-06-inlineasm.ll test/CodeGen/X86/abi-isel.ll test/CodeGen/X86/sse-align-11.ll
Eric Christopher
echristo at apple.com
Wed Jan 12 22:47:10 PST 2011
Author: echristo
Date: Thu Jan 13 00:47:10 2011
New Revision: 123367
URL: http://llvm.org/viewvc/llvm-project?rev=123367&view=rev
Log:
Experiment with changing the default 32-bit linux stack alignment to
16 bytes for PR8969. Update all testcases accordingly.
Modified:
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
llvm/trunk/test/CodeGen/X86/2008-07-19-movups-spills.ll
llvm/trunk/test/CodeGen/X86/2008-10-27-StackRealignment.ll
llvm/trunk/test/CodeGen/X86/2009-08-06-inlineasm.ll
llvm/trunk/test/CodeGen/X86/abi-isel.ll
llvm/trunk/test/CodeGen/X86/sse-align-11.ll
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Thu Jan 13 00:47:10 2011
@@ -342,9 +342,9 @@
assert((!Is64Bit || HasX86_64) &&
"64-bit code requested on a subtarget that doesn't support it!");
- // Stack alignment is 16 bytes on Darwin (both 32 and 64 bit) and for all 64
- // bit targets.
- if (isTargetDarwin() || Is64Bit)
+ // Stack alignment is 16 bytes on Darwin and Linux (both 32 and 64 bit) and
+ // for all 64-bit targets.
+ if (isTargetDarwin() || isTargetLinux() || Is64Bit)
stackAlignment = 16;
if (StackAlignment)
Modified: llvm/trunk/test/CodeGen/X86/2008-07-19-movups-spills.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-07-19-movups-spills.ll?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-07-19-movups-spills.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-07-19-movups-spills.ll Thu Jan 13 00:47:10 2011
@@ -1,6 +1,7 @@
; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=1 -mattr=sse2 | grep movaps | count 75
-; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movaps | count 1
+; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movaps | count 75
; PR2539
+; PR8969 - make 32-bit linux have a 16-byte aligned stack
external global <4 x float>, align 1 ; <<4 x float>*>:0 [#uses=2]
external global <4 x float>, align 1 ; <<4 x float>*>:1 [#uses=1]
Modified: llvm/trunk/test/CodeGen/X86/2008-10-27-StackRealignment.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-27-StackRealignment.ll?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-10-27-StackRealignment.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-10-27-StackRealignment.ll Thu Jan 13 00:47:10 2011
@@ -1,8 +1,8 @@
; Linux doesn't support stack realignment for functions with allocas (PR2888).
; Until it does, we shouldn't use movaps to access the stack. On targets with
; sufficiently aligned stack (e.g. darwin) we should.
-
-; RUN: llc < %s -mtriple=i386-pc-linux-gnu -mcpu=yonah | not grep movaps
+; PR8969 - make 32-bit linux have a 16-byte aligned stack
+; RUN: llc < %s -mtriple=i386-pc-linux-gnu -mcpu=yonah | grep movaps | count 2
; RUN: llc < %s -mtriple=i686-apple-darwin9 -mcpu=yonah | grep movaps | count 2
Modified: llvm/trunk/test/CodeGen/X86/2009-08-06-inlineasm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-08-06-inlineasm.ll?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-08-06-inlineasm.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-08-06-inlineasm.ll Thu Jan 13 00:47:10 2011
@@ -1,10 +1,12 @@
-; RUN: llc -mtriple=i386-pc-linux-gnu < %s
+; RUN: false
+; XRUN: llc -mtriple=i386-pc-linux-gnu < %s
; PR4668
; XFAIL: *
; FIXME: If the coalescer happens to coalesce %level.1 with the copy to EAX
; (for ret) then this will fail to compile. The fundamental problem is
; once the coalescer fixes a virtual register to physical register we can't
-; evict it.
+; evict it. This started passing again due to the changes for PR8969
+; so I've disabled it with a bigger stick.
define i32 @x(i32 %qscale) nounwind {
entry:
Modified: llvm/trunk/test/CodeGen/X86/abi-isel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/abi-isel.ll?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/abi-isel.ll (original)
+++ llvm/trunk/test/CodeGen/X86/abi-isel.ll Thu Jan 13 00:47:10 2011
@@ -8375,7 +8375,7 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: lcallee:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll x
; LINUX-32-STATIC-NEXT: calll x
; LINUX-32-STATIC-NEXT: calll x
@@ -8383,11 +8383,11 @@
; LINUX-32-STATIC-NEXT: calll x
; LINUX-32-STATIC-NEXT: calll x
; LINUX-32-STATIC-NEXT: calll x
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: lcallee:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll x
; LINUX-32-PIC-NEXT: calll x
; LINUX-32-PIC-NEXT: calll x
@@ -8395,7 +8395,8 @@
; LINUX-32-PIC-NEXT: calll x
; LINUX-32-PIC-NEXT: calll x
; LINUX-32-PIC-NEXT: calll x
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: lcallee:
@@ -8506,7 +8507,7 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: dcallee:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll y
; LINUX-32-STATIC-NEXT: calll y
; LINUX-32-STATIC-NEXT: calll y
@@ -8514,11 +8515,11 @@
; LINUX-32-STATIC-NEXT: calll y
; LINUX-32-STATIC-NEXT: calll y
; LINUX-32-STATIC-NEXT: calll y
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: dcallee:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll y
; LINUX-32-PIC-NEXT: calll y
; LINUX-32-PIC-NEXT: calll y
@@ -8526,7 +8527,8 @@
; LINUX-32-PIC-NEXT: calll y
; LINUX-32-PIC-NEXT: calll y
; LINUX-32-PIC-NEXT: calll y
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: dcallee:
@@ -8770,17 +8772,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: caller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll callee
; LINUX-32-STATIC-NEXT: calll callee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: caller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll callee
; LINUX-32-PIC-NEXT: calll callee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: caller:
@@ -8844,17 +8847,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: dcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll dcallee
; LINUX-32-STATIC-NEXT: calll dcallee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: dcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll dcallee
; LINUX-32-PIC-NEXT: calll dcallee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: dcaller:
@@ -8918,17 +8922,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: lcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll lcallee
; LINUX-32-STATIC-NEXT: calll lcallee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: lcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll lcallee
; LINUX-32-PIC-NEXT: calll lcallee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: lcaller:
@@ -8990,15 +8995,16 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: tailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll callee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: tailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll callee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: tailcaller:
@@ -9053,15 +9059,16 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: dtailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll dcallee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: dtailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll dcallee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: dtailcaller:
@@ -9116,15 +9123,16 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ltailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll lcallee
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ltailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll lcallee
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ltailcaller:
@@ -9183,17 +9191,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: icaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *ifunc
; LINUX-32-STATIC-NEXT: calll *ifunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: icaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *ifunc
; LINUX-32-PIC-NEXT: calll *ifunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: icaller:
@@ -9272,17 +9281,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: dicaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *difunc
; LINUX-32-STATIC-NEXT: calll *difunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: dicaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *difunc
; LINUX-32-PIC-NEXT: calll *difunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: dicaller:
@@ -9354,17 +9364,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: licaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *lifunc
; LINUX-32-STATIC-NEXT: calll *lifunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: licaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *lifunc
; LINUX-32-PIC-NEXT: calll *lifunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: licaller:
@@ -9435,17 +9446,18 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: itailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *ifunc
; LINUX-32-STATIC-NEXT: calll *ifunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: itailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *ifunc
; LINUX-32-PIC-NEXT: calll *ifunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: itailcaller:
@@ -9521,15 +9533,16 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: ditailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *difunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: ditailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *difunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: ditailcaller:
@@ -9588,15 +9601,16 @@
; LINUX-64-STATIC: ret
; LINUX-32-STATIC: litailcaller:
-; LINUX-32-STATIC: pushl
+; LINUX-32-STATIC: subl
; LINUX-32-STATIC-NEXT: calll *lifunc
-; LINUX-32-STATIC-NEXT: popl
+; LINUX-32-STATIC-NEXT: addl
; LINUX-32-STATIC-NEXT: ret
; LINUX-32-PIC: litailcaller:
-; LINUX-32-PIC: pushl
+; LINUX-32-PIC: subl
; LINUX-32-PIC-NEXT: calll *lifunc
-; LINUX-32-PIC-NEXT: popl
+; LINUX-32-PIC-NEXT: addl
+
; LINUX-32-PIC-NEXT: ret
; LINUX-64-PIC: litailcaller:
Modified: llvm/trunk/test/CodeGen/X86/sse-align-11.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-align-11.ll?rev=123367&r1=123366&r2=123367&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse-align-11.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse-align-11.ll Thu Jan 13 00:47:10 2011
@@ -1,5 +1,6 @@
; RUN: llc < %s -march=x86 -mcpu=yonah -mtriple=i686-apple-darwin8 | grep movaps
-; RUN: llc < %s -march=x86 -mcpu=yonah -mtriple=i686-linux-gnu | grep movups
+; RUN: llc < %s -march=x86 -mcpu=yonah -mtriple=i686-linux-gnu | grep movaps
+; PR8969 - make 32-bit linux have a 16-byte aligned stack
define <4 x float> @foo(float %a, float %b, float %c, float %d) nounwind {
entry:
More information about the llvm-commits
mailing list