Re: [PATCH] [tree-optimization] Fix for PR96701

2020-11-05 Thread Jeff Law via Gcc-patches
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) > >

Re: [PATCH] [tree-optimization] Fix for PR96701

2020-10-30 Thread Richard Biener via Gcc-patches
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

[PATCH] [tree-optimization] Fix for PR96701

2020-10-29 Thread Eugene Rozenfeld via Gcc-patches
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

[PATCH] [tree-optimization] Fix for PR96701

2020-10-29 Thread Eugene Rozenfeld via Gcc-patches
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