Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/slp-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv -mabi=ilp32d -mrvv-vector-bits=scalable -fno-vect-cost-model -fdump-tree-optimized-details" } */
3
4 #include <stdint-gcc.h>
5
6 void __attribute__ ((noipa))
7 f (int16_t *restrict a, int16_t *restrict b, int n)
8 {
9 for (int i = 0; i < n; ++i)
10 {
11 a[i * 8 + 0] = b[i * 8 + 37] + 1;
12 a[i * 8 + 1] = b[i * 8 + 37] + 2;
13 a[i * 8 + 2] = b[i * 8 + 37] + 8;
14 a[i * 8 + 3] = b[i * 8 + 37] + 4;
15 a[i * 8 + 4] = b[i * 8 + 37] + 5;
16 a[i * 8 + 5] = b[i * 8 + 37] + 6;
17 a[i * 8 + 6] = b[i * 8 + 37] + 7;
18 a[i * 8 + 7] = b[i * 8 + 37] + 3;
19 }
20 }
21
22 /* FIXME: Since we don't have VECT cost model yet, LOAD_LANES/STORE_LANES are chosen
23 instead of SLP when rvv-autotec-max-lmul=m1. */
24 /* { dg-final { scan-tree-dump-times "\.VEC_PERM" 1 "optimized" { xfail { any-opts "-mrvv-max-lmul=m1" } } } } */