On Wed, Jan 27, 2021 at 6:38 PM Hongtao Liu <crazy...@gmail.com> wrote:
>
> On Wed, Jan 27, 2021 at 5:03 PM Jakub Jelinek <ja...@redhat.com> wrote:
> >
> > On Wed, Jan 27, 2021 at 03:22:45PM +0800, Hongtao Liu wrote:
> > > Hi:
> > >   As desribed in PR, also remove the relevant and useless expanders
> > > and builtins, the user can
> > > directly use == and >, without calling the builtin function.
> > >   Bootstrapped and regtested on x86_64-linux-gnu{-m32,}.
> > >
> > > gcc/ChangeLog:
> > >
> > >         PR target/98833
> > >         * config/i386/i386-builtin.def (BDESC): Delete
> > >         __builtin_ia32_pcmpeqb128, __builtin_ia32_pcmpeqw128,
> > >         __builtin_ia32_pcmpeqd128, __builtin_ia32_pcmpgtb128,
> > >         __builtin_ia32_pcmpgtw128, __builtin_ia32_pcmpgtd128,
> > >         __builtin_ia32_pcmpeqb256, __builtin_ia32_pcmpeqw256,
> > >         __builtin_ia32_pcmpeqd256, __builtin_ia32_pcmpeqq256,
> > >         __builtin_ia32_pcmpgtb256, __builtin_ia32_pcmpgtw256,
> > >         __builtin_ia32_pcmpgtd256, __builtin_ia32_pcmpgtq256.
> > >         * config/i386/sse.md (avx2_eq<mode>3): Deleted.
> > >         (sse2_eq<mode>3): Ditto.
> > >         (sse2_gt<mode>3): Renamed to ..
> > >         (*sse2_gt<mode>3): And drop !TARGET_XOP in condition.
> > >         (*sse2_eq<mode>3): Drop !TARGET_XOP in condition.
> > >
> > > gcc/testsuite/ChangeLog:
> > >
> > >         PR target/98833
> > >         * gcc.target/i386/pr98833.c: New test.
> > >
> > > libcpp/
> > >
> > >         PR target/98833
> > >         * lex.c (search_line_sse2): Replace builtins with == operator.
> >
> > Oops, I wasn't aware of the libcpp use, I'm afraid that means we should
> > reconsider removing the builtins, because that means that e.g.
> > GCC 10 will not build with GCC 11 as system compiler anymore, people
> > bisecting GCC changes will have troubles etc.
> > And a codesearch seems to show that other projects do use these builtins
> > (even the AVX2 ones) too :(.
> > I think the libcpp/ change is ok, as we've bumped minimum GCC version
> > for building GCC to GCC 4.8 in GCC 11.  Note that GCC 4.7 in C++
> > doesn't handle the == operators:
> > error: invalid operands of types ‘v16qi {aka __vector(16) char}’ and ‘v16qi 
> > {aka __vector(16) char}’ to binary ‘operator==’
> > but 4.8 seems to work fine already.
> >
> > But, can we perhaps keep the builtins, but fold them immediately in
> > ix86_gimple_fold_builtin so that we don't need the named patterns?
> >
> > Though, I guess that we could defer those changes to GCC 12.
> >
> > So can you just drop the !TARGET_XOP from conditions, add testcase and
> > change libcpp/ for GCC 11 and do the rest for GCC 12?
> >
> Yes, and update patch.
Correct gcc change log

gcc/ChangeLog:

        PR target/98833
        * config/i386/sse.md (sse2_gt<mode>3): Drop !TARGET_XOP in condition.
        (*sse2_eq<mode>3): Ditto.

> > Thanks.
> >
> >         Jakub
> >
>
>
> --
> BR,
> Hongtao



-- 
BR,
Hongtao

Reply via email to