Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/fminnm_2.c

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