http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60520
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
With -O -m32 -fno-shrink-wrap, I got
test:
.LFB0:
.cfi_startproc
subl $12, %esp
.cfi_def_cfa_offset 16
movl bar, %eax
cmpl $0, (%eax)
je .L1
subl $12, %esp
.cfi_def_cfa_offset 28
pushl %eax
.cfi_def_cfa_offset 32
call foo
addl $16, %esp
.cfi_def_cfa_offset 16
.L1:
addl $12, %esp
.cfi_def_cfa_offset 4
ret
shrink-wrap doesn't add epilogue in such a way that stack
adjustment can be easily optimized.