rs6000: Enable limited unrolling at -O2
[official-gcc.git] / gcc / testsuite / gcc.dg / pr59643.c
blob4446f6e6139b2c3c240226073e551c360ed359e3
1 /* PR tree-optimization/59643 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fdump-tree-pcom-details" } */
4 /* { dg-additional-options "--param max-unrolled-insns=400" { target { powerpc*-*-* } } } */
5 /* Implicit threashold of max-unrolled-insn on ppc at O3 is too small for the
6 loop of this case. */
8 void
9 foo (double *a, double *b, double *c, double d, double e, int n)
11 int i;
12 for (i = 1; i < n - 1; i++)
13 a[i] = d * (b[i] + c[i] + a[i - 1] + a[i + 1]) + e * a[i];
16 /* { dg-final { scan-tree-dump-times "Before commoning:" 1 "pcom" } } */
17 /* { dg-final { scan-tree-dump-times "Unrolling 2 times" 1 "pcom" } } */