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). Jakub