Debian Codegraph @

gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/pr113112-2.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 TYPE double
5 #define N 200
6
7 #include <complex.h>
8
9 void addconjboth (_Complex TYPE a[restrict N], _Complex TYPE b[restrict N],
10 _Complex TYPE c[restrict N])
11 {
12 #if defined (UNROLL)
13 #pragma GCC unroll 16
14 #endif
15 for (int i=0; i < N; i++)
16 c[i] = ~a[i] + ~b[i];
17 }
18
19 /* { dg-final { scan-assembler {e64,m4} } } */
20 /* { dg-final { scan-tree-dump-times "Maximum lmul = 4, At most 16 number of live V_REG" 1 "vect" } } */