summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/target-supports.exp
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-01-30 15:46:28 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2020-01-31 17:40:40 +0000
commit896dff99e18d67afdbe4d1effec20a3da474b22b (patch)
treea9748a224c469e33702b6bdb082dd12e444bc897 /gcc/testsuite/lib/target-supports.exp
parent02fcd8ac408be56d2a6e67e2e09b26532862f233 (diff)
aarch64: Add Armv8.6 SVE bfloat16 support
This patch adds support for the SVE intrinsics that map to Armv8.6 bfloat16 instructions. This means that svcvtnt is now a base SVE function for one type suffix combination; the others are still SVE2-specific. This relies on a binutils fix: https://sourceware.org/ml/binutils/2020-01/msg00450.html so anyone testing older binutils 2.34 or binutils master sources will need to upgrade to get clean test results. (At the time of writing, no released version of binutils has this bug.) 2020-01-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.h (TARGET_SVE_BF16): New macro. * config/aarch64/aarch64-sve-builtins-sve2.h (svcvtnt): Move to aarch64-sve-builtins-base.h. * config/aarch64/aarch64-sve-builtins-sve2.cc (svcvtnt): Move to aarch64-sve-builtins-base.cc. * config/aarch64/aarch64-sve-builtins-base.h (svbfdot, svbfdot_lane) (svbfmlalb, svbfmlalb_lane, svbfmlalt, svbfmlalt_lane, svbfmmla) (svcvtnt): Declare. * config/aarch64/aarch64-sve-builtins-base.cc (svbfdot, svbfdot_lane) (svbfmlalb, svbfmlalb_lane, svbfmlalt, svbfmlalt_lane, svbfmmla) (svcvtnt): New functions. * config/aarch64/aarch64-sve-builtins-base.def (svbfdot, svbfdot_lane) (svbfmlalb, svbfmlalb_lane, svbfmlalt, svbfmlalt_lane, svbfmmla) (svcvtnt): New functions. (svcvt): Add a form that converts f32 to bf16. * config/aarch64/aarch64-sve-builtins-shapes.h (ternary_bfloat) (ternary_bfloat_lane, ternary_bfloat_lanex2, ternary_bfloat_opt_n): Declare. * config/aarch64/aarch64-sve-builtins-shapes.cc (parse_element_type): Treat B as bfloat16_t. (ternary_bfloat_lane_base): New class. (ternary_bfloat_def): Likewise. (ternary_bfloat): New shape. (ternary_bfloat_lane_def): New class. (ternary_bfloat_lane): New shape. (ternary_bfloat_lanex2_def): New class. (ternary_bfloat_lanex2): New shape. (ternary_bfloat_opt_n_def): New class. (ternary_bfloat_opt_n): New shape. * config/aarch64/aarch64-sve-builtins.cc (TYPES_cvt_bfloat): New macro. * config/aarch64/aarch64-sve.md (@aarch64_sve_<sve_fp_op>vnx4sf) (@aarch64_sve_<sve_fp_op>_lanevnx4sf): New patterns. (@aarch64_sve_<optab>_trunc<VNx4SF_ONLY:mode><VNx8BF_ONLY:mode>) (@cond_<optab>_trunc<VNx4SF_ONLY:mode><VNx8BF_ONLY:mode>): Likewise. (*cond_<optab>_trunc<VNx4SF_ONLY:mode><VNx8BF_ONLY:mode>): Likewise. (@aarch64_sve_cvtnt<VNx8BF_ONLY:mode>): Likewise. * config/aarch64/aarch64-sve2.md (@aarch64_sve2_cvtnt<mode>): Key the pattern off the narrow mode instead of the wider one. * config/aarch64/iterators.md (VNx8BF_ONLY): New mode iterator. (UNSPEC_BFMLALB, UNSPEC_BFMLALT, UNSPEC_BFMMLA): New unspecs. (sve_fp_op): Handle them. (SVE_BFLOAT_TERNARY_LONG): New int itertor. (SVE_BFLOAT_TERNARY_LONG_LANE): Likewise. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_aarch64_asm_bf16_ok): New proc. * gcc.target/aarch64/sve/acle/asm/bfdot_f32.c: New test. * gcc.target/aarch64/sve/acle/asm/bfdot_lane_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/bfmlalb_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/bfmlalb_lane_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/bfmlalt_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/bfmlalt_lane_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/bfmmla_f32.c: Likweise. * gcc.target/aarch64/sve/acle/asm/cvt_bf16.c: Likweise. * gcc.target/aarch64/sve/acle/asm/cvtnt_bf16.c: Likweise. * gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_1.c: Likweise. * gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_lane_1.c: Likweise. * gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_lanex2_1.c: Likweise. * gcc.target/aarch64/sve/acle/general-c/ternary_bfloat16_opt_n_1.c: Likweise.
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r--gcc/testsuite/lib/target-supports.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 6c06faf580a..5377d7b11cb 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8996,7 +8996,7 @@ proc check_effective_target_aarch64_tiny { } {
# various architecture extensions via the .arch_extension pseudo-op.
foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse" "dotprod" "sve"
- "i8mm" "f32mm" "f64mm" } {
+ "i8mm" "f32mm" "f64mm" "bf16" } {
eval [string map [list FUNC $aarch64_ext] {
proc check_effective_target_aarch64_asm_FUNC_ok { } {
if { [istarget aarch64*-*-*] } {