Debian Codegraph @

gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr113112-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize -mrvv-max-lmul=dynamic -mrvv-vector-bits=zvl -fdump-tree-vect-details" } */
3
4 #define N 40
5
6 int a[N];
7
8 __attribute__ ((noinline)) int
9 foo (int n){
10 int i,j;
11 int sum,x;
12
13 for (i = 0; i < n; i++) {
14 sum = 0;
15 for (j = 0; j < n; j++) {
16 sum += (i + j);
17 }
18 a[i] = sum;
19 }
20 return 0;
21 }
22
23 /* { dg-final { scan-assembler {e32,m4} } } */
24 /* { dg-final { scan-assembler-not {jr} } } */
25 /* { dg-final { scan-assembler-times {ret} 1 } } */
26 /* { dg-final { scan-tree-dump-times "Preferring smaller LMUL loop because it has unexpected spills" 1 "vect" } } */