gcc.dg/tree-ssa/predcom* test regressions

Bug #602285 reported by Andrew Stubbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Low
Unassigned

Bug Description

Linaro GCC has some test regressions vs. FSF GCC:

+FAIL: gcc.dg/tree-ssa/predcom-3.c scan-tree-dump-times pcom "Unrolling 3 times." 1
+FAIL: gcc.dg/tree-ssa/predcom-4.c scan-tree-dump-times pcom "Unrolling 3 times." 1
+FAIL: gcc.dg/tree-ssa/predcom-5.c scan-tree-dump-times pcom "Unrolling 3 times." 1

The tests need to be built with --param=max-unroll-times=8

However, a bug in the compile driver blocks that. This can be worked around by specifying -funroll-loops explicitly.

[CodeSourcery internal ID #5157]

Tags: testsuite

Related branches

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

This affects the ARMel toolchain only

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

This bug is caused by this piece of code, which restricts unroll times. However, in these failed cases, unroll number should be at least 3.

config/arm/arm.c:
 1885 if (flag_unroll_loops == 2)
 1886 {
 1887 if (optimize == 2)
 1888 {
 1889 flag_unroll_loops = 1;
 1890 if (!PARAM_SET_P (PARAM_MAX_UNROLL_TIMES))
 1891 set_param_value ("max-unroll-times", 2);
 1892 }
 1893 else if (optimize > 2)
 1894 {
 1895 flag_unroll_loops = 1;
 1896 if (!PARAM_SET_P (PARAM_MAX_UNROLL_TIMES))
 1897 set_param_value ("max-unroll-times", 4);
 1898 }
 1899 else
 1900 flag_unroll_loops = 0;
 1901 }

There are two options to fix this issue,
1. Change 2 -> 3 in line 1891: set_param_value ("max-unroll-times", 3);
2. Define macro DRIVER_SELF_SPECS in gcc/config/arm/arm.h like this,
#define DRIVER_SELF_SPECS "%{!fno-unroll-loops:%{!funroll-loops: \
   -funroll-loops --param max-unroll-times=3}}

I've tested these two options separately, and see failures go away. Let me know which one do you prefer? or other thoughts to fix this bug are welcome also.

Michael Hope (michaelh1)
tags: added: testsuite
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: New → Confirmed
Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Committed in rev93553

Changed in gcc-linaro:
status: Confirmed → Fix Committed
Revision history for this message
Yao Qi (yao-codesourcery) wrote :
Changed in gcc-linaro:
status: Fix Committed → Fix Released
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.