summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fold-push.ll
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2016-04-04 21:02:46 +0000
committerHans Wennborg <hans@hanshq.net>2016-04-04 21:02:46 +0000
commita47a692341bd108ad4188b6a868152d8d0f99b64 (patch)
treefd290194bfb66b4c5fa6e9b17bc3fa03d3299c50 /llvm/test/CodeGen/X86/fold-push.ll
parent8cde42c40084bc62c3fbffbc2ed8b118813a008c (diff)
downloadbcm5719-llvm-a47a692341bd108ad4188b6a868152d8d0f99b64.tar.gz
bcm5719-llvm-a47a692341bd108ad4188b6a868152d8d0f99b64.zip
Re-commit r265039 "[X86] Merge adjacent stack adjustments in eliminateCallFramePseudoInstr (PR27140)"
The original commit miscompiled things on 32-bit Windows, e.g. a Clang boostrap. It turns out that mergeSPUpdates() was a bit too generous in what it interpreted as a stack adjustment, causing the following code: addl $12, %esp leal -4(%ebp), %esp To be "optimized" into simply: addl $8, %esp This commit tightens up mergeSPUpdates() and includes a new test (test14 in movtopush.ll) for this situation. llvm-svn: 265345
Diffstat (limited to 'llvm/test/CodeGen/X86/fold-push.ll')
-rw-r--r--llvm/test/CodeGen/X86/fold-push.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/fold-push.ll b/llvm/test/CodeGen/X86/fold-push.ll
index eaf91351021..9d3afd1c449 100644
--- a/llvm/test/CodeGen/X86/fold-push.ll
+++ b/llvm/test/CodeGen/X86/fold-push.ll
@@ -14,7 +14,7 @@ define void @test(i32 %a, i32 %b) optsize nounwind {
; SLM: movl (%esp), [[RELOAD:%e..]]
; SLM-NEXT: pushl [[RELOAD]]
; CHECK: calll
-; CHECK-NEXT: addl $4, %esp
+; CHECK-NEXT: addl $8, %esp
%c = add i32 %a, %b
call void @foo(i32 %c)
call void asm sideeffect "nop", "~{ax},~{bx},~{cx},~{dx},~{bp},~{si},~{di}"()
OpenPOWER on IntegriCloud