]>
Commit | Line | Data |
---|---|---|
584d9d58 | 1 | /* { dg-do compile { target size32plus } } */ |
957f0d8f BC |
2 | /* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */ |
3 | ||
4 | #define M (256) | |
5 | #define N (512) | |
6 | ||
7 | struct st | |
8 | { | |
9 | int a[M][N]; | |
10 | int c[M]; | |
11 | int b[M][N]; | |
12 | }; | |
13 | ||
14 | void | |
15 | foo (struct st * restrict p) | |
16 | { | |
17 | for (unsigned i = 0; i < M; ++i) | |
18 | { | |
19 | p->c[i] = 0; | |
20 | for (unsigned j = N; j > 0; --j) | |
21 | { | |
22 | p->b[i][j - 1] = p->a[i][j - 1]; | |
23 | p->a[i][j - 1] = 0; | |
24 | } | |
25 | } | |
26 | } | |
27 | ||
87f46a16 RB |
28 | /* The cost modeling doesn't consider splitting a WAR re-use profitable. */ |
29 | /* { dg-final { scan-tree-dump-times "Loop nest . distributed: split to 1 loops and 1 library" 1 "ldist" } } */ |