summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/inalloca-stdcall.ll
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-03-01 19:20:23 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-03-01 19:20:23 +0000
commit791b88b6da79b9d296fd31f20529efb20d23af63 (patch)
treea8be75f286397cb104f80659c7c9e9f6822a804d /llvm/test/CodeGen/X86/inalloca-stdcall.ll
parent2abc587c1ef126850cd230e44deca6e93fab0b9b (diff)
downloadbcm5719-llvm-791b88b6da79b9d296fd31f20529efb20d23af63.tar.gz
bcm5719-llvm-791b88b6da79b9d296fd31f20529efb20d23af63.zip
[X86] Elide references to _chkstk for dynamic allocas
The _chkstk function is called by the compiler to probe the stack in an order consistent with Windows' expectations. However, it is possible to elide the call to _chkstk and manually adjust the stack pointer if we can prove that the allocation is fixed size and smaller than the probe size. This shrinks chrome.dll, chrome_child.dll and chrome.exe by a cummulative ~133 KB. Differential Revision: http://reviews.llvm.org/D17679 llvm-svn: 262370
Diffstat (limited to 'llvm/test/CodeGen/X86/inalloca-stdcall.ll')
-rw-r--r--llvm/test/CodeGen/X86/inalloca-stdcall.ll10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/X86/inalloca-stdcall.ll b/llvm/test/CodeGen/X86/inalloca-stdcall.ll
index 4f7e4092a99..ad2271bcff4 100644
--- a/llvm/test/CodeGen/X86/inalloca-stdcall.ll
+++ b/llvm/test/CodeGen/X86/inalloca-stdcall.ll
@@ -7,16 +7,16 @@ declare x86_stdcallcc void @i(i32 %a)
define void @g() {
; CHECK-LABEL: _g:
+; CHECK: movl %esp, %ebp
%b = alloca inalloca %Foo
-; CHECK: movl $8, %eax
-; CHECK: calll __chkstk
+; CHECK: movl %esp, %[[tmp_sp:.*]]
+; CHECK: leal -8(%[[tmp_sp]]), %esp
%f1 = getelementptr %Foo, %Foo* %b, i32 0, i32 0
%f2 = getelementptr %Foo, %Foo* %b, i32 0, i32 1
store i32 13, i32* %f1
store i32 42, i32* %f2
-; CHECK: movl %esp, %eax
-; CHECK: movl $13, (%eax)
-; CHECK: movl $42, 4(%eax)
+; CHECK: movl $13, -8(%[[tmp_sp]])
+; CHECK: movl $42, -4(%[[tmp_sp]])
call x86_stdcallcc void @f(%Foo* inalloca %b)
; CHECK: calll _f@8
; CHECK-NOT: %esp
OpenPOWER on IntegriCloud