| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-mavx512f -mno-avx512vl -mprefer-vector-width=512 -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "vpternlog\[dq\]\[ \\t\]+\\\$(?:216|228|0xd8|0xe4)," 5 } } */ |
| 4 |
|
| 5 |
double cs_df (double x, double y) |
| 6 |
{ |
| 7 |
return __builtin_copysign (x, y); |
| 8 |
} |
| 9 |
|
| 10 |
float cs_sf (float x, float y) |
| 11 |
{ |
| 12 |
return __builtin_copysignf (x, y); |
| 13 |
} |
| 14 |
|
| 15 |
typedef double __attribute__ ((vector_size (16))) v2df; |
| 16 |
typedef double __attribute__ ((vector_size (32))) v4df; |
| 17 |
typedef double __attribute__ ((vector_size (64))) v8df; |
| 18 |
|
| 19 |
v2df cs_v2df (v2df x, v2df y) |
| 20 |
{ |
| 21 |
return __builtin_ia32_copysignpd (x, y); |
| 22 |
} |
| 23 |
|
| 24 |
v4df cs_v4df (v4df x, v4df y) |
| 25 |
{ |
| 26 |
return __builtin_ia32_copysignpd256 (x, y); |
| 27 |
} |
| 28 |
|
| 29 |
v8df cs_v8df (v8df x, v8df y) |
| 30 |
{ |
| 31 |
return __builtin_ia32_copysignpd512 (x, y); |
| 32 |
} |