https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66997
Bug ID: 66997 Summary: outer loop reduction fails to parallelize with graphite Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- When running autopar.exp with --target_board=unix/-ffast-math/-floop-parallelize-all, we run into: ... FAIL: gcc.dg/autopar/uns-outer-6.c scan-tree-dump-times optimized "loopfn" 4 FAIL: gcc.dg/autopar/uns-outer-6.c scan-tree-dump-times parloops "parallelizing outer loop" 1 ... [ We can drop -ffast-math once https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01863.html has been committed. ] relevant function in uns-outer-6.c: ... void __attribute__((noinline)) parloop (int N) { int i, j; unsigned int sum; /* Outer loop reduction, outerloop is parallelized. */ sum=0; for (i = 0; i < N; i++) { for (j = 0; j < N; j++) y[i]=x[i][j]; sum += y[i]; } g_sum = sum; } ... we find in the parloops dump: ... Trying loop 3 as candidate loop 3 is not innermost loop is not parallel according to graphite ...