On July 21, 2015 11:38:31 AM GMT+02:00, Jakub Jelinek <ja...@redhat.com> wrote:
>On Tue, Jul 21, 2015 at 09:15:31AM +0000, Hurugalawadi, Naveen wrote:
>> Please find attached the patch which performs following patterns
>folding
>> in match.pd:-
>> 
>> a ==/!= a p+ b to b ==/!= 0.
>> a << N ==/!= 0 to a&(-1>>N) ==/!= 0.
>
>Not sure about this second one.  Why do you think it is generally
>beneficial?  On many targets, shifts are as fast as bitwise and, and
>-1>>N could be e.g. significantly more expensive constant (say require
>3 instructions to construct).

And may set flags while shift not? Of course we do a very poor job of 
representing this kind of stuff on gimple.

Richard.

>       Jakub


Reply via email to