1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options double_vectors } */
8 #define N (VECTOR_BITS * 2 / 8)
13 int ib
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
14 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
15 short sb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
16 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
17 char cb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
18 {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
20 __attribute__ ((noinline
))
21 int main1 (int n
, int * __restrict__ pib
,
22 short * __restrict__ psb
,
23 char * __restrict__ pcb
)
30 /* Multiple types with different sizes, used in independent
31 computations. Vectorizable. The loads are misaligned. */
32 for (i
= 0; i
< n
; i
++)
40 for (i
= 0; i
< n
; i
++)
55 main1 (N
, ib
, sb
, cb
);
56 main1 (N
-3, ib
, sb
, &cb
[2]);
60 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
61 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
62 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */