| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gcv -mabi=lp64d -O3" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
void f (void *base,void *base2,void *out,size_t vl, int n) |
| 7 |
{ |
| 8 |
vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100, vl); |
| 9 |
for (int i = 0; i < n; i++){ |
| 10 |
vbool8_t m = __riscv_vlm_v_b8 (base + i, vl); |
| 11 |
vuint64m8_t v = __riscv_vluxei64_v_u64m8_m(m,base,bindex,vl); |
| 12 |
vuint64m8_t v2 = __riscv_vle64_v_u64m8_tu (v, base2 + i, vl); |
| 13 |
vint8m1_t v3 = __riscv_vluxei64_v_i8m1_m(m,base,v,vl); |
| 14 |
vint8m1_t v4 = __riscv_vluxei64_v_i8m1_m(m,base,v2,vl); |
| 15 |
__riscv_vse8_v_i8m1 (out + 100*i,v3,vl); |
| 16 |
__riscv_vse8_v_i8m1 (out + 222*i,v4,vl); |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
/* { dg-final { scan-assembler-not {csrr} } } */ |