aarch64: Fix vld1/st1_x4 intrinsic test

Message ID d35b04eab2bc4c72adb150a8f90a1538@amazon.com
State Committed
Commit 278cad85077509b73b1faf32d36f3889c2a5524b
Headers
Series aarch64: Fix vld1/st1_x4 intrinsic test |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

Swinney, Jonathan April 8, 2024, 1:36 a.m. UTC
  The test for this intrinsic was failing silently and so it failed to
report the bug reported in 114521. This patch modifes the test to
report the result.

Bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114521

Signed-off-by: Jonathan Swinney <jswinney@amazon.com>
---
 .../gcc.target/aarch64/advsimd-intrinsics/vld1x4.c     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.40.1
  

Comments

Richard Sandiford April 8, 2024, 1:03 p.m. UTC | #1
"Swinney, Jonathan" <jswinney@amazon.com> writes:
> The test for this intrinsic was failing silently and so it failed to
> report the bug reported in 114521. This patch modifes the test to
> report the result.
>
> Bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114521
>
> Signed-off-by: Jonathan Swinney <jswinney@amazon.com>
> ---
>  .../gcc.target/aarch64/advsimd-intrinsics/vld1x4.c     | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Thanks, pushed to trunk.

Richard

>
> diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
> index 89b289bb21d..17db262a31a 100644
> --- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
> +++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
> @@ -3,6 +3,7 @@
>  /* { dg-skip-if "unimplemented" { arm*-*-* } } */
>  /* { dg-options "-O3" } */
>  
> +#include <stdbool.h>
>  #include <arm_neon.h>
>  #include "arm-neon-ref.h"
>  
> @@ -71,13 +72,16 @@ VARIANT (float64, 2, q_f64)
>  VARIANTS (TESTMETH)
>  
>  #define CHECKS(BASE, ELTS, SUFFIX)	\
> -  if (test_vld1##SUFFIX##_x4 () != 0)	\
> -    fprintf (stderr, "test_vld1##SUFFIX##_x4");
> +  if (test_vld1##SUFFIX##_x4 () != 0) {	\
> +    fprintf (stderr, "test_vld1" #SUFFIX "_x4 failed\n"); \
> +    failed = true; \
> +  }
>  
>  int
>  main (int argc, char **argv)
>  {
> +  bool failed = false;
>    VARIANTS (CHECKS)
>  
> -  return 0;
> +  return (failed) ? 1 : 0;
>  }
  

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
index 89b289bb21d..17db262a31a 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c
@@ -3,6 +3,7 @@ 
 /* { dg-skip-if "unimplemented" { arm*-*-* } } */
 /* { dg-options "-O3" } */
 
+#include <stdbool.h>
 #include <arm_neon.h>
 #include "arm-neon-ref.h"
 
@@ -71,13 +72,16 @@  VARIANT (float64, 2, q_f64)
 VARIANTS (TESTMETH)
 
 #define CHECKS(BASE, ELTS, SUFFIX)	\
-  if (test_vld1##SUFFIX##_x4 () != 0)	\
-    fprintf (stderr, "test_vld1##SUFFIX##_x4");
+  if (test_vld1##SUFFIX##_x4 () != 0) {	\
+    fprintf (stderr, "test_vld1" #SUFFIX "_x4 failed\n"); \
+    failed = true; \
+  }
 
 int
 main (int argc, char **argv)
 {
+  bool failed = false;
   VARIANTS (CHECKS)
 
-  return 0;
+  return (failed) ? 1 : 0;
 }