| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gcv -mabi=lp64d -O0" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
inline vuint32m4_t __attribute__((__always_inline__)) transpose_indexes() { |
| 7 |
static const uint32_t idx_[16] = {0, 4, 8, 12, |
| 8 |
1, 5, 9, 13, |
| 9 |
2, 6, 10, 14, |
| 10 |
3, 7, 11, 15}; |
| 11 |
return __riscv_vle32_v_u32m4(idx_, 16); |
| 12 |
} |
| 13 |
|
| 14 |
void pffft_real_preprocess_4x4(const float *in) { |
| 15 |
vfloat32m1_t r0=__riscv_vle32_v_f32m1(in,4); |
| 16 |
vfloat32m4_t tmp = __riscv_vundefined_f32m4(); |
| 17 |
tmp = __riscv_vset_v_f32m1_f32m4(tmp, 0, r0); |
| 18 |
tmp = __riscv_vset_v_f32m1_f32m4(tmp, 1, r0); |
| 19 |
tmp = __riscv_vset_v_f32m1_f32m4(tmp, 2, r0); |
| 20 |
tmp = __riscv_vset_v_f32m1_f32m4(tmp, 3, r0); |
| 21 |
tmp = __riscv_vrgather_vv_f32m4(tmp, transpose_indexes(), 16); |
| 22 |
r0 = __riscv_vget_v_f32m4_f32m1(tmp, 0); |
| 23 |
} |
| 24 |
|
| 25 |
/* { dg-final { scan-assembler-times {vl[0-9]+re[0-9]+\.v\s+v[0-9]+,\s*0\([a-z]+[0-9]+\)} 10 } } */ |
| 26 |
/* { dg-final { scan-assembler-times {vs[0-9]+r\.v\s+v[0-9]+,\s*0\([a-z]+[0-9]+\)} 8 } } */ |