i386: Adjust rtx cost for imulq and imulw [PR115749]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-section-anchors-vect-68.c
blob36b79c2907cc1b41664cdca5074d458e36bdee98
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-skip-if "AArch64 tiny code model does not support programs larger than 1MiB" {aarch64_tiny} } */
5 /* { dg-add-options bind_pic_locally } */
7 #include <stdarg.h>
8 #include "tree-vect.h"
10 #define N 64
12 struct s{
13 int m;
14 int n[N][N][N];
17 struct test1{
18 struct s a; /* array a.n is unaligned */
19 int b;
20 int c;
21 struct s e; /* array e.n is aligned */
24 struct test1 tmp1;
26 __attribute__ ((noinline))
27 int main1 ()
29 int i,j;
31 /* 1. unaligned */
32 for (i = 0; i < N; i++)
34 tmp1.a.n[1][2][i] = 5;
37 /* check results: */
38 #pragma GCC novector
39 for (i = 0; i <N; i++)
41 if (tmp1.a.n[1][2][i] != 5)
42 abort ();
45 /* 2. aligned */
46 for (i = 3; i < N-1; i++)
48 tmp1.a.n[1][2][i] = 6;
51 /* check results: */
52 #pragma GCC novector
53 for (i = 3; i < N-1; i++)
55 if (tmp1.a.n[1][2][i] != 6)
56 abort ();
59 /* 3. aligned */
60 for (i = 0; i < N; i++)
62 tmp1.e.n[1][2][i] = 7;
65 /* check results: */
66 #pragma GCC novector
67 for (i = 0; i < N; i++)
69 if (tmp1.e.n[1][2][i] != 7)
70 abort ();
73 /* 4. unaligned */
74 for (i = 3; i < N-3; i++)
76 tmp1.e.n[1][2][i] = 8;
79 /* check results: */
80 #pragma GCC novector
81 for (i = 3; i <N-3; i++)
83 if (tmp1.e.n[1][2][i] != 8)
84 abort ();
87 return 0;
90 int main (void)
92 check_vect ();
94 return main1 ();
97 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
98 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
99 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
100 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */