diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2016-10-13 15:34:22 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2016-10-13 15:34:22 +0000 |
commit | 2d4035dcd7b0be8a9edefb9af8121ae0eaabaa7c (patch) | |
tree | 38c4fd2638c17f9652e395bc39302aed39fd44fd /gcc | |
parent | 58f7dab40db417ab669a0a1e146aa6e3227e3989 (diff) | |
download | gcc-2d4035dcd7b0be8a9edefb9af8121ae0eaabaa7c.zip gcc-2d4035dcd7b0be8a9edefb9af8121ae0eaabaa7c.tar.gz gcc-2d4035dcd7b0be8a9edefb9af8121ae0eaabaa7c.tar.bz2 |
re PR tree-optimization/77937 (ICE: in replace_one_candidate, at gimple-ssa-strength-reduction.c:3370)
2016-10-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/77937
* gimple-ssa-strength-reduction.c (analyze_increments): Set cost
to infinite when we have a pointer with an increment of -1.
From-SVN: r241125
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dfd16fe..7362986 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-10-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR tree-optimization/77937 + * gimple-ssa-strength-reduction.c (analyze_increments): Set cost + to infinite when we have a pointer with an increment of -1. + 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index cfa50d34..72862f8 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2818,6 +2818,11 @@ analyze_increments (slsr_cand_t first_dep, machine_mode mode, bool speed) || (incr == -1 && !POINTER_TYPE_P (first_dep->cand_type))) incr_vec[i].cost = COST_NEUTRAL; + + /* FIXME: We don't handle pointers with a -1 increment yet. + They are usually unprofitable anyway. */ + else if (incr == -1 && POINTER_TYPE_P (first_dep->cand_type)) + incr_vec[i].cost = COST_INFINITE; /* FORNOW: If we need to add an initializer, give up if a cast from the candidate's type to its stride's type can lose precision. |