From: Wilco Dijkstra Date: Tue, 21 Jun 2016 16:35:44 +0000 (+0000) Subject: The recently added gcc.target/aarch64/advsimd-intrinsics/vrnd*.c tests cause... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89192c3c536188bcbb2c99e47106b66eb520bd42;p=gcc.git The recently added gcc.target/aarch64/advsimd-intrinsics/vrnd*.c tests cause... The recently added gcc.target/aarch64/advsimd-intrinsics/vrnd*.c tests cause failures due to accidentally running on non-ARMv8 hardware - the target check arm_v8_neon_ok is correct for compilation tests but should be arm_v8_neon_hw for execution tests. Fix this and also change arm_v8_neon_hw to return true for AArch64 so these tests are run on AArch64 too. gcc/testsuite/ * gcc.target/aarch64/advsimd-intrinsics/vrnd.c (dg-require-effective-target): Use arm_v8_neon_hw. * gcc.target/aarch64/advsimd-intrinsics/vrnda.c (dg-require-effective-target): Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndm.c (dg-require-effective-target): Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndn.c (dg-require-effective-target): Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndp.c (dg-require-effective-target): Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndx.c (dg-require-effective-target): Likewise. * lib/target-supports.exp (check_runtime arm_v8_neon_hw_available): Add AArch64 check. From-SVN: r237653 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7f2df1f8499..ffb16146c31 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2016-06-21 Wilco Dijkstra + + * gcc.target/aarch64/advsimd-intrinsics/vrnd.c + (dg-require-effective-target): Use arm_v8_neon_hw. + * gcc.target/aarch64/advsimd-intrinsics/vrnda.c + (dg-require-effective-target): Likewise. + * gcc.target/aarch64/advsimd-intrinsics/vrndm.c + (dg-require-effective-target): Likewise. + * gcc.target/aarch64/advsimd-intrinsics/vrndn.c + (dg-require-effective-target): Likewise. + * gcc.target/aarch64/advsimd-intrinsics/vrndp.c + (dg-require-effective-target): Likewise. + * gcc.target/aarch64/advsimd-intrinsics/vrndx.c + (dg-require-effective-target): Likewise. + * lib/target-supports.exp (check_runtime arm_v8_neon_hw_available): + Add AArch64 check. + 2016-06-21 Wilco Dijkstra * gcc.dg/tree-ssa/attr-hotcold-2.c (scan-tree-dump-times): diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnd.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnd.c index 5f492d41bff..d97a3a25ee5 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnd.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnd.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnda.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnda.c index 816fd28dd19..ff2bdc0563f 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnda.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrnda.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndm.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndm.c index 029880c21f6..eae9f61c585 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndm.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndm.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndn.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndn.c index 571243c4929..c6c707d6765 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndn.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndn.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndp.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndp.c index ff4771c8789..e94eb6b7622 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndp.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndp.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndx.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndx.c index ff2357bebf3..0d2a63ef26c 100644 --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndx.c +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vrndx.c @@ -1,4 +1,4 @@ -/* { dg-require-effective-target arm_v8_neon_ok } */ +/* { dg-require-effective-target arm_v8_neon_hw } */ /* { dg-add-options arm_v8_neon } */ #include diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 9876bb5f4ce..2a8feb8f13e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3417,11 +3417,17 @@ proc check_effective_target_arm_v8_neon_hw { } { int main (void) { - float32x2_t a; + float32x2_t a = { 1.0f, 2.0f }; + #ifdef __ARM_ARCH_ISA_A64 + asm ("frinta %0.2s, %1.2s" + : "=w" (a) + : "w" (a)); + #else asm ("vrinta.f32 %P0, %P1" : "=w" (a) : "0" (a)); - return 0; + #endif + return a[0] == 2.0f; } } [add_options_for_arm_v8_neon ""]] }