1 /* { dg-require-effective-target vect_int } */
16 unsigned char ub
[N
*2] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
17 unsigned char uc
[N
] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
20 main1 (unsigned char x
, unsigned char max_result
, unsigned char min_result
, s
*arr
)
23 unsigned char udiff
= 2;
24 unsigned char umax
= x
;
25 unsigned char umin
= x
;
26 unsigned char ua1
[N
*2];
30 for (i
= 0; i
< N
; i
++) {
31 udiff
+= (unsigned char)(ub
[i
] - uc
[i
]);
33 ua1
[2*i
+1] = ub
[2*i
+1];
36 out
[i
].d
= pIn
->d
- 1;
37 out
[i
].b
= pIn
->b
- 4;
38 out
[i
].c
= pIn
->c
- 8;
39 out
[i
].a
= pIn
->a
- 3;
45 for (i
= 0; i
< N
; i
++) {
46 if (ua1
[2*i
] != ub
[2*i
]
47 || ua1
[2*i
+1] != ub
[2*i
+1]
48 || out
[i
].a
!= arr
[i
].a
- 3
49 || out
[i
].b
!= arr
[i
].b
- 4
50 || out
[i
].c
!= arr
[i
].c
- 8
51 || out
[i
].d
!= arr
[i
].d
- 1)
65 for (i
= 0; i
< N
; i
++)
68 arr
[i
].b
= i
* 2 + 10;
71 asm volatile ("" ::: "memory");
75 main1 (100, 100, 1, arr
);
76 main1 (0, 15, 0, arr
);
80 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && ilp32 } } } } */
81 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { xfail { vect_no_align && ilp32 } } } } */