Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c

raw
1 /* { dg-do compile } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-mdejagnu-cpu=power7 -O2 -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" } */
4 /* { dg-require-effective-target powerpc_vsx } */
5
6 /* Taken from vect/vect-95.c. */
7
8 #define N 256
9
10 void bar (double *pd, double *pa, double *pb, double *pc);
11
12 __attribute__ ((noinline)) int
13 main1 (int n, double * __restrict__ pd, double * __restrict__ pa, double * __restrict__ pb, double * __restrict__ pc)
14 {
15 int i;
16
17 for (i = 0; i < n; i++)
18 {
19 pa[i] = pb[i] * pc[i];
20 pd[i] = 5.0;
21 }
22
23 bar (pd,pa,pb,pc);
24
25 return 0;
26 }
27
28 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
29 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
30 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" { xfail { powerpc*-*-aix* } } } } */
31 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */