| 1 |
/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */ |
| 2 |
|
| 3 |
#pragma GCC target "+nosve" |
| 4 |
|
| 5 |
float |
| 6 |
f1 (float x, float *ptr) |
| 7 |
{ |
| 8 |
for (int i = 0; i < 128; ++i) |
| 9 |
x = __builtin_fminf (x, ptr[i]); |
| 10 |
return x; |
| 11 |
} |
| 12 |
|
| 13 |
double |
| 14 |
f2 (double x, double *ptr) |
| 15 |
{ |
| 16 |
for (int i = 0; i < 128; ++i) |
| 17 |
x = __builtin_fmin (x, ptr[i]); |
| 18 |
return x; |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.4s, v[0-9]+\.4s, v[0-9]+\.4s\n} 1 } } */ |
| 22 |
/* { dg-final { scan-assembler-times {\tfminnmv\ts[0-9]+, v[0-9]+\.4s\n} 1 } } */ |
| 23 |
/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */ |
| 24 |
/* { dg-final { scan-assembler-times {\tfminnmp\td[0-9]+, v[0-9]+\.2d\n} 1 } } */ |