Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-41.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mrvv-vector-bits=scalable -march=rv32gcv -mabi=ilp32 -fno-tree-vectorize" } */
3
4 #include "riscv_vector.h"
5
6 void foo5_5 (int32_t * restrict in, int32_t * restrict out, size_t n, size_t m, int cond)
7 {
8 vint8mf2_t v;
9 for (size_t i = 0; i < n; i++)
10 {
11 if (i % 2) {
12 for (size_t j = 0; j < m; j += 1) {
13 if (j % 2 == 0) {
14 v = *(vint8mf2_t*)(in + i + j);
15 } else {
16 *(vint8mf2_t*)(out + i + j) = v;
17 }
18 }
19 } else {
20 *(vint8mf2_t*)(out + i) = v;
21 }
22 }
23 }
24
25 /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf2,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
26 /* { dg-final { scan-assembler-times {vsetvli} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */