Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/select_vl-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -mrvv-vector-bits=scalable -fno-schedule-insns -mrvv-max-lmul=m1 -O3 -ftree-vectorize" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include <stdint-gcc.h>
6
7 /*
8 ** foo:
9 ** vsetivli\t[a-x0-9]+,\s*8,\s*e(8?|16?|32?|64),\s*m(1?|2?|4?|8?|f2?|f4?|f8),\s*t[au],\s*m[au]
10 ** ...
11 ** vle32\.v\tv[0-9]+,0\([a-x0-9]+\)
12 ** ...
13 ** vsetvli\tzero,\s*[a-x0-9]+,\s*e(8?|16?|32?|64),\s*m(1?|2?|4?|8?|f2?|f4?|f8),\s*t[au],\s*m[au]
14 ** ...
15 ** vle32\.v\tv[0-9]+,0\([a-x0-9]+\)
16 ** ...
17 */
18 void
19 foo (int32_t *__restrict a,
20 int32_t *__restrict b,
21 int32_t *__restrict cond)
22 {
23 for (int i = 0; i < 8; i++)
24 if (cond[i])
25 a[i] = b[i];
26 }