]> git.ipfire.org Git - thirdparty/gcc.git/commit
[APX NDD] Support APX NDD for sbb insn
authorKong Lingling <lingling.kong@intel.com>
Wed, 18 Jan 2023 07:51:23 +0000 (15:51 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 7 Dec 2023 01:31:14 +0000 (09:31 +0800)
commit57fdb5c2440a8b9d8d0b2dd8be866b6ae012a788
tree5a51a0b1b31d5d2e895579da497f28534d9e44f2
parentc601744469390f5c66075de1cead46ed0d5c7a5d
[APX NDD] Support APX NDD for sbb insn

Similar to *add<dwi>3_doubleword, operands[1] may not equal to operands[0] so
extra move and earlyclobber are required.

gcc/ChangeLog:

* config/i386/i386.md (*sub<dwi>3_doubleword): Add new alternative for
NDD, adopt '&' modifier to NDD dest and emit move when operands[0] not
equal to operands[1].
(*sub<dwi>3_doubleword_zext): Likewise.
(*subv<dwi>4_doubleword): Likewise.
(*subv<dwi>4_doubleword_1): Likewise.
(*subv<mode>4_overflow_1): Add NDD alternatives and adjust output
templates.
(*subv<mode>4_overflow_2): Likewise.
(@sub<mode>3_carry): Likewise.
(*addsi3_carry_zext_0r): Likewise, and use nonimmediate_operand for
operands[1] to accept memory input for NDD alternative.
(*subsi3_carry_zext): Likewise.
(subborrow<mode>): Parse TARGET_APX_NDD to ix86_binary_operator_ok.
(subborrow<mode>_0): Likewise.
(*sub<mode>3_eq): Likewise.
(*sub<mode>3_ne): Likewise.
(*sub<mode>3_eq_1): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/i386/apx-ndd-sbb.c: New test.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/apx-ndd-sbb.c [new file with mode: 0644]