summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-01-21 22:23:22 +0000
committerReid Kleckner <rnk@google.com>2016-01-21 22:23:22 +0000
commit18ec96f0fcf4bfc312518bd0d5fda98f795c7a09 (patch)
treee3c5b161a3d5b1b282c5566c3d244dca7ef608c4 /llvm/test
parentbfc33d0f3a786682ec7672f955fbbec80a7bd341 (diff)
downloadbcm5719-llvm-18ec96f0fcf4bfc312518bd0d5fda98f795c7a09.tar.gz
bcm5719-llvm-18ec96f0fcf4bfc312518bd0d5fda98f795c7a09.zip
Avoid unnecessary stack realignment in musttail thunks with SSE2 enabled
The X86 musttail implementation finds register parameters to forward by running the calling convention algorithm until a non-register location is returned. However, assigning a vector memory location has the side effect of increasing the function's stack alignment. We shouldn't increase the stack alignment when we are only looking for register parameters, so this change conditionalizes it. llvm-svn: 258442
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/musttail-varargs.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/musttail-varargs.ll b/llvm/test/CodeGen/X86/musttail-varargs.ll
index 247d78776b8..db4a6f75d83 100644
--- a/llvm/test/CodeGen/X86/musttail-varargs.ll
+++ b/llvm/test/CodeGen/X86/musttail-varargs.ll
@@ -2,6 +2,7 @@
; RUN: llc < %s -enable-tail-merge=0 -mtriple=x86_64-linux-gnux32 | FileCheck %s --check-prefix=LINUX-X32
; RUN: llc < %s -enable-tail-merge=0 -mtriple=x86_64-windows | FileCheck %s --check-prefix=WINDOWS
; RUN: llc < %s -enable-tail-merge=0 -mtriple=i686-windows | FileCheck %s --check-prefix=X86
+; RUN: llc < %s -enable-tail-merge=0 -mtriple=i686-windows -mattr=+sse2 | FileCheck %s --check-prefix=X86
; Test that we actually spill and reload all arguments in the variadic argument
; pack. Doing a normal call will clobber all argument registers, and we will
@@ -136,6 +137,8 @@ define void @g_thunk(i8* %fptr_i8, ...) {
; WINDOWS: jmpq *%rcx # TAILCALL
; X86-LABEL: _g_thunk:
+; X86-NOT: push %ebp
+; X86-NOT: andl {{.*}}, %esp
; X86: jmpl *%eax # TAILCALL
; Do a simple multi-exit multi-bb test.
OpenPOWER on IntegriCloud