| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target elf } */ |
| 3 |
/* { dg-options "-O2 -funwind-tables" } */ |
| 4 |
|
| 5 |
#include <arm_sve.h> |
| 6 |
|
| 7 |
#define M(F, TY) \ |
| 8 |
sv##TY F##_f (sv##TY inactive, TY op) \ |
| 9 |
{ \ |
| 10 |
return sv##F (inactive, svpfalse_b (), op); \ |
| 11 |
} |
| 12 |
|
| 13 |
#define XZ(F, TY) \ |
| 14 |
sv##TY F##_f (TY op) \ |
| 15 |
{ \ |
| 16 |
return sv##F (svpfalse_b (), op); \ |
| 17 |
} |
| 18 |
|
| 19 |
#define PRED_MXZ(F, TYPE, TY) \ |
| 20 |
M (F##_##TY##_m, TYPE) \ |
| 21 |
XZ (F##_##TY##_x, TYPE) \ |
| 22 |
XZ (F##_##TY##_z, TYPE) |
| 23 |
|
| 24 |
#define ALL_DATA(F, P) \ |
| 25 |
PRED_##P (F, uint8_t, u8) \ |
| 26 |
PRED_##P (F, uint16_t, u16) \ |
| 27 |
PRED_##P (F, uint32_t, u32) \ |
| 28 |
PRED_##P (F, uint64_t, u64) \ |
| 29 |
PRED_##P (F, int8_t, s8) \ |
| 30 |
PRED_##P (F, int16_t, s16) \ |
| 31 |
PRED_##P (F, int32_t, s32) \ |
| 32 |
PRED_##P (F, int64_t, s64) \ |
| 33 |
PRED_##P (F, float16_t, f16) \ |
| 34 |
PRED_##P (F, float32_t, f32) \ |
| 35 |
PRED_##P (F, float64_t, f64) \ |
| 36 |
PRED_##P (F, bfloat16_t, bf16) \ |
| 37 |
|
| 38 |
ALL_DATA (dup, MXZ) |
| 39 |
|
| 40 |
/* { dg-final { scan-assembler-times {\t.cfi_startproc\n\tret\n} 12 } } */ |
| 41 |
/* { dg-final { scan-assembler-times {\t.cfi_startproc\n\tmovi?\t[vdz]([0-9]+)\.?(?:[0-9]*[bhsd])?, #?0\n\tret\n} 12 } } */ |
| 42 |
/* { dg-final { scan-assembler-times {\t.cfi_startproc\n\tmov\tz0(?:\.[bhsd])?, [wxhsd]0\n\tret\n} 12 } } */ |
| 43 |
/* { dg-final { scan-assembler-times {\t.cfi_startproc\n} 36 } } */ |