| 1 |
/* { dg-options "-O" } */ |
| 2 |
|
| 3 |
#pragma GCC target "+simd+fp16" |
| 4 |
|
| 5 |
__Float16x4_t |
| 6 |
f1 (__Float16x4_t x, __Float16x4_t y) |
| 7 |
{ |
| 8 |
return x * y[0]; |
| 9 |
} |
| 10 |
|
| 11 |
__Float16x4_t |
| 12 |
f2 (__Float16x4_t x, __Float16x4_t y) |
| 13 |
{ |
| 14 |
return x * y[3]; |
| 15 |
} |
| 16 |
|
| 17 |
__Float16x4_t |
| 18 |
f3 (__Float16x4_t x, __Float16x8_t y) |
| 19 |
{ |
| 20 |
return x * y[0]; |
| 21 |
} |
| 22 |
|
| 23 |
__Float16x4_t |
| 24 |
f4 (__Float16x4_t x, __Float16x8_t y) |
| 25 |
{ |
| 26 |
return x * y[7]; |
| 27 |
} |
| 28 |
|
| 29 |
__Float16x8_t |
| 30 |
f5 (__Float16x8_t x, __Float16x4_t y) |
| 31 |
{ |
| 32 |
return x * y[0]; |
| 33 |
} |
| 34 |
|
| 35 |
__Float16x8_t |
| 36 |
f6 (__Float16x8_t x, __Float16x4_t y) |
| 37 |
{ |
| 38 |
return x * y[3]; |
| 39 |
} |
| 40 |
|
| 41 |
__Float16x8_t |
| 42 |
f7 (__Float16x8_t x, __Float16x8_t y) |
| 43 |
{ |
| 44 |
return x * y[0]; |
| 45 |
} |
| 46 |
|
| 47 |
__Float16x8_t |
| 48 |
f8 (__Float16x8_t x, __Float16x8_t y) |
| 49 |
{ |
| 50 |
return x * y[7]; |
| 51 |
} |
| 52 |
|
| 53 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.4h, v0.4h, v1.h\[0\]} 2 } } */ |
| 54 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.4h, v0.4h, v1.h\[3\]} 1 } } */ |
| 55 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.4h, v0.4h, v1.h\[7\]} 1 } } */ |
| 56 |
|
| 57 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.8h, v0.8h, v1.h\[0\]} 2 } } */ |
| 58 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.8h, v0.8h, v1.h\[3\]} 1 } } */ |
| 59 |
/* { dg-final { scan-assembler-times {\tfmul\tv0.8h, v0.8h, v1.h\[7\]} 1 } } */ |