[PATCH] Fix unrecognizable insn of pr92865

Hongtao Liu crazylht@gmail.com
Wed Dec 11 01:51:00 GMT 2019


On Tue, Dec 10, 2019 at 4:11 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Dec 10, 2019 at 01:47:50PM +0800, Hongtao Liu wrote:
> >   This patch is to enable integer mask cmp/cmov under AVX512F even
> > with TARGET_XOP .
> >   Bootstrap and regression test on i386/x86_64 backend is ok.
> >
> > Changelog:
> >     PR target/92865
> >     * gcc/config/i386/i386-expand.c (ix86_valid_mask_cmp_mode): Enable
> >     integer mask cmov when available even with TARGET_XOP.
> >     * gcc/testsuite/gcc.target/i386/pr92865-1.c: New test.
>
> No gcc/ or gcc/testsuite/ prefixes in ChangeLog.
>
> > --- a/gcc/config/i386/i386-expand.c
> > +++ b/gcc/config/i386/i386-expand.c
> > @@ -3428,7 +3428,7 @@ static bool
> >  ix86_valid_mask_cmp_mode (machine_mode mode)
> >  {
> >    /* XOP has its own vector conditional movement.  */
> > -  if (TARGET_XOP)
> > +  if (TARGET_XOP && !TARGET_AVX512F)
> >      return false;
> >
> >    /* AVX512F is needed for mask operation.  */
>
> We don't know what will AMD CPUs with AVX512* do or what will be optimal for
Yes, I'll make it tunable for different processors in another
separated patch or in this one?
> them, there aren't any yet.  I guess this is fine for now, so would be your
> previous && GET_MODE_SIZE (mode) == 16.
>
>         Jakub
>
Updated patch with Changelog

----------------
Changelog
gcc/
    PR target/92865
    * config/i386/i386-expand.c (ix86_valid_mask_cmp_mode): Enable
    integer mask cmov when available even with TARGET_XOP.

gcc/testsuite
    * gcc/testsuite/gcc.target/i386/pr92865-1.c: New test.
----------------

-- 
BR,
Hongtao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-unrecognizable-insn-of-pr92865_v2.patch
Type: text/x-patch
Size: 2909 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191211/eb565a3d/attachment.bin>


More information about the Gcc-patches mailing list