| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details -fdisable-tree-cunroll -fdisable-tree-cunrolli" } */ |
| 3 |
|
| 4 |
typedef int mad_fixed_t; |
| 5 |
struct mad_pcm |
| 6 |
{ |
| 7 |
unsigned int samplerate; |
| 8 |
unsigned short channels; |
| 9 |
unsigned short length; |
| 10 |
mad_fixed_t samples[2][1152]; |
| 11 |
}; |
| 12 |
struct mad_synth |
| 13 |
{ |
| 14 |
mad_fixed_t filter[2][2][2][16][8]; |
| 15 |
unsigned int phase; |
| 16 |
struct mad_pcm pcm; |
| 17 |
}; |
| 18 |
void mad_synth_mute (struct mad_synth *synth); |
| 19 |
void |
| 20 |
mad_synth_mute (struct mad_synth *synth) |
| 21 |
{ |
| 22 |
unsigned int ch; |
| 23 |
unsigned int s; |
| 24 |
unsigned int v; |
| 25 |
|
| 26 |
ch = 0U; |
| 27 |
while (ch < 2U) |
| 28 |
{ |
| 29 |
s = 0U; |
| 30 |
while (s < 16U) |
| 31 |
{ |
| 32 |
v = 0U; |
| 33 |
while (v < 8U) |
| 34 |
{ |
| 35 |
synth->filter[ch][1][1][s][v] = 0; |
| 36 |
synth->filter[ch][1][0][s][v] = 0; |
| 37 |
synth->filter[ch][0][1][s][v] = 0; |
| 38 |
synth->filter[ch][0][0][s][v] = 0; |
| 39 |
v++; |
| 40 |
} |
| 41 |
s++; |
| 42 |
} |
| 43 |
ch++; |
| 44 |
} |
| 45 |
return; |
| 46 |
} |
| 47 |
|
| 48 |
/* { dg-final { scan-tree-dump "Loop nest . distributed: split to 0 loops and 1 library calls" "ldist" } } */ |
| 49 |
/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */ |