1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-require-effective-target vect_char_add } */
5 /* { dg-add-options double_vectors } */
11 #define N (VECTOR_BITS * 2 / 8)
16 unsigned int ic
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
17 {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};
18 unsigned int ib
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
19 {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 unsigned short sc
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
21 {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};
22 unsigned short sb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
23 {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};
24 unsigned char cc
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
25 {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 unsigned char cb
[N
] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__
))) =
27 {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};
29 __attribute__ ((noinline
))
31 unsigned int * __restrict__ pic
, unsigned int * __restrict__ pib
,
32 unsigned short * __restrict__ psc
, unsigned short * __restrict__ psb
,
33 unsigned char * __restrict__ pcc
, unsigned char * __restrict__ pcb
)
40 /* Multiple types with different sizes, used in independent
41 computations. Vectorizable. The loads are misaligned. */
42 for (i
= 0; i
< n
; i
++)
44 ia
[i
] = pib
[i
] + pic
[i
];
45 sa
[i
] = psb
[i
] + psc
[i
];
46 ca
[i
] = pcb
[i
] + pcc
[i
];
51 for (i
= 0; i
< n
; i
++)
53 if (ia
[i
] != pib
[i
] + pic
[i
]
54 || sa
[i
] != psb
[i
] + psc
[i
]
55 || ca
[i
] != pcb
[i
] + pcc
[i
])
66 main1 (N
, ic
, ib
, sc
, sb
, cc
, cb
);
67 main1 (N
-3, ic
, ib
, &sc
[1], sb
, cc
, &cb
[2]);
71 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
72 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
73 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */