]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/77937 (ICE: in replace_one_candidate, at gimple-ssa-strength...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 13 Oct 2016 15:34:22 +0000 (15:34 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 13 Oct 2016 15:34:22 +0000 (15:34 +0000)
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

gcc/ChangeLog
gcc/gimple-ssa-strength-reduction.c

index dfd16fe0763ee976664302089018a0e04c8ce19f..7362986db73b4737a4dc1cacf846ee09724fc580 100644 (file)
@@ -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
index cfa50d34ad002b3f48d0a3eb5eb6799dafba2648..72862f851442a19e68f2578b1e7a3633ce657114 100644 (file)
@@ -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.
This page took 0.103601 seconds and 5 git commands to generate.