111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2 /* { dg-add-options bind_pic_locally } */
|
|
3
|
|
4 #include <stdarg.h>
|
|
5 #include "tree-vect.h"
|
|
6
|
|
7 #define N 16
|
|
8
|
|
9 int a[N];
|
|
10 int results[N] = {0,1,2,3,0,0,0,0,0,0,0,0,12,13,14,15};
|
|
11 int b[N] = {0,1,2,3,-4,-5,-6,-7,-8,-9,-10,-11,12,13,14,15};
|
|
12
|
|
13 __attribute__ ((noinline))
|
|
14 int main1()
|
|
15 {
|
|
16 int i;
|
|
17
|
|
18 /* Max pattern. */
|
|
19 for (i = 0; i < N; i++)
|
|
20 {
|
|
21 a[i] = (b[i] >= 0 ? b[i] : 0);
|
|
22 }
|
|
23
|
|
24 /* Check results */
|
|
25 for (i = 0; i < N; i++)
|
|
26 {
|
|
27 if (a[i] != results[i])
|
|
28 abort ();
|
|
29 }
|
|
30
|
|
31 return 0;
|
|
32 }
|
|
33
|
|
34 int main (void)
|
|
35 {
|
|
36 check_vect ();
|
|
37
|
|
38 return main1 ();
|
|
39 }
|
|
40
|
|
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
|
|
42 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
|