On 10/29/20 8:36 PM, Eugene Rozenfeld via Gcc-patches wrote:
> This patch adds a pattern for folding
>
> x >> x
>
> to
>
> 0
>
> as described in PR96701.
>
>
> Without this patch the x86_64-pc-linux-gnu code generated for this function
>
>
>
> int
>
> foo (int i)
>
>
On Fri, Oct 30, 2020 at 3:38 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> This patch adds a pattern for folding
>
> x >> x
>
> to
>
> 0
>
> as described in PR96701.
>
>
> Without this patch the x86_64-pc-linux-gnu code generated for this function
>
>
>
> int
>
> foo
This patch adds a pattern for folding
x >> x
to
0
as described in PR96701.
Without this patch the x86_64-pc-linux-gnu code generated for this function
int
foo (int i)
{
return i >> i;
}
is
mov ecx,edi
sar edi,cl
test edi,edi
setne al
ret
With the patch
This patch adds a pattern for folding
x >> x
to
0
as described in PR96701.
Without this patch the x86_64-pc-linux-gnu code generated for this function
int
foo (int i)
{
return i >> i;
}
is
movecx,edi
saredi,cl
test edi,edi
setne al
r