Hello! Recently, gcc become smart enough to merge:
leal (%rdi), %eax addl %esi, %eax into leal (%rsi,%rdi), %eax The generated sequence (without ret) becomes shorter than 4 instructions: cmpl $1, %esi leal (%rsi,%rdi), %eax je .L8 nop nop ret and nop insertion for ATOM was triggered. Following patch changes arithmetic to again generate correct number of instructions, without compromising the intention of the test. leal (%rsi), %eax subl %edi, %eax cmpl $1, %esi je .L8 ret 2012-09-30 Uros Bizjak <ubiz...@gmail.com> * gcc.target/i386/pad-10.c (foo2): Return x - z. Tested on x86_64-pc-linux-gnu, committed to mainline SVN. Uros. Index: gcc.target/i386/pad-10.c =================================================================== --- gcc.target/i386/pad-10.c (revision 191866) +++ gcc.target/i386/pad-10.c (working copy) @@ -15,5 +15,5 @@ return z; } else - return x + z; + return x - z; }