]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c
2 /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */
4 /* Copied from graphite/interchange-6.c */
14 static int __attribute__((noinline
))
19 /* This loop should be interchanged. */
20 for(j
= 0; j
< M
; j
++)
21 for(i
= 0; i
< N
; i
++)
22 A
[i
][j
] = A
[i
][j
] + A
[i
][j
];
24 return A
[0][0] + A
[N
-1][M
-1];
29 static void __attribute__((noinline
))
30 init (int *arr
, int i
)
34 for (j
= 0; j
< M
; j
++)
44 for (i
= 0; i
< N
; i
++)
50 fprintf (stderr
, "res = %d \n", res
);
59 /* { dg-final { scan-tree-dump-times "Loop_pair<outer:., inner:.> is interchanged" 1 "linterchange"} } */