1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O3 --save-temps" } */
3
4 #include <stdint.h>
5
6 void __attribute__ ((noinline, noclone))
vcvtf_16(_Float16 * dst,int16_t * src1,int size)7 vcvtf_16 (_Float16 *dst, int16_t *src1, int size)
8 {
9 for (int i = 0; i < size; i++)
10 dst[i] = (_Float16) src1[i];
11 }
12
13 void __attribute__ ((noinline, noclone))
vcvtf_32(float * dst,int32_t * src1,int size)14 vcvtf_32 (float *dst, int32_t *src1, int size)
15 {
16 for (int i = 0; i < size; i++)
17 dst[i] = (float) src1[i];
18 }
19
20 void __attribute__ ((noinline, noclone))
vcvtf_64(double * dst,int64_t * src1,int size)21 vcvtf_64 (double *dst, int64_t *src1, int size)
22 {
23 for (int i = 0; i < size; i++)
24 dst[i] = (double) src1[i];
25 }
26
27 /* { dg-final { scan-assembler-times {\tscvtf\tz[0-9]+\.h, p[0-7]/m, z[0-9]+\.h\n} 1 } } */
28 /* { dg-final { scan-assembler-times {\tscvtf\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 1 } } */
29 /* { dg-final { scan-assembler-times {\tscvtf\tz[0-9]+\.d, p[0-7]/m, z[0-9]+\.d\n} 1 } } */
30