libstdc++: avoid -Wsign-compare
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-27.c
blob1c970168609b858d2eb3cbc3983d64b59a33ddd8
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0 -fdump-tree-optimized-details-blocks" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-add-options bind_pic_locally } */
6 #include <stdarg.h>
7 #include "tree-vect.h"
9 #define N 128
11 /* unaligned load. */
13 int ia[N];
14 int ib[N+1];
16 __attribute__ ((noinline))
17 int main1 ()
19 int i;
21 for (i=0; i <= N; i++)
23 ib[i] = i;
26 for (i = 1; i <= N; i++)
28 ia[i-1] = ib[i];
31 /* check results: */
32 #pragma GCC novector
33 for (i = 1; i <= N; i++)
35 if (ia[i-1] != ib[i])
36 abort ();
39 return 0;
42 int main (void)
44 check_vect ();
46 return main1 ();
49 /* The initialization induction loop (with aligned access) is also vectorized. */
50 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
54 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */