libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-96.c
blobdf1307a3819fe8ade9c5dd4cf6578153c0f4a9a7
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0 -fdump-tree-optimized-details-blocks" } */
3 /* { dg-require-effective-target vect_int } */
4 /* { dg-add-options double_vectors } */
6 #include <stdarg.h>
7 #include "tree-vect.h"
9 #if VECTOR_BITS > 256
10 #define N (VECTOR_BITS * 2 / 32)
11 #else
12 #define N 16
13 #endif
15 struct tmp
17 int x;
18 int ia[N];
21 __attribute__ ((noinline))
22 int main1 (int off)
24 struct tmp sb[N];
25 struct tmp *pp = &sb[off];
26 int i, ib[N];
28 for (i = 0; i < N; i++)
29 pp->ia[i] = ib[i];
31 /* check results: */
32 #pragma GCC novector
33 for (i = 0; i < N; i++)
35 if (pp->ia[i] != ib[i])
36 abort();
39 return 0;
42 int main (void)
44 check_vect ();
46 return main1 (8);
49 /* The store is unaligned, the load is aligned. For targets that support unaligned
50 loads, peel to align the store and generate an unaligned access for the load.
51 For targets that don't support unaligned loads, version for the store. */
53 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
54 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && { ! vect_align_stack_vars } } xfail { ! vect_unaligned_possible } } } } */
55 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
56 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
57 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
58 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */