]> git.ipfire.org Git - thirdparty/gcc.git/commit
[APX NDD] Support APX NDD for or/xor insn
authorKong Lingling <lingling.kong@intel.com>
Fri, 19 May 2023 02:50:29 +0000 (10:50 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 7 Dec 2023 01:31:14 +0000 (09:31 +0800)
commitc95f67b8966dff4f7b22e794e410c5aa7490877a
tree5726f36dfb15ba9eb1cf054e526a3675cfe66737
parent7463df5c2a454aeaec786848fd8a4551e79b71a9
[APX NDD] Support APX NDD for or/xor insn

Similar to AND insn, two splitters need to be adjusted to prevent
misoptimizaiton for NDD OR/XOR.

Also adjust *one_cmplsi2_2_zext and its corresponding splitter that will
generate xor insn.

gcc/ChangeLog:

* config/i386/i386.md (<code><mode>3): Add new alternative for NDD
and adjust output templates.
(*<code><mode>_1): Likewise.
(*<code>qi_1): Likewise.
(*notxor<mode>_1): Likewise.
(*<code>si_1_zext): Likewise.
(*notxorqi_1): Likewise.
(*<code><mode>_2): Likewise.
(*<code>si_2_zext): Likewise.
(*<code>si_2_zext_imm): Likewise.
(*<code>si_1_zext_imm): Likewise, and use nonimmediate_operand for
operands[1] to accept memory input for NDD alternative.
(*one_cmplsi2_2_zext): Likewise.
(define_split for *one_cmplsi2_2_zext): Use nonimmediate_operand for
operands[3].
(*<code><dwi>3_doubleword): Add NDD constraints, adopt '&' to NDD dest
and emit move for optimized case if operands[0] != operands[1] or
operands[4] != operands[5].
(define_split for QI highpart OR/XOR): Prohibit splitter to split NDD
form OR/XOR insn to <any_logic:code>qi_ext<mode>_3.
(define_split for QI strict_lowpart optimization): Prohibit splitter to
split NDD form AND insn to *<code><mode>3_1_slp.

gcc/testsuite/ChangeLog:

* gcc.target/i386/apx-ndd.c: Add or and xor test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/apx-ndd.c