| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mrvv-vector-bits=scalable -march=rv32gcv -mabi=ilp32 -fno-schedule-insns -fno-schedule-insns2" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
void f (int8_t *base, int8_t *out, size_t m, size_t n) { |
| 7 |
int vl = 101; |
| 8 |
for (size_t i = 0; i < m; i++) { |
| 9 |
vint8mf8_t v0 = __riscv_vle8_v_i8mf8_tu(v0, base + i, vl); |
| 10 |
if (n > 100) { |
| 11 |
__riscv_vse8_v_i8mf8(out + i + 100, v0, vl); |
| 12 |
} else { |
| 13 |
__riscv_vse8_v_i8mf8(out + i, v0, vl); |
| 14 |
} |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e8,\s*mf8,\s*tu,\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-g" no-opts "-funroll-loops" } } } } */ |
| 19 |
/* { dg-final { scan-assembler-times {vsetvli} 2 { target { no-opts "-O0" no-opts "-Os" no-opts "-O1" no-opts "-g" no-opts "-funroll-loops" } } } } */ |