diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-04-04 21:02:46 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-04-04 21:02:46 +0000 |
commit | a47a692341bd108ad4188b6a868152d8d0f99b64 (patch) | |
tree | fd290194bfb66b4c5fa6e9b17bc3fa03d3299c50 /llvm/test/CodeGen/X86/push-cfi-debug.ll | |
parent | 8cde42c40084bc62c3fbffbc2ed8b118813a008c (diff) | |
download | bcm5719-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/push-cfi-debug.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/push-cfi-debug.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/push-cfi-debug.ll b/llvm/test/CodeGen/X86/push-cfi-debug.ll index 1dfe64e6980..217898fffb1 100644 --- a/llvm/test/CodeGen/X86/push-cfi-debug.ll +++ b/llvm/test/CodeGen/X86/push-cfi-debug.ll @@ -23,8 +23,8 @@ declare x86_stdcallcc void @stdfoo(i32, i32) #0 ; CHECK: .cfi_adjust_cfa_offset 4 ; CHECK: calll stdfoo ; CHECK: .cfi_adjust_cfa_offset -8 -; CHECK: addl $8, %esp -; CHECK: .cfi_adjust_cfa_offset -8 +; CHECK: addl $20, %esp +; CHECK: .cfi_adjust_cfa_offset -20 define void @test1() #0 !dbg !4 { entry: tail call void @foo(i32 1, i32 2) #1, !dbg !10 |