]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Fix vld1/st1_x4 intrinsic test
authorSwinney, Jonathan <jswinney@amazon.com>
Mon, 8 Apr 2024 13:02:33 +0000 (14:02 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 Apr 2024 13:02:33 +0000 (14:02 +0100)
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/testsuite/
* gcc.target/aarch64/advsimd-intrinsics/vld1x4.c: Exit with a nonzero
code if the test fails.

gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vld1x4.c

index 89b289bb21dcd81fe5b69d8da6d667612255e641..17db262a31aedcc37c4f69ff5c1e874bd6c85862 100644 (file)
@@ -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;
 }