gcc.dg/autopar test regressions

Bug #602190 reported by Andrew Stubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Won't Fix
Low
Unassigned

Bug Description

Linaro GCC has some test regressions vs. FSF:

armel only:

+FAIL: gcc.dg/autopar/reduc-1.c scan-tree-dump-times parloops "Detected reduction" 3
+FAIL: gcc.dg/autopar/reduc-1.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 3
+FAIL: gcc.dg/autopar/reduc-1char.c scan-tree-dump-times parloops "Detected reduction" 3
+FAIL: gcc.dg/autopar/reduc-1char.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 3
+FAIL: gcc.dg/autopar/reduc-1short.c scan-tree-dump-times parloops "Detected reduction" 3
+FAIL: gcc.dg/autopar/reduc-1short.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 3
+FAIL: gcc.dg/autopar/reduc-2.c scan-tree-dump-times parloops "Detected reduction" 3
+FAIL: gcc.dg/autopar/reduc-2.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 3
+FAIL: gcc.dg/autopar/reduc-2char.c scan-tree-dump-times parloops "Detected reduction" 2
+FAIL: gcc.dg/autopar/reduc-2char.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 2
+FAIL: gcc.dg/autopar/reduc-2short.c scan-tree-dump-times parloops "Detected reduction" 2
+FAIL: gcc.dg/autopar/reduc-2short.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 2
+FAIL: gcc.dg/autopar/reduc-6.c scan-tree-dump-times parloops "FAILED: it is not a part of reduction" 3

[CodeSourcery internal ID: #6663]

Loïc Minier (lool)
Changed in gcc-linaro:
importance: Undecided → Low
Revision history for this message
Yao Qi (yao-codesourcery) wrote :

This problem is caused by 'cunroll pass unrolls the loops so that parloops pass has no loop to parallelize'.

Tree dump of cunroll show the difference,
on FSF GCC 4.4 trunk (built as arm-unknown-linux-gnueabi),
Loop 1 iterates 15 times.
  Loop size: 7
  Estimated size after unrolling: 32
Not unrolling loop 1. <<----

on linaro GCC (build as arm-unknown-linux-gnueabi)
Loop 1 iterates 15 times.
  Loop size: 7
  Estimated size after unrolling: 32
Removing basic block 48 <<---

The flag of cunroll is set in tree-ssa-loop.c:tree_complete_unroll(),

 return tree_unroll_loops_completely (flag_unroll_loops
           || flag_peel_loops
           || optimize >= 3, true);

on FSF GCC 4.4, flag_unroll_loops is 0, however in linaro gcc, flag_unroll_loops != 0. flag_unroll_loops is set to a non-zero value in gcc/config/arm/arm.c: arm_optimization_options() and arm_override_options().

That is reason why there is no such problem when linaro gcc is built natively on x86. Looks like root cause is found, but have to figure out how to fix it in a reasonable way.

Michael Hope (michaelh1)
tags: added: testsuite
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: New → Confirmed
Michael Hope (michaelh1)
tags: added: regression
Revision history for this message
Viktor (vchong) wrote :

GCC version no longer supported.

Changed in gcc-linaro:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.