Reverting merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / vect / pr33426-ivdep-2.cc
blob3d042301f964af41adff1fcf8fb13549738342ce
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
3 /* { dg-additional-options "-O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
5 /* PR other/33426 */
6 /* Testing whether #pragma ivdep is working. */
8 void foo(int n, int *a, int *b, int *c) {
9 int i;
10 i = 0;
11 #pragma GCC ivdep
12 while(i < n)
14 a[i] = b[i] + c[i];
15 ++i;
19 void bar(int n, int *a, int *b, int *c) {
20 int i;
21 i = 0;
22 #pragma GCC ivdep
25 a[i] = b[i] + c[i];
26 ++i;
28 while(i < n);
31 /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
32 /* { dg-bogus " version" "" { target *-*-* } 0 } */
33 /* { dg-bogus " alias" "" { target *-*-* } 0 } */
34 /* { dg-final { cleanup-tree-dump "vect" } } */
36 /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 2 "original" } } */
37 /* { dg-final { cleanup-tree-dump "original" } } */
38 /* { dg-final { scan-tree-dump-times "ANNOTATE " 2 "gimple" } } */
39 /* { dg-final { cleanup-tree-dump "gimple" } } */