]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix predication of FP8 FDOT insns [PR120986]
authorAlex Coplan <alex.coplan@arm.com>
Tue, 15 Jul 2025 09:37:58 +0000 (10:37 +0100)
committerAlex Coplan <alex.coplan@arm.com>
Fri, 8 Aug 2025 11:07:08 +0000 (12:07 +0100)
commit75eabf69d805b7effb5e50f0ed53f45d6a2f596a
tree9b0e6c0506c0940bdc1eb71a22d06f271dd858f1
parent43949a5271b6c0b14076b736d0c609235d36f7df
aarch64: Fix predication of FP8 FDOT insns [PR120986]

The predication of the SVE2 FP8 dot product insns was relying on the
architectural dependency:

FEAT_FP8DOT2 => FEAT_FP8DOT4

which was relaxed in GCC as of
r15-7480-g299a8e2dc667e795991bc439d2cad5ea5bd379e2, thus leading to
unrecognisable insn ICEs when compiling a two-way FDOT with just
+fp8dot2.  This patch introduces a new mode iterator which selectively
enables the appropriate mode(s) depending on which of the FP8DOT{2,4}
features are available, and uses it to fix the predication of the
patterns.

gcc/ChangeLog:

PR target/120986
* config/aarch64/aarch64-sve2.md (@aarch64_sve_dot<mode>):
Switch mode iterator from SVE_FULL_HSF to new iterator;
remove insn predicate as this is now taken care of by conditions
in the mode iterator.
(@aarch64_sve_dot_lane<mode>): Likewise.
* config/aarch64/iterators.md (SVE_FULL_HSF_FP8_FDOT): New.

gcc/testsuite/ChangeLog:

PR target/120986
* gcc.target/aarch64/pr120986-1.c: New test.
gcc/config/aarch64/aarch64-sve2.md
gcc/config/aarch64/iterators.md
gcc/testsuite/gcc.target/aarch64/pr120986-1.c [new file with mode: 0644]