]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Require SVE2 and/or SME2 for SVE FAMINMAX intrinsics
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 31 Oct 2024 19:52:07 +0000 (19:52 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 31 Oct 2024 19:52:07 +0000 (19:52 +0000)
commita00a0e34b8a7312bcf357bd0238d6d9711ca96b2
tree0b1991122cf7ae0be8c6a21826b3ec1af8aa6ec2
parentede97598e2cdb6310e05b271513f6009e84fc0b5
aarch64: Require SVE2 and/or SME2 for SVE FAMINMAX intrinsics

After the previous patch, we can now accurately model the ISA
requirements for the SVE FAMINMAX intrinsics.  They can be used
in non-streaming mode if TARGET_SVE2 and in streaming mode if
TARGET_SME2 (with both cases also requiring TARGET_FAMINMAX).
They can be used in streaming-compatible mode if TARGET_SVE2
&& TARGET_SME2.

Also, Kyrill pointed out in the original review of the FAMINMAX
support that it would be more consistent to define the rtl patterns
in aarch64-sve2.md rather than aarch64-sve.md, so the pushed patch
did that.  This patch moves the definitions of the intrinsics to
the sve2 files too, for consistency.

gcc/
* config/aarch64/aarch64-sve-builtins-base.cc (svmax, svamin): Move
definitions to...
* config/aarch64/aarch64-sve-builtins-sve2.cc: ...here.
* config/aarch64/aarch64-sve-builtins-base.def (svmax, svamin): Move
definitions to...
* config/aarch64/aarch64-sve-builtins-sve2.def: ...here.  Require
SME2 in streaming mode.

gcc/testsuite/
* gcc.target/aarch64/sve/acle/general/amin_1.c: New test.
* gcc.target/aarch64/sve2/acle/asm/amax_f16.c: Enabled sve2 and
(for streaming mode) sme2.
* gcc.target/aarch64/sve2/acle/asm/amax_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/amax_f64.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/amin_f16.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/amin_f32.c: Likewise.
* gcc.target/aarch64/sve2/acle/asm/amin_f64.c: Likewise.
gcc/config/aarch64/aarch64-sve-builtins-base.cc
gcc/config/aarch64/aarch64-sve-builtins-base.def
gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
gcc/config/aarch64/aarch64-sve-builtins-sve2.def
gcc/testsuite/gcc.target/aarch64/sve/acle/general/amin_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amax_f16.c
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amax_f32.c
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amax_f64.c
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amin_f16.c
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amin_f32.c
gcc/testsuite/gcc.target/aarch64/sve2/acle/asm/amin_f64.c