On Mon, 9 Jan 2012, Uros Bizjak wrote:

> Hello!
> 
> Attached patch fixes oversight with AND pattern and 0xffffffff
> immediate. While ANDs with 0xff and 0xffff are converted to equivalent
> zero_extend pattern, AND with 0xffffffff isn't. This problem leaves
> important optimization that would substitute "movq    %rdi, %rax; andl
>    $4294967295, %eax" sequence with "movl     %edi, %eax" ineffective.
> 
> This optimization happens ~100 times in cc1.
> 
> Moving to stage4 got me by a bit of surprise (I was away from the
> keyboard for the weekend), so I will leave to RMs if this (otherwise
> fairly safe patch) is OK for mainline.
> 
> 2012-01-09  Uros Bizjak  <ubiz...@gmail.com>
> 
>       PR target/51681
>       * config/i386/constraints.md ("L"): Return true for 0xffffffff.
>       * config/i386/i386.c (*anddi_1): Emit AND with 0xffffffff as MOV.
> 
> So, OK for  mainline?

Ok from a RM perspective.

Richard.

Reply via email to