From 3ec6d8a030cd893c24ea5da9e86bc5eaed747b21 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 11 May 2023 10:06:25 -0300 Subject: [PATCH] [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. --- gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c | 4 +--- 1 file changed, 1 insertion(+), 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 0001dd3fc211..1845bd3f0f70 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 - 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]; } } -- 2.47.2