Enable mask movement for VCOND_EXPR under avx512f for
authorHongtao Liu <liuhongt@gcc.gnu.org>
Mon, 9 Dec 2019 04:16:24 +0000 (04:16 +0000)
committerHongtao Liu <liuhongt@gcc.gnu.org>
Mon, 9 Dec 2019 04:16:24 +0000 (04:16 +0000)
commit8b905e9b0c09530c0f660563540257f3d181c2ac
tree3792b9fb246238db42a1f6451fe7302d4f35d402
parent9135a6ffc5c878c3ee51242be919cab919e83646
Enable mask movement for VCOND_EXPR under avx512f for
128/256-bit vector when integer mask is available.

Changelog
gcc/
PR target/92686
* config/i386/sse.md
(*<avx512>_cmp<mode>3<mask_scalar_merge_name><round_saeonly_name>,
*<avx512>_cmp<mode>3<mask_scalar_merge_name>,
*<avx512>_ucmp<mode>3<mask_scalar_merge_name>,
*<avx512>_ucmp<mode>3<mask_scalar_merge_name>): New.
* config/i386/i386.c (ix86_print_operand): New operand substitution.
* config/i386/i386-expand.c (ix86_valid_mask_cmp_mode):
New function.
(ix86_expand_sse_cmp): Relax condition for integer mask from
512-bit vector to all 128/256/512-bit vector. Delete code gen
for avx512f compare patterns since we have generic pattern now.
(ix86_expand_sse_movcc): Adjust condition and codegen for
maskcmp.
(ix86_expand_int_sse_cmp): Don't canonicalize the comparison
when corresponding vector compare is available.

gcc/testsuite/
* gcc.target/i386/pr92686.inc: New file.
* gcc.target/i386/avx512bw-pr92686-vpcmp-1.c: New test.
* gcc.target/i386/avx512bw-pr92686-vpcmp-intelasm-1.c: Ditto.
* gcc.target/i386/avx512bw-pr92686-vpcmp-2.c: Ditto.
* gcc.target/i386/avx512vl-pr92686-vpcmp-1.c: Ditto.
* gcc.target/i386/avx512vl-pr92686-vpcmp-intelasm-1.c: Ditto.
* gcc.target/i386/avx512vl-pr92686-vpcmp-2.c: Ditto.
* gcc.target/i386/avx512bw-pr92686-movcc-1.c: Ditto.
* gcc.target/i386/avx512bw-pr92686-movcc-2.c: Ditto.
* gcc.target/i386/avx512vl-pr92686-movcc-1.c: Ditto.
* gcc.target/i386/avx512vl-pr92686-movcc-2.c: Ditto.
* gcc.target/i386/avx512vl-pr88547-1.c: Adjust testcase.
* gcc.target/i386/pr88547-1.c: Ditto.

From-SVN: r279107
18 files changed:
gcc/ChangeLog
gcc/config/i386/i386-expand.c
gcc/config/i386/i386.c
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx512bw-pr92686-movcc-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-pr92686-movcc-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-pr92686-vpcmp-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-pr92686-vpcmp-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512bw-pr92686-vpcmp-intelasm-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-pr88547-1.c
gcc/testsuite/gcc.target/i386/avx512vl-pr92686-movcc-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-pr92686-movcc-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-pr92686-vpcmp-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-pr92686-vpcmp-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx512vl-pr92686-vpcmp-intelasm-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr88547-1.c
gcc/testsuite/gcc.target/i386/pr92686.inc [new file with mode: 0644]