| 1 |
|
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O3 -march=armv8-a+aes" } */ |
| 4 |
|
| 5 |
#include "arm_neon.h" |
| 6 |
|
| 7 |
uint8x16_t |
| 8 |
test0 (uint8x16_t a, uint8x16_t b) |
| 9 |
{ |
| 10 |
uint8x16_t result; |
| 11 |
result = vaeseq_u8 (a, b); |
| 12 |
result = vaeseq_u8 (result, a); |
| 13 |
return result; |
| 14 |
} |
| 15 |
|
| 16 |
uint8x16_t |
| 17 |
test1 (uint8x16_t a, uint8x16_t b) |
| 18 |
{ |
| 19 |
uint8x16_t result; |
| 20 |
result = vaeseq_u8 (a, b); |
| 21 |
result = vaeseq_u8 (a, result); |
| 22 |
return result; |
| 23 |
} |
| 24 |
|
| 25 |
uint8x16_t |
| 26 |
test2 (uint8x16_t a, uint8x16_t b) |
| 27 |
{ |
| 28 |
uint8x16_t result; |
| 29 |
result = vaeseq_u8 (b, a); |
| 30 |
result = vaeseq_u8 (result, b); |
| 31 |
return result; |
| 32 |
} |
| 33 |
|
| 34 |
uint8x16_t |
| 35 |
test3 (uint8x16_t a, uint8x16_t b) |
| 36 |
{ |
| 37 |
uint8x16_t result; |
| 38 |
result = vaeseq_u8 (b, a); |
| 39 |
result = vaeseq_u8 (b, result); |
| 40 |
return result; |
| 41 |
} |
| 42 |
|
| 43 |
uint8x16_t |
| 44 |
test4 (uint8x16_t a, uint8x16_t b) |
| 45 |
{ |
| 46 |
uint8x16_t result; |
| 47 |
result = vaesdq_u8 (a, b); |
| 48 |
result = vaesdq_u8 (result, a); |
| 49 |
return result; |
| 50 |
} |
| 51 |
|
| 52 |
uint8x16_t |
| 53 |
test5 (uint8x16_t a, uint8x16_t b) |
| 54 |
{ |
| 55 |
uint8x16_t result; |
| 56 |
result = vaesdq_u8 (a, b); |
| 57 |
result = vaesdq_u8 (a, result); |
| 58 |
return result; |
| 59 |
} |
| 60 |
|
| 61 |
uint8x16_t |
| 62 |
test6 (uint8x16_t a, uint8x16_t b) |
| 63 |
{ |
| 64 |
uint8x16_t result; |
| 65 |
result = vaesdq_u8 (b, a); |
| 66 |
result = vaesdq_u8 (result, b); |
| 67 |
return result; |
| 68 |
} |
| 69 |
|
| 70 |
uint8x16_t |
| 71 |
test7 (uint8x16_t a, uint8x16_t b) |
| 72 |
{ |
| 73 |
uint8x16_t result; |
| 74 |
result = vaesdq_u8 (b, a); |
| 75 |
result = vaesdq_u8 (b, result); |
| 76 |
return result; |
| 77 |
} |
| 78 |
/* { dg-final { scan-assembler-not "mov" } } */ |
| 79 |
/* { dg-final { scan-assembler "aesd\tv" } } */ |
| 80 |
/* { dg-final { scan-assembler "aese\tv" } } */ |
| 81 |
|