2 /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */
3 /* { dg-require-effective-target size20plus } */
4 /* { dg-skip-if "too big data segment" { visium-*-* } } */
7 int a
[M
][M
], b
[M
][M
], c
[M
], d
[M
];
8 void __attribute__((noinline
))
11 for (int j
= 0; j
< n
; j
++)
14 for (int i
= 0; i
< n
; i
++)
15 sum
= sum
+ a
[i
][j
]*b
[i
][j
];
21 void __attribute__((noinline
))
22 simple_reduc_2 (int n
)
24 for (int j
= 0; j
< n
; j
++)
27 for (int i
= 0; i
< n
; i
++)
28 sum
= sum
+ a
[i
][j
]*b
[i
][j
];
30 asm volatile ("" ::: "memory");
37 static void __attribute__((noinline
))
42 for (int j
= 0; j
< M
; j
++)
51 for (int i
= 0; i
< M
; ++i
)
57 for (int i
= 0; i
< M
; ++i
)
64 /* { dg-final { scan-tree-dump-times "Loop_pair<outer:., inner:.> is interchanged" 1 "linterchange" } } */