arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-fncall-mask-math.c
blob15e22da280797a206559c9a096d16b651ce54732
1 /* Test the correct application of masking to autovectorized math function calls.
2 Test is currently set to xfail pending the release of the relevant lmvec
3 support. */
4 /* { dg-do compile { target { aarch64*-*-* } } } */
5 /* { dg-additional-options "-march=armv8.2-a+sve -fdump-tree-ifcvt-raw -Ofast" { target { aarch64*-*-* } } } */
7 #include <math.h>
9 const int N = 20;
10 const float lim = 101.0;
11 const float cst = -1.0;
12 float tot = 0.0;
14 float b[20];
15 float a[20] = { [0 ... 9] = 1.7014118e39, /* If branch. */
16 [10 ... 19] = 100.0 }; /* Else branch. */
18 int main (void)
20 #pragma omp simd
21 for (int i = 0; i < N; i += 1)
23 if (a[i] > lim)
24 b[i] = cst;
25 else
26 b[i] = expf (a[i]);
27 tot += b[i];
29 return (0);
32 /* { dg-final { scan-tree-dump-not { gimple_call <expf, _2, _1>} ifcvt { xfail { aarch64*-*-* } } } } */
33 /* { dg-final { scan-tree-dump { gimple_call <.MASK_CALL, _2, expf, _1, _30>} ifcvt { xfail { aarch64*-*-* } } } } */