Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/pr112438.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -fno-vect-cost-model -ffast-math -fdump-tree-optimized-details" } */
3
4 void
5 foo (int n, int *__restrict in, int *__restrict out)
6 {
7 for (int i = 0; i < n; i += 1)
8 {
9 out[i] = in[i] + i;
10 }
11 }
12
13 void
14 foo2 (int n, float * __restrict in,
15 float * __restrict out)
16 {
17 for (int i = 0; i < n; i += 1)
18 {
19 out[i] = in[i] + i;
20 }
21 }
22
23 void
24 foo3 (int n, float * __restrict in,
25 float * __restrict out, float x)
26 {
27 for (int i = 0; i < n; i += 1)
28 {
29 out[i] = in[i] + i* i;
30 }
31 }
32
33 /* We don't want to see vect_vec_iv_.21_25 + { POLY_INT_CST [4, 4], ... }. */
34 /* { dg-final { scan-tree-dump-not "\\+ \{ POLY_INT_CST" "optimized" } } */