[llvm-commits] [llvm-testresults] lab-mini-01__O3-plain__clang_DEV__x86_64 test results

Evan Cheng evan.cheng at apple.com
Fri May 25 14:54:09 PDT 2012


On May 25, 2012, at 1:40 PM, Jakob Stoklund Olesen wrote:

> 
> 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?

What does -print-isel-input show?

Evan

> 
> /jakob
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list