http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57430
Bug ID: 57430 Summary: Redundant move instruction is produced after function inlining Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ysrumyan at gmail dot com This is based on performance analysis of eembc2.0 suite on Atom processor in comparison with clang compiler. I prepared a simple reproducer that exhibits the issue. Hottest loop (from function "remove") consists of 7 instructions if inlining was applied: .L48: movl %edx, %ebp <<-- it is redundant!! movl %ecx, %edx .L39: cmpl %edx, %eax je .L24 movl 16(%edx), %ecx testl %ecx, %ecx jne .L48 but without inlining it consists of 6 instructions: .L5: cmpl %eax, %ecx je .L4 movl %eax, %edx .L7: movl 16(%edx), %eax testl %eax, %eax jne .L5 In result we can see performance drop on 4% (Atom 32-bit mode). The reproducer will be attached.