277e371de62cbdec75f6062d4a978bb4b8848f56
[gcc.git] / gcc / testsuite / gcc.dg / torture / pr54894.c
1 /* { dg-do compile } */
2
3 typedef unsigned long long uint64_t;
4
5 #define n 4096
6 double A[n][n] __attribute__((aligned(16)));
7 double B[n][n] __attribute__((aligned(16)));
8 double C[n][n] __attribute__((aligned(16)));
9
10 #define tilesize 128
11
12 typedef double adouble __attribute__((__aligned__(16)));
13
14 void foo ()
15 {
16 int ih, jh, kh, il, kl, jl;
17 for (ih = 0; ih < n; ih += tilesize)
18 for (jh = 0; jh < n; jh += tilesize)
19 for (kh = 0; kh < n; kh += tilesize)
20 for (il = 0; il < tilesize; ++il)
21 {
22 adouble *Ap = (adouble *)&A[ih+il][kh];
23 for (kl = 0; kl < tilesize; ++kl)
24 for (jl = 0; jl < tilesize; ++jl)
25 C[ih+il][jh+jl] += Ap[kl] * B[kh+kl][jh+jl];
26 }
27 }