From 07fb24a3daf0a46e3e39c0bad99eae6e34e5aa0f Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 8 Jan 2021 10:44:22 +0000 Subject: [PATCH] SVE2: Fix aarch64-sve2-acle-asm tests. This fixes a logical inconsistency with the SVE2 ACLE tests where the SVE2 tests are checking for SVE support in the assembler instead of SVE2. This makes all these tests fail when the user has an SVE enabled assembler but not an SVE2 one. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_aarch64_asm_sve2_ok): New. * g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Use it. * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Likewise. --- .../g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp | 2 +- .../gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp | 2 +- gcc/testsuite/lib/target-supports.exp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp b/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp index aa8dc9ee11e..c3a3a01a7ed 100644 --- a/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp +++ b/gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp @@ -66,7 +66,7 @@ set-torture-options { # Main loop. set files [glob -nocomplain $srcdir/$gcc_subdir/asm/*.c] set save-dg-do-what-default ${dg-do-what-default} -if { [check_effective_target_aarch64_asm_sve_ok] +if { [check_effective_target_aarch64_asm_sve2_ok] && [check_effective_target_aarch64_variant_pcs] } { set dg-do-what-default assemble } else { diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp index 8dfd9d3069c..632d3508e32 100644 --- a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp +++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp @@ -62,7 +62,7 @@ set-torture-options { # Main loop. set files [glob -nocomplain $srcdir/$subdir/asm/*.c] set save-dg-do-what-default ${dg-do-what-default} -if { [check_effective_target_aarch64_asm_sve_ok] +if { [check_effective_target_aarch64_asm_sve2_ok] && [check_effective_target_aarch64_variant_pcs] } { set dg-do-what-default assemble } else { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5cf0f4218a6..47d4c45e9eb 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -9735,7 +9735,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" "bf16" "sb" } { + "i8mm" "f32mm" "f64mm" "bf16" "sb" "sve2" } { eval [string map [list FUNC $aarch64_ext] { proc check_effective_target_aarch64_asm_FUNC_ok { } { if { [istarget aarch64*-*-*] } { -- 2.30.2