| 1 |
/* { dg-final { check-function-bodies "**" "" } } */ |
| 2 |
/* { dg-options "-O3 --param aarch64-autovec-preference=sve-only" } */ |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
|
| 6 |
#define FUNC(FUNCTION, NAME, DTYPE) \ |
| 7 |
void \ |
| 8 |
NAME (DTYPE *__restrict x, DTYPE *__restrict y, int n) { \ |
| 9 |
for (int i = 0; i < n; i++) \ |
| 10 |
x[i] = FUNCTION (y[i]); \ |
| 11 |
} \ |
| 12 |
|
| 13 |
|
| 14 |
/* |
| 15 |
** ctz_uint8: |
| 16 |
** ... |
| 17 |
** rbit z[0-9]+\.b, p[0-7]/m, z[0-9]+\.b |
| 18 |
** clz z[0-9]+\.b, p[0-7]/m, z[0-9]+\.b |
| 19 |
** ... |
| 20 |
*/ |
| 21 |
FUNC (__builtin_ctzg, ctz_uint8, uint8_t) |
| 22 |
|
| 23 |
/* |
| 24 |
** ctz_uint16: |
| 25 |
** ... |
| 26 |
** rbit z[0-9]+\.h, p[0-7]/m, z[0-9]+\.h |
| 27 |
** clz z[0-9]+\.h, p[0-7]/m, z[0-9]+\.h |
| 28 |
** ... |
| 29 |
*/ |
| 30 |
FUNC (__builtin_ctzg, ctz_uint16, uint16_t) |
| 31 |
|
| 32 |
/* |
| 33 |
** ctz_uint32: |
| 34 |
** ... |
| 35 |
** rbit z[0-9]+\.s, p[0-7]/m, z[0-9]+\.s |
| 36 |
** clz z[0-9]+\.s, p[0-7]/m, z[0-9]+\.s |
| 37 |
** ... |
| 38 |
*/ |
| 39 |
FUNC (__builtin_ctz, ctz_uint32, uint32_t) |
| 40 |
|
| 41 |
/* |
| 42 |
** ctz_uint64: |
| 43 |
** ... |
| 44 |
** rbit z[0-9]+\.d, p[0-7]/m, z[0-9]+\.d |
| 45 |
** clz z[0-9]+\.d, p[0-7]/m, z[0-9]+\.d |
| 46 |
** ... |
| 47 |
*/ |
| 48 |
FUNC (__builtin_ctzll, ctz_uint64, uint64_t) |
| 49 |
|