1 /* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
2
3 #pragma GCC target "+nosve"
4
5 void
6 f (double *restrict res, double *restrict ptr)
7 {
8 double x0 = res[0];
9 double x1 = res[1];
10 for (int i = 0; i < 128; i += 2)
11 {
12 x0 = __builtin_fmax (x0, ptr[i + 0]);
13 x1 = __builtin_fmax (x1, ptr[i + 1]);
14 }
15 res[0] = x0;
16 res[1] = x1;
17 }
18
19 /* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
20 /* { dg-final { scan-assembler {\tstr\tq[0-9]+, \[x0\]\n} } } */