i386: Implement integer vector compares for 64bit vectors [PR98218]
commitf3661f2d63fbc5fd30c24d22137691e16b0a0a17
authorUros Bizjak <ubizjak@gmail.com>
Wed, 5 May 2021 13:07:25 +0000 (5 15:07 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 5 May 2021 13:09:09 +0000 (5 15:09 +0200)
treeaa5b9c7ad403ea5062d269339bd5459e4f397900
parent29745bf06276b9628d08ef1c9e28890cc56df4aa
i386: Implement integer vector compares for 64bit vectors [PR98218]

Implement integer vector compares for 64bit vectors for TARGET_MMX_WITH_SSE.

2021-05-05  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
PR target/98218
* config/i386/i386-expand.c (ix86_expand_int_sse_cmp):
Handle V8QI, V4HI and V2SI modes.
* config/i386/i386.c (ix86_build_const_vector): Handle V2SImode.
(ix86_build_signbit_mask): Ditto.
* config/i386/mmx.md (MMXMODE14): New mode iterator.
(<smaxmin:code><MMXMODE14:mode>3): New expander.
(*mmx_<smaxmin:code><MMXMODE14:mode>3): New insn pattern.
(<umaxmin:code><MMXMODE24:mode>3): New expander.
(*mmx_<umaxmin:code><MMXMODE24:mode>3): New insn pattern.
(vec_cmp<MMXMODEI:mode><MMXMODEI:mode>): New expander.
(vec_cmpu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcond<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcondu<MMXMODEI:mode><MMXMODEI:mode>): Ditto.
(vcond_mask_<MMXMODEI:mode><MMXMODEI:mode>): Ditto.

gcc/testsuite/

PR target/98218
* gcc.target/i386/pr98218-1.c: New test.
* gcc.target/i386/pr98218-1a.c: Ditto.
* gcc.target/i386/pr98218-2.c: Ditto.
* gcc.target/i386/pr98218-2a.c: Ditto.
* gcc.target/i386/pr98218-3.c: Ditto.
* gcc.target/i386/pr98218-3a.c: Ditto.
* gcc.dg/vect/vect-bool-cmp.c (dg-final):
Scan vect tree dump for "LOOP VECTORIZED", not VECTORIZED.
gcc/config/i386/i386-expand.c
gcc/config/i386/i386.c
gcc/config/i386/mmx.md
gcc/testsuite/gcc.dg/vect/vect-bool-cmp.c
gcc/testsuite/gcc.target/i386/pr98218-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr98218-1a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr98218-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr98218-2a.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr98218-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr98218-3a.c [new file with mode: 0644]