[PATCH 2/2] [i386] For 128/256-bit vec_cond_expr, When mask operands is lt reg const0_rtx, blendv can be used instead of avx512 mask. [PR target/100648]

Hongtao Liu crazylht@gmail.com
Fri Jun 25 06:49:40 GMT 2021


On Mon, May 24, 2021 at 12:59 PM Hongtao Liu <crazylht@gmail.com> wrote:
>
> Hi:
>   This patch is about to add define_insn_and_split to convert avx512
> mask mov back to pblendv instructions when mask operand is (lt: reg
> const0_rtx).
>
Hi:
  Here's the patch I'm going to check in.

gcc/ChangeLog:

        PR target/100648
        * config/i386/sse.md (*avx_cmp<mode>3_lt): New
        define_insn_and_split.
        (*avx_cmp<mode>3_ltint): Ditto.
        (*avx2_pcmp<mode>3_3): Ditto.
        (*avx2_pcmp<mode>3_4): Ditto.
        (*avx2_pcmp<mode>3_5): Ditto.

gcc/testsuite/ChangeLog:

        PR target/100648
        * g++.target/i386/avx2-pr54700-2.C: Adjust testcase.
        * g++.target/i386/avx512vl-pr54700-1a.C: New test.
        * g++.target/i386/avx512vl-pr54700-1b.C: New test.
        * g++.target/i386/avx512vl-pr54700-2a.C: New test.
        * g++.target/i386/avx512vl-pr54700-2b.C: New test.
        * gcc.target/i386/avx512vl-pr100648.c: New test.
        * gcc.target/i386/avx512vl-blendv-1.c: New test.
        * gcc.target/i386/avx512vl-blendv-2.c: New test.

>   Bootstrapped and regtested on x86_64-linux-gnu{-m32,}.
>   Ok for trunk?
>
> gcc/ChangeLog:
>
>         PR target/100648
>         * config/i386/sse.md (*avx_cmp<mode>3_5): New
>         define_insn_and_split.
>         (*avx_cmp<mode>3_6): Ditto.
>         (*avx2_pcmp<mode>3_3): Ditto.
>         (*avx2_pcmp<mode>3_4): Ditto.
>         (*avx2_pcmp<mode>3_5): Ditto.
>
> gcc/testsuite/ChangeLog:
>
>         PR target/100648
>         * g++.target/i386/avx2-pr54700-2.C: Adjust testcase.
>         * g++.target/i386/avx512vl-pr54700-1a.C: New test.
>         * g++.target/i386/avx512vl-pr54700-1b.C: New test.
>         * g++.target/i386/avx512vl-pr54700-2a.C: New test.
>         * g++.target/i386/avx512vl-pr54700-2b.C: New test.
>         * gcc.target/i386/avx512vl-pr100648.c: New test.



-- 
BR,
Hongtao
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-i386-For-128-256-bit-vec_cond_expr-When-mask-operand.patch
Type: text/x-patch
Size: 14250 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210625/26e728e3/attachment-0001.bin>


More information about the Gcc-patches mailing list