| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mavx512fp16 -mavx512vl -mavx512bw" } */ |
| 3 |
|
| 4 |
#include <immintrin.h> |
| 5 |
|
| 6 |
__m512h |
| 7 |
__attribute__ ((noinline, noclone)) |
| 8 |
test_mm512_mask_blend_ph (__mmask32 U, __m512h A, __m512h B ) |
| 9 |
{ |
| 10 |
return _mm512_mask_blend_ph (U, A, B); |
| 11 |
} |
| 12 |
|
| 13 |
/* { dg-final { scan-assembler-times "(?:vmovdqu16|vpblendmw)\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 14 |
|
| 15 |
__m512h |
| 16 |
__attribute__ ((noinline, noclone)) |
| 17 |
test_mm512_permutex2var_ph (__m512h A, __m512i I, __m512h B) |
| 18 |
{ |
| 19 |
return _mm512_permutex2var_ph (A, I, B); |
| 20 |
} |
| 21 |
|
| 22 |
/* { dg-final { scan-assembler-times "vperm\[ti\]2w\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+" 1 } } */ |
| 23 |
|
| 24 |
__m512h |
| 25 |
__attribute__ ((noinline, noclone)) |
| 26 |
test_mm512_permutexvar_ph (__m512i A, __m512h B) |
| 27 |
{ |
| 28 |
return _mm512_permutexvar_ph (A, B); |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+" 1 } } */ |
| 32 |
|
| 33 |
__m256h |
| 34 |
__attribute__ ((noinline, noclone)) |
| 35 |
test_mm256_mask_blend_ph (__mmask16 U, __m256h A, __m256h B ) |
| 36 |
{ |
| 37 |
return _mm256_mask_blend_ph (U, A, B); |
| 38 |
} |
| 39 |
|
| 40 |
/* { dg-final { scan-assembler-times "(?:vmovdqu16|vpblendmw)\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 41 |
|
| 42 |
__m256h |
| 43 |
__attribute__ ((noinline, noclone)) |
| 44 |
test_mm256_permutex2var_ph (__m256h A, __m256i I, __m256h B) |
| 45 |
{ |
| 46 |
return _mm256_permutex2var_ph (A, I, B); |
| 47 |
} |
| 48 |
|
| 49 |
/* { dg-final { scan-assembler-times "vperm\[ti\]2w\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+" 1 { target { ! ia32 } } } } */ |
| 50 |
|
| 51 |
__m256h |
| 52 |
__attribute__ ((noinline, noclone)) |
| 53 |
test_mm256_permutexvar_ph (__m256i A, __m256h B) |
| 54 |
{ |
| 55 |
return _mm256_permutexvar_ph (A, B); |
| 56 |
} |
| 57 |
|
| 58 |
/* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+" 1 } } */ |
| 59 |
|
| 60 |
__m128h |
| 61 |
__attribute__ ((noinline, noclone)) |
| 62 |
test_mm_mask_blend_ph (__mmask8 U, __m128h A, __m128h B ) |
| 63 |
{ |
| 64 |
return _mm_mask_blend_ph (U, A, B); |
| 65 |
} |
| 66 |
|
| 67 |
/* { dg-final { scan-assembler-times "(?:vmovdqu16|vpblendmw)\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ |
| 68 |
|
| 69 |
__m128h |
| 70 |
__attribute__ ((noinline, noclone)) |
| 71 |
test_mm_permutex2var_ph (__m128h A, __m128i I, __m128h B) |
| 72 |
{ |
| 73 |
return _mm_permutex2var_ph (A, I, B); |
| 74 |
} |
| 75 |
|
| 76 |
/* { dg-final { scan-assembler-times "vperm\[it\]2w\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+" 1 } } */ |
| 77 |
|
| 78 |
__m128h |
| 79 |
__attribute__ ((noinline, noclone)) |
| 80 |
test_mm_permutexvar_ph (__m128i A, __m128h B) |
| 81 |
{ |
| 82 |
return _mm_permutexvar_ph (A, B); |
| 83 |
} |
| 84 |
|
| 85 |
/* { dg-final { scan-assembler-times "vpermw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+" 1 } } */ |