aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2023-05-11 10:06:25 -0300
committerAlexandre Oliva <oliva@gnu.org>2023-05-11 10:06:25 -0300
commit3ec6d8a030cd893c24ea5da9e86bc5eaed747b21 (patch)
treef073e7ee4bdc91f21c85be606593df00bfc4e8a7
parent880565070317cc4a056722d52c82768ea7181af8 (diff)
downloadgcc-3ec6d8a030cd893c24ea5da9e86bc5eaed747b21.zip
gcc-3ec6d8a030cd893c24ea5da9e86bc5eaed747b21.tar.gz
gcc-3ec6d8a030cd893c24ea5da9e86bc5eaed747b21.tar.bz2
[vxworks] [testsuite] [aarch64] use builtin in pred-not-gen-4.c
On vxworks, isunordered is defined as a macro that ultimately calls a _Fpcomp function, that GCC doesn't recognize as a builtin, so it can't optimize accordingly. Use __builtin_isunordered instead to get the desired code for the test. for gcc/testsuite/ChangeLog * gcc.target/aarch64/sve/pred-not-gen-4.c: Drop math.h include, call builtin.
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
index 0001dd3..1845bd3 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
@@ -1,12 +1,10 @@
/* { dg-do compile } */
/* { dg-options "-O3" } */
-#include <math.h>
-
void f13(double * restrict z, double * restrict w, double * restrict x, double * restrict y, int n)
{
for (int i = 0; i < n; i++) {
- z[i] = (isunordered(w[i], 0)) ? x[i] + w[i] : y[i] - w[i];
+ z[i] = (__builtin_isunordered(w[i], 0)) ? x[i] + w[i] : y[i] - w[i];
}
}