Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/imm_conflict-1.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 f (void * restrict in, void * restrict out, size_t n, size_t cond)
7 {
8 for (size_t i = 0; i < n; i++)
9 {
10 if (i != cond) {
11 vint8mf8_t v = __riscv_vle8_v_i8mf8 (in + i + 100, 17);
12 __riscv_vse8_v_i8mf8 (out + i + 100, v, 17);
13 } else {
14 vint32m1_t v = __riscv_vle32_v_i32m1 (in + i + 200, 4);
15 __riscv_vse32_v_i32m1 (out + i + 200, v, 4);
16 }
17 }
18 }
19
20 /* { dg-final { scan-assembler-times {vsetivli\s+zero,\s*17,\s*e8,\s*mf8,\s*t[au],\s*m[au]} 2 { target { no-opts "-O0" no-opts "-g" no-opts "-funroll-loops" } } } } */
21 /* { dg-final { scan-assembler-times {vsetivli\s+zero,\s*4,\s*e32,\s*m1,\s*t[au],\s*m[au]} 1 { target { no-opts "-O0" no-opts "-g" no-opts "-funroll-loops" } } } } */
22 /* { dg-final { scan-assembler-times {vsetivli} 3 { target { no-opts "-O0" no-opts "-g" no-opts "-funroll-loops" } } } } */