Skip to content
Snippets Groups Projects
Commit 9aac37ab authored by Andrew Carlotti's avatar Andrew Carlotti
Browse files

aarch64: Remove architecture dependencies from intrinsics

Many intrinsics currently depend on both an architecture version and a
feature, despite the corresponding instructions being available within
GCC at lower architecture versions.

LLVM has already removed these explicit architecture version
dependences; this patch does the same for GCC. Note that +fp16 does not
imply +simd, so we need to add an explicit +simd for the Neon fp16
intrinsics.

Binutils did not previously support all of these architecture+feature
combinations, but this problem is already reachable from GCC.  For
example, compiling the test gcc.target/aarch64/usadv16qi-dotprod.c
with -O3 -march=armv8-a+dotprod has resulted in an assembler error since
GCC 10.  This is fixed in Binutils 2.41.

This patch retains explicit architecture version dependencies for
features that do not currently have a separate feature flag.

gcc/ChangeLog:

	* config/aarch64/aarch64.h (TARGET_MEMTAG): Remove armv8.5
	dependency.
	* config/aarch64/arm_acle.h: Remove unnecessary armv8.x
	dependencies from target pragmas.
	* config/aarch64/arm_fp16.h (target): Likewise.
	* config/aarch64/arm_neon.h (target): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/feature-bf16-backport.c: New test.
	* gcc.target/aarch64/feature-dotprod-backport.c: New test.
	* gcc.target/aarch64/feature-fp16-backport.c: New test.
	* gcc.target/aarch64/feature-fp16-scalar-backport.c: New test.
	* gcc.target/aarch64/feature-fp16fml-backport.c: New test.
	* gcc.target/aarch64/feature-i8mm-backport.c: New test.
	* gcc.target/aarch64/feature-memtag-backport.c: New test.
	* gcc.target/aarch64/feature-sha3-backport.c: New test.
	* gcc.target/aarch64/feature-sm4-backport.c: New test.
parent 85759829
No related branches found
No related tags found
No related merge requests found
Showing
with 100 additions and 10 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment