Debian Codegraph @

gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-store-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "-O3" }
4
5 /* This test case is partially extracted from case
6 gcc.dg/vect/vect-avg-16.c, it's to verify we don't
7 cost a store with vec_to_scalar when we shouldn't. */
8
9 void
10 test (signed char *restrict a, signed char *restrict b, signed char *restrict c,
11 int n)
12 {
13 for (int j = 0; j < n; ++j)
14 {
15 for (int i = 0; i < 16; ++i)
16 a[i] = (b[i] + c[i]) >> 1;
17 a += 20;
18 b += 20;
19 c += 20;
20 }
21 }
22
23 /* { dg-final { scan-tree-dump-times "vec_to_scalar" 0 "vect" } } */