Debian Codegraph @

gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-perm.c

raw
1 /* { dg-do compile } */
2 /* Specify power9 to ensure the vectorization is profitable
3 and test point stands, otherwise it could be not profitable
4 to vectorize. */
5 /* { dg-additional-options "-mdejagnu-cpu=power9 -mvsx" } */
6 /* { dg-require-effective-target vect_int } */
7 /* { dg-require-effective-target powerpc_vsx } */
8
9 /* Verify we cost the exact count for required vec_perm. */
10
11 int x[1024], y[1024];
12
13 void
14 foo ()
15 {
16 for (int i = 0; i < 512; ++i)
17 {
18 x[2 * i] = y[1023 - (2 * i)];
19 x[2 * i + 1] = y[1023 - (2 * i + 1)];
20 }
21 }
22
23 /* { dg-final { scan-tree-dump-times "2 times vec_perm" 1 "vect" } } */