1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options double_vectors } */
8 #define N (VECTOR_BITS * 2 / 8)
13 unsigned int ic
[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 unsigned int ib
[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 unsigned short sc
[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};
19 unsigned short sb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
20 {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};
21 unsigned char cc
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
22 {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};
23 unsigned char cb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
24 {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};
26 __attribute__ ((noinline
))
28 unsigned int * __restrict__ pic
, unsigned int * __restrict__ pib
,
29 unsigned short * __restrict__ psc
, unsigned short * __restrict__ psb
,
30 unsigned char * __restrict__ pcc
, unsigned char * __restrict__ pcb
)
37 /* Multiple types with different sizes, used in independent
38 computations. Vectorizable. The loads are misaligned. */
39 for (i
= 0; i
< n
; i
++)
41 ia
[i
] = pib
[i
] + pic
[i
];
42 sa
[i
] = psb
[i
] + psc
[i
];
43 ca
[i
] = pcb
[i
] + pcc
[i
];
47 for (i
= 0; i
< n
; i
++)
49 if (ia
[i
] != pib
[i
] + pic
[i
]
50 || sa
[i
] != psb
[i
] + psc
[i
]
51 || ca
[i
] != pcb
[i
] + pcc
[i
])
62 main1 (N
, ic
, ib
, sc
, sb
, cc
, cb
);
63 main1 (N
-3, ic
, ib
, &sc
[1], sb
, cc
, &cb
[2]);
67 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { sparc*-*-* && ilp32 } }} } */
68 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
69 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */