On Wed, Jul 13, 2022 at 5:35 AM Richard Biener
wrote:
>
> On Tue, Jul 12, 2022 at 6:59 PM H.J. Lu wrote:
> >
> > On Fri, Jul 8, 2022 at 5:54 AM Richard Biener
> > wrote:
> > >
> > > On Thu, Jul 7, 2022 at 6:45 PM H.J. Lu wrote:
> > > >
> > > > When memchr is applied on a constant string of no m
On Tue, Jul 12, 2022 at 6:59 PM H.J. Lu wrote:
>
> On Fri, Jul 8, 2022 at 5:54 AM Richard Biener
> wrote:
> >
> > On Thu, Jul 7, 2022 at 6:45 PM H.J. Lu wrote:
> > >
> > > When memchr is applied on a constant string of no more than the bytes of
> > > a word, simplify memchr by checking each byte
On Fri, Jul 8, 2022 at 5:54 AM Richard Biener
wrote:
>
> On Thu, Jul 7, 2022 at 6:45 PM H.J. Lu wrote:
> >
> > When memchr is applied on a constant string of no more than the bytes of
> > a word, simplify memchr by checking each byte in the constant string.
> >
> > int f (int a)
> > {
> >retu
On Thu, Jul 7, 2022 at 6:45 PM H.J. Lu wrote:
>
> When memchr is applied on a constant string of no more than the bytes of
> a word, simplify memchr by checking each byte in the constant string.
>
> int f (int a)
> {
>return __builtin_memchr ("AE", a, 2) != 0;
> }
>
> is simplified to
>
> int
When memchr is applied on a constant string of no more than the bytes of
a word, simplify memchr by checking each byte in the constant string.
int f (int a)
{
return __builtin_memchr ("AE", a, 2) != 0;
}
is simplified to
int f (int a)
{
return ((char) a == 'A' || (char) a == 'E') != 0;
}