]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Introduce new unspecs for smax/smin
authorSaurabh Jha <saurabh.jha@arm.com>
Mon, 30 Sep 2024 10:37:16 +0000 (10:37 +0000)
committerSaurabh Jha <saurabh.jha@arm.com>
Tue, 1 Oct 2024 16:44:12 +0000 (16:44 +0000)
commitac4cdf5cb43c0b09e81760e2a1902ceebcf1a135
treea9cfb4d00601b8f1d531a175fea221f8eb029f4b
parent9dd9a06940a37e82d13ccd2be0c4ef68bca29750
aarch64: Introduce new unspecs for smax/smin

Introduce two new unspecs, UNSPEC_COND_SMAX and UNSPEC_COND_SMIN,
corresponding to rtl operators smax and smin. UNSPEC_COND_SMAX is used
to generate fmaxnm instruction and UNSPEC_COND_SMIN is used to generate
fminnm instruction.

With these new unspecs, we can generate SVE2 max/min instructions using
existing generic unpredicated and predicated instruction patterns that
use optab attribute. Thus, we have removed specialised instruction
patterns for max/min instructions that were using
SVE_COND_FP_MAXMIN_PUBLIC iterator.

No new test cases as the existing test cases should be enough to test
this refactoring.

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md
(<fmaxmin><mode>3): Remove this instruction pattern.
(cond_<fmaxmin><mode>): Remove this instruction pattern.
* config/aarch64/iterators.md: New unspecs and changes to
iterators and attrs to use the new unspecs
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/iterators.md