Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Marc Glisse
On Tue, 27 Oct 2015, Kyrill Tkachov wrote: So here the types are shorts and unsigned shorts. On aarch64 these are HImode values and there's no direct arithmetic operations on them, so they have to be extended to SImode and truncated back. Ah ok, that makes sense. I expect it is in the case wh

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Kyrill Tkachov
On 27/10/15 15:57, Marc Glisse wrote: On Tue, 27 Oct 2015, Kyrill Tkachov wrote: Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it a

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Marc Glisse
On Tue, 27 Oct 2015, Kyrill Tkachov wrote: Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it accepts some CONSTRUCTOR and STRING_CST).

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Kyrill Tkachov
Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it accepts some CONSTRUCTOR and STRING_CST). At some point I tried using sign_bit_p, but

Re: Move some comparison simplifications to match.pd

2015-08-31 Thread Richard Biener
On Sun, Aug 30, 2015 at 9:57 AM, Marc Glisse wrote: > Hello, > > just trying to shrink fold-const.c a bit more. > > initializer_zerop is close to what I was looking for with zerop, but I > wasn't sure if it would be safe (it accepts some CONSTRUCTOR and > STRING_CST). At some point I tried using s

Move some comparison simplifications to match.pd

2015-08-30 Thread Marc Glisse
Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it accepts some CONSTRUCTOR and STRING_CST). At some point I tried using sign_bit_p, but using the return of that function in the simpl