| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mvaes -mavx512f -mavx512vl -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "vaesdec\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 4 |
/* { dg-final { scan-assembler-times "vaesdeclast\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\{\n\]*%zmm\[0-9\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "vaesenc\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 6 |
/* { dg-final { scan-assembler-times "vaesenclast\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\{\n\]*%zmm\[0-9\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 7 |
|
| 8 |
/* { dg-final { scan-assembler-times "vaesdec\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 9 |
/* { dg-final { scan-assembler-times "vaesdeclast\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 10 |
/* { dg-final { scan-assembler-times "vaesenc\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 11 |
/* { dg-final { scan-assembler-times "vaesenclast\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 12 |
|
| 13 |
/* { dg-final { scan-assembler-times "vaesdec\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 14 |
/* { dg-final { scan-assembler-times "vaesdeclast\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 15 |
/* { dg-final { scan-assembler-times "vaesenc\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 16 |
/* { dg-final { scan-assembler-times "vaesenclast\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ |
| 17 |
|
| 18 |
#include <immintrin.h> |
| 19 |
|
| 20 |
volatile __m512i x,y; |
| 21 |
volatile __m256i x256, y256; |
| 22 |
volatile __m128i x128, y128; |
| 23 |
|
| 24 |
void extern |
| 25 |
avx512f_test (void) |
| 26 |
{ |
| 27 |
x = _mm512_aesdec_epi128 (x, y); |
| 28 |
x = _mm512_aesdeclast_epi128 (x, y); |
| 29 |
x = _mm512_aesenc_epi128 (x, y); |
| 30 |
x = _mm512_aesenclast_epi128 (x, y); |
| 31 |
|
| 32 |
x256 = _mm256_aesdec_epi128 (x256, y256); |
| 33 |
x256 = _mm256_aesdeclast_epi128 (x256, y256); |
| 34 |
x256 = _mm256_aesenc_epi128 (x256, y256); |
| 35 |
x256 = _mm256_aesenclast_epi128 (x256, y256); |
| 36 |
|
| 37 |
x128 = _mm_aesdec_si128 (x128, y128); |
| 38 |
x128 = _mm_aesdeclast_si128 (x128, y128); |
| 39 |
x128 = _mm_aesenc_si128 (x128, y128); |
| 40 |
x128 = _mm_aesenclast_si128 (x128, y128); |
| 41 |
} |