Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/avl_single-68.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mrvv-vector-bits=scalable -march=rv32gcv -mabi=ilp32 -fno-tree-vectorize -fno-schedule-insns -fno-schedule-insns2" } */
3
4 #include "riscv_vector.h"
5
6 void f2 (void * restrict in, void * restrict out, int l, int n, int m)
7 {
8 size_t vl = 101;
9 for (int i = 0; i < l; i++){
10 size_t vl = i + vl + 44;
11 for (int j = 0; j < m; j++){
12 for (int k = 0; k < n; k++)
13 {
14 vint8mf8_t v = __riscv_vle8_v_i8mf8 (in + i + j + k + 10000, vl);
15 v = __riscv_vle8_v_i8mf8_tu (v, in + i + j + k + 20000, vl);
16 __riscv_vse8_v_i8mf8 (out + i + j + k + 20000, v, vl);
17 }
18 }
19 vint8mf8_t v = __riscv_vle8_v_i8mf8 (in + i, vl);
20 __riscv_vse8_v_i8mf8 (out + i, v, vl);
21 }
22 }
23
24 /* The second check is XFAILed because we currently don't lift
25 vsetvls into non-transparent (in LCM parlance) blocks.
26 See PR119547.
27 In this test it is still possible because the conflicting
28 register only ever feeds vsetvls. */
29
30 /* { dg-final { scan-assembler-times {vsetvli} 2 { target { no-opts "-O0" no-opts "-Os" no-opts "-Oz" no-opts "-g" no-opts "-funroll-loops" } } } } */
31 /* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e8,\s*mf8,\s*tu,\s*m[au]} 2 { target { no-opts "-O0" no-opts "-Os" no-opts "-Oz" no-opts "-g" no-opts "-funroll-loops" } xfail { *-*-* } } } } */
32 /* { dg-final { scan-assembler-times {addi\s+[a-x0-9]+,\s*[a-x0-9]+,\s*44} 1 { target { no-opts "-O0" no-opts "-Os" no-opts "-Oz" no-opts "-g" no-opts "-funroll-loops" } } } } */