i386.md (UNSPEC_KMASKOP): New.
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 28 Nov 2016 16:53:17 +0000 (17:53 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 28 Nov 2016 16:53:17 +0000 (17:53 +0100)
commitbf9e8b6b50952b31d04179bae1ebb4c09ffdc1cf
treead79fdbe20921ca158c76f860417c5bbf00435ad
parentf4bb5c171e3bcb244f90dfee5aae6e2bc9f92029
i386.md (UNSPEC_KMASKOP): New.

* config/i386/i386.md (UNSPEC_KMASKOP): New.
(UNSPEC_KMOV): Remove.
(kmovw): Expand to plain HImode move.
(k<any_logic:code><mode>): Rename from *k<logic><mode>. Use
register_operand predicates.  Tag pattern with UNSPEC_KMASKOP.
Remove corresponding clobber-removing splitter.
(*anddi_1): Remove mask register alternatives.
(*andsi_1): Ditto.
(*andhi_1): Ditto.
(*andqi_1): Ditto.
(*<any_or:code><mode>_1): Ditto.
(*<any_or:code>qi_1): Ditto.
(kandn<mode>): Use SWI1248_AVX512BW mode iterator.  Remove
general register alternatives.  Tag pattern with UNSPEC_KMASKOP.
Remove corresponding splitter to operation with general registers.
(*andn<SWI38:mode>): Rename from *bmi_andn_<mode>.
(*andn<SWI12:mode>): New pattern.
(*kxnor<mode>): Remove general register alternatives.  Tag pattern
with UNSPEC_KMASKOP.  Remove corresponding splitter to operation
with general registers.
(knot<mode>): New insn pattern.
(*one_cmpl<mode>2_1): Remove mask register alternatives.
(one_cmplqi2_1): Ditto.
(*k<any_lshift:code><mode>): Rename from *k<mshift><mode>3.
Tag pattern with UNSPEC_KMASKOP. Add mode attribute.
* config/i386/predicates.md (mask_reg_operand): Remove predicate.
* config/i386/sse.md (vec_unpacks_hi_hi): Update pattern
to generate kmaskop shift.
(vec_unpacks_hi_<mode>): Ditto.
* config/i386/i386-builtin.def (__builtin_ia32_kandhi):
Use CODE_FOR_kandhi.
(__builtin_ia32_knothi): Use CODE_FOR_knothi.
(__builtin_ia32_korhi): Use CODE_FOR_kiorhi.
(__builtin_ia32_kxorhi): Use CODE_FOR_kxorhi.

testsuite/ChangeLog:

* gcc.target/i386/bmi-andn-1a.c (dg-final): Update scan string.
* gcc.target/i386/bmi-andn-2a.c (dg-final): Ditto.

From-SVN: r242925
gcc/ChangeLog
gcc/config/i386/i386-builtin.def
gcc/config/i386/i386.md
gcc/config/i386/predicates.md
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
gcc/testsuite/gcc.target/i386/bmi-andn-2a.c