Debian Codegraph @

gcc/testsuite/gcc.dg/vect/costmodel/riscv/rvv/dynamic-lmul8-7.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ftree-vectorize -mrvv-max-lmul=dynamic -fdump-tree-vect-details" } */
3
4 #include <stdint-gcc.h>
5
6 void
7 foo (int32_t *__restrict a, int32_t *__restrict b, int32_t *__restrict a2,
8 int32_t *__restrict b2, int32_t *__restrict a3, int32_t *__restrict b3,
9 int32_t *__restrict a4, int32_t *__restrict b4, int32_t *__restrict a5,
10 int32_t *__restrict b5, int n)
11 {
12 for (int i = 0; i < n; i++)
13 {
14 a[i] = b[i] * a2[i] * b2[i] * a3[i] * b3[i] * a4[i] * b4[i] * a5[i] * b5[i];
15 }
16 }
17
18 /* { dg-final { scan-assembler {e32,m8} } } */
19 /* { dg-final { scan-assembler-not {csrr} } } */
20 /* { dg-final { scan-tree-dump-not "Preferring smaller LMUL loop because it has unexpected spills" "vect" } } */
21 /* { dg-final { scan-tree-dump-times "Maximum lmul = 8" 1 "vect" } } */
22 /* { dg-final { scan-tree-dump-times "Maximum lmul = 4" 1 "vect" } } */
23 /* { dg-final { scan-tree-dump-times "Maximum lmul = 2" 1 "vect" } } */