[llvm-commits] [llvm-testresults] lab-mini-01__O3-plain__clang_DEV__x86_64 test results
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri May 25 13:40:00 PDT 2012
On May 25, 2012, at 8:28 AM, Duncan Sands <baldrick at free.fr> wrote:
> The reason for the big slowdown is in the different codegen:
>
> # phi213.i is in %ebx
>
> + leaq 1(%rdx), %rsi
> + xorl %esi, %ebx
> xorl (%rax,%rdx,4), %ebx
> - incq %rdx
> - xorl %edx, %ebx
> - cmpl $500001, %edx # imm = 0x7A121
> + cmpl $500001, %esi # imm = 0x7A121
> + movq %rsi, %rdx
>
> I'm not sure why this codegen difference arises. Any suggestions?
>
> If there is a fairly generic explanation for the different codegen, maybe the
> rank function can be tweaked to force the more effective order.
The leaq is created by the 2-addr instruction pass. It is converting the incq to a 3-addr instruction because there are other uses of the pre-increment value.
One might argue that LSR should have fixed this by making the load use the post-increment value of the induction variable. Maybe it already did place the load before the increment, and isel decided to fold it into an xor anyway?
/jakob
More information about the llvm-commits
mailing list