Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_conflict-3.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 f2 (int32_t * restrict in, int32_t * restrict in2, int32_t * restrict out, int32_t * restrict out2, size_t n, size_t m, size_t cond, size_t cond2)
7 {
8 for (size_t i = 0; i < n; i++)
9 {
10 if (i > cond) {
11 if (cond2) {
12 for (int j = 0; j < m; j++) {
13 vint8mf8_t v2 = *(vint8mf8_t*)(in2 + i + 100 + j);
14 *(vint8mf8_t*)(out2 + i + 100 + j) = v2;
15 }
16 } else {
17 for (int j = 0; j < m; j++) {
18 vfloat32mf2_t v3 = *(vfloat32mf2_t*)(in2 + i + 300 + j);
19 *(vfloat32mf2_t*)(out2 + i + 100 + j) = v3;
20 }
21 }
22 } else {
23 vbool64_t v = *(vbool64_t*)(in + i + 400);
24 *(vbool64_t*)(out + i + 400) = v;
25 }
26 }
27 }
28
29 /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e8,\s*mf8,\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" } } } } */
30 /* { 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" } } } } */