]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Add support for unpacked SVE FP conditional ternary arithmetic
authorSpencer Abson <spencer.abson@arm.com>
Wed, 30 Jul 2025 08:58:50 +0000 (08:58 +0000)
committerSpencer Abson <spencer.abson@arm.com>
Wed, 30 Jul 2025 08:58:50 +0000 (08:58 +0000)
commit45fd943eabfe8e71aeecf001e9200f4d52748610
tree89392361230db21e074565cc8508e4ff8fb0a63e
parent84f8f1ff6a9bfeb12e5fc0eac58efc375cc08485
aarch64: Add support for unpacked SVE FP conditional ternary arithmetic

This patch extends the expander for fma, fnma, fms, and fnms to support
partial SVE FP modes.

We add the missing BF16 tests, which we can now trigger for having
implemented the conditional expander.

We also add tests for the 'merging with multiplicand' case, which this
expander canonicalizes (albeit under SVE_STRICT_GP).

gcc/ChangeLog:

* config/aarch64/aarch64-sve.md (@cond_<optab><mode>): Extend
to support partial FP modes.
(*cond_<optab><mode>_2_strict): Extend from SVE_FULL_F to SVE_F,
use aarch64_predicate_operand.
(*cond_<optab><mode>_4_strict): Extend from SVE_FULL_F_B16B16 to
SVE_F_B16B16, use aarch64_predicate_operand.
(*cond_<optab><mode>_any_strict):  Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/sve/unpacked_cond_fmla_1.c: Add test cases
for merging with multiplcand.
* gcc.target/aarch64/sve/unpacked_cond_fmls_1.c: Likewise.
* gcc.target/aarch64/sve/unpacked_cond_fnmla_1.c: Likewise.
* gcc.target/aarch64/sve/unpacked_cond_fnmls_1.c: Likewise.
* gcc.target/aarch64/sve/unpacked_cond_fmla_2.c: New test.
* gcc.target/aarch64/sve/unpacked_cond_fmls_2.c: Likewise.
* gcc.target/aarch64/sve/unpacked_cond_fnmla_2.c: Likewise..
* gcc.target/aarch64/sve/unpacked_cond_fnmls_2.c: Likewise.
* g++.target/aarch64/sve/unpacked_cond_ternary_bf16_1.C: Likewise.
* g++.target/aarch64/sve/unpacked_cond_ternary_bf16_2.C: Likewise.
gcc/config/aarch64/aarch64-sve.md
gcc/testsuite/g++.target/aarch64/sve/unpacked_cond_ternary_bf16_1.C [new file with mode: 0644]
gcc/testsuite/g++.target/aarch64/sve/unpacked_cond_ternary_bf16_2.C [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fmla_1.c
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fmla_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fmls_1.c
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fmls_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fnmla_1.c
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fnmla_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fnmls_1.c
gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_fnmls_2.c [new file with mode: 0644]