1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
10 static int a
[N
] = {1,2,3,4,5,6,7,8,9};
11 static int b
[N
] = {2,3,4,5,6,7,8,9,0};
13 __attribute__ ((noinline
))
17 p
= (unsigned int *) malloc (sizeof (unsigned int) * N
);
18 q
= (unsigned int *) malloc (sizeof (unsigned int) * N
);
22 /* Vectorizable, before pointer plus we would get a redundant cast
23 (caused by pointer arithmetics), alias analysis fails to distinguish
24 between the pointers. */
25 for (i
= 0; i
< N
; i
++)
33 for (i
= 0; i
< N
; i
++)
35 if (*q
!= a
[i
] || *p
!= b
[i
])
44 for (i
= 0; i
< N
; i
++)
56 for (i
= 0; i
< N
; i
++)
58 if (*q
!= b
[i
] || *p
!= a
[i
])
74 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
76 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */