Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:35 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: >> One question that comes to my mind is whether there's a possibility >> to fully test gimple folding of all cases if some of them are already >> eaten by generic folding? > > The only way is to

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: > One question that comes to my mind is whether there's a possibility > to fully test gimple folding of all cases if some of them are already > eaten by generic folding? The only way is to make GENERIC folding not trigger by pushing constants

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: > On 10/07/2016 01:01 PM, Richard Biener wrote: >> On Fri, Oct 7, 2016 at 10:41 AM, Martin Liška wrote: >>> Resending the patch, where I implemented folding in gimple-fold.c >>> >>> Patch can bootstrap on ppc64le-redhat-linux and survives regr

[PATCH] Fold __builtin_memchr (version 3)

2016-10-11 Thread Martin Liška
On 10/07/2016 01:01 PM, Richard Biener wrote: > On Fri, Oct 7, 2016 at 10:41 AM, Martin Liška wrote: >> Resending the patch, where I implemented folding in gimple-fold.c >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > +/* Fold a call to the str{n}{case}cmp bui