Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / frinti_1.c
blob7a6b2f80607df4bf22bc4ff928ca502a068442c3
1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
4 #define DO_OPS(TYPE, OP) \
5 void \
6 vsqrt_##TYPE (TYPE *dst, TYPE *src, int count) \
7 { \
8 for (int i = 0; i < count; ++i) \
9 dst[i] = __builtin_##OP (src[i]); \
12 DO_OPS (float, nearbyintf)
13 DO_OPS (double, nearbyint)
15 /* { dg-final { scan-assembler-times {\tfrinti\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 1 } } */
16 /* { dg-final { scan-assembler-times {\tfrinti\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 1 } } */