| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-mavx512fp16 -mavx512vl -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times {(?n)vcvttph2w[ \t]} 2 } } */ |
| 4 |
/* { dg-final { scan-assembler-times {(?n)vcvttph2uw[ \t]} 2 } } */ |
| 5 |
/* { dg-final { scan-assembler-times {(?n)vcvttph2dq[ \t]} 1 } } */ |
| 6 |
/* { dg-final { scan-assembler-times {(?n)vcvttph2udq[ \t]} 1 } } */ |
| 7 |
/* { dg-final { scan-assembler-times {(?n)vcvtw2ph[ \t]} 2 } } */ |
| 8 |
/* { dg-final { scan-assembler-times {(?n)vcvtuw2ph[ \t]} 2 } } */ |
| 9 |
/* { dg-final { scan-assembler-times {(?n)vcvtdq2phx[ \t]} 1 } } */ |
| 10 |
/* { dg-final { scan-assembler-times {(?n)vcvtudq2phx[ \t]} 1 } } */ |
| 11 |
/* { dg-final { scan-assembler-times {(?n)vcvtph2psx[ \t]} 1 } } */ |
| 12 |
/* { dg-final { scan-assembler-times {(?n)vcvtps2phxx[ \t]} 1 } } */ |
| 13 |
|
| 14 |
|
| 15 |
void |
| 16 |
fix_32 (short* __restrict pa, _Float16* pb) |
| 17 |
{ |
| 18 |
for (int i = 0; i != 2; i++) |
| 19 |
pa[i] = pb[i]; |
| 20 |
} |
| 21 |
|
| 22 |
void |
| 23 |
fix_64 (short* __restrict pa, _Float16* pb) |
| 24 |
{ |
| 25 |
for (int i = 0; i != 4; i++) |
| 26 |
pa[i] = pb[i]; |
| 27 |
} |
| 28 |
|
| 29 |
void |
| 30 |
fixuns_32 (unsigned short* __restrict pa, _Float16* pb) |
| 31 |
{ |
| 32 |
for (int i = 0; i != 2; i++) |
| 33 |
pa[i] = pb[i]; |
| 34 |
} |
| 35 |
|
| 36 |
void |
| 37 |
fixuns_64 (unsigned short* __restrict pa, _Float16* pb) |
| 38 |
{ |
| 39 |
for (int i = 0; i != 4; i++) |
| 40 |
pa[i] = pb[i]; |
| 41 |
} |
| 42 |
|
| 43 |
void |
| 44 |
float_32 (short* __restrict pa, _Float16* pb) |
| 45 |
{ |
| 46 |
for (int i = 0; i != 2; i++) |
| 47 |
pb[i] = pa[i]; |
| 48 |
} |
| 49 |
|
| 50 |
void |
| 51 |
float_64 (short* __restrict pa, _Float16* pb) |
| 52 |
{ |
| 53 |
for (int i = 0; i != 4; i++) |
| 54 |
pb[i] = pa[i]; |
| 55 |
} |
| 56 |
|
| 57 |
void |
| 58 |
floatuns_32 (unsigned short* __restrict pa, _Float16* pb) |
| 59 |
{ |
| 60 |
for (int i = 0; i != 2; i++) |
| 61 |
pb[i] = pa[i]; |
| 62 |
} |
| 63 |
|
| 64 |
void |
| 65 |
floatuns_64 (unsigned short* __restrict pa, _Float16* pb) |
| 66 |
{ |
| 67 |
for (int i = 0; i != 4; i++) |
| 68 |
pb[i] = pa[i]; |
| 69 |
} |
| 70 |
|
| 71 |
void |
| 72 |
fix_32si (int* __restrict pa, _Float16* pb) |
| 73 |
{ |
| 74 |
for (int i = 0; i != 2; i++) |
| 75 |
pa[i] = pb[i]; |
| 76 |
} |
| 77 |
|
| 78 |
void |
| 79 |
fix_32usi (unsigned int* __restrict pa, _Float16* pb) |
| 80 |
{ |
| 81 |
for (int i = 0; i != 2; i++) |
| 82 |
pa[i] = pb[i]; |
| 83 |
} |
| 84 |
|
| 85 |
void |
| 86 |
float_32si (int* __restrict pa, _Float16* pb) |
| 87 |
{ |
| 88 |
for (int i = 0; i != 2; i++) |
| 89 |
pb[i] = pa[i]; |
| 90 |
} |
| 91 |
|
| 92 |
void |
| 93 |
float_32usi (unsigned int* __restrict pa, _Float16* pb) |
| 94 |
{ |
| 95 |
for (int i = 0; i != 2; i++) |
| 96 |
pb[i] = pa[i]; |
| 97 |
} |
| 98 |
|
| 99 |
void |
| 100 |
float_extend (float* __restrict pa, _Float16* pb) |
| 101 |
{ |
| 102 |
for (int i = 0; i != 2; i++) |
| 103 |
pa[i] = pb[i]; |
| 104 |
} |
| 105 |
|
| 106 |
void |
| 107 |
float_truncate (float* __restrict pa, _Float16* pb) |
| 108 |
{ |
| 109 |
for (int i = 0; i != 2; i++) |
| 110 |
pb[i] = pa[i]; |
| 111 |
} |