Debian Codegraph @

gcc/testsuite/gcc.target/i386/part-vect-sqrtph-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -mavx512vl -Ofast" } */
3 /* { dg-final { scan-assembler-times {(?n)vsqrtph[ \t].*%xmm[0-9]} 2 { target { ! ia32 } } } } */
4 /* { dg-final { scan-assembler-times {(?n)vsqrtph[ \t].*%xmm[0-9]} 2 { target { ! ia32 } } } } */
5
6 void
7 foo16_sqrt (_Float16* a, _Float16* __restrict c)
8 {
9 c[0] = __builtin_sqrtf16 (a[0]);
10 c[1] = __builtin_sqrtf16 (a[1]);
11 }
12
13 void
14 foo32_sqrt(_Float16* a, _Float16* __restrict c)
15 {
16 c[0] = __builtin_sqrtf16 (a[0]);
17 c[1] = __builtin_sqrtf16 (a[1]);
18 c[2] = __builtin_sqrtf16 (a[2]);
19 c[3] = __builtin_sqrtf16 (a[3]);
20 }