diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-03-31 19:26:24 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-03-31 19:26:24 +0000 |
commit | e97fb414e8ec2dd69c0f96d748035569c40b625f (patch) | |
tree | 558e3d30062b95f4965308510a4d6f5dfc42f52d /llvm/test/CodeGen/X86/push-cfi-debug.ll | |
parent | 8c824a07ae9196846fbc34cbb4be2f6cfa48516a (diff) | |
download | bcm5719-llvm-e97fb414e8ec2dd69c0f96d748035569c40b625f.tar.gz bcm5719-llvm-e97fb414e8ec2dd69c0f96d748035569c40b625f.zip |
[X86] Merge adjacent stack adjustments in eliminateCallFramePseudoInstr (PR27140)
For code such as:
void f(int, int);
void g() {
f(1, 2);
}
compiled for 32-bit X86 Linux, Clang would previously generate:
subl $12, %esp
subl $8, %esp
pushl $2
pushl $1
calll f
addl $16, %esp
addl $12, %esp
retl
This patch fixes that by merging adjacent stack adjustments in
eliminateCallFramePseudoInstr().
Differential Revision: http://reviews.llvm.org/D18627
llvm-svn: 265039
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 cc00fab525a..ee4cb8e0e60 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 |