]> git.ipfire.org Git - thirdparty/gcc.git/commit
[APX CCMP] Use ctestcc when comparing to const 0
authorHongyu Wang <hongyu.wang@intel.com>
Thu, 9 May 2024 02:12:16 +0000 (10:12 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 13 Jun 2024 07:57:15 +0000 (15:57 +0800)
commit99e6cf404e37655be303e71f20df03c284c7989e
tree3ce5ce00139645bf6e784647e34994a37a68d054
parent14820327c720dad2ca34eb9fa73c0d9b435b6688
[APX CCMP] Use ctestcc when comparing to const 0

For CTEST, we don't have conditional AND so there's no optimization
opportunity to write a new ctest pattern. Emit ctest when ccmp did
comparison to const 0 to save bytes.

gcc/ChangeLog:

* config/i386/i386.md (@ccmp<mode>): Add new alternative
<r>,C and adjust output templates. Also adjust UNSPEC mode
to CCmode.

gcc/testsuite/ChangeLog:

* gcc.target/i386/apx-ccmp-1.c: Adjust output to scan ctest.
* gcc.target/i386/apx-ccmp-2.c: Adjust some condition to
compare with 0.
gcc/config/i386/i386.md
gcc/testsuite/gcc.target/i386/apx-ccmp-1.c
gcc/testsuite/gcc.target/i386/apx-ccmp-2.c