Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/vlmax_bb_prop-19.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 f6 (int * restrict in, int * restrict out, int n, int cond)
7 {
8 if (cond == 1)
9 {
10 vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 100);
11 *(vfloat32mf2_t*)(out + 100) = v;
12 }
13 else
14 {
15 vfloat32mf2_t v = *(vfloat32mf2_t*)(in + 200);
16 *(vfloat32mf2_t*)(out + 200) = v;
17 if (cond == 2)
18 {
19 out[1000] = 8000;
20 }
21 else
22 {
23 out[2000] = 9000;
24 }
25 }
26 for (int i = 0; i < n; i++)
27 {
28 vfloat32mf2_t v = *(vfloat32mf2_t*)(in + i);
29 *(vfloat32mf2_t*)(out + i) = v;
30 }
31 }
32
33 /* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e32,\s*mf2,\s*t[au],\s*m[au]} 2 { target { no-opts "-O0" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */
34 /* { dg-final { scan-assembler-times {add\ta[0-7],a[0-7],a[0-7]\s+\.L[0-9]\:\s+vle32\.v\s+(?:v[0-9]|v[1-2][0-9]|v3[0-1]),0\s*\([a-x0-9]+\)} 1 { target { no-opts "-O0" no-opts "-O1" no-opts "-Os" no-opts "-Oz" no-opts "-funroll-loops" no-opts "-g" } } } } */