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 01:08:20 +0000 (01:08 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 13 Oct 2016 01:08:20 +0000 (01:08 +0000)
2016-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/77937
* gimple-ssa-strength-reduction.c (analyze_increments): Use
POINTER_TYPE_P on the candidate type to determine whether
candidates in this chain require pointer arithmetic.

From-SVN: r241082

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

index 12a324cc1f341eaa58fb7e7522f191f5577b83aa..600700a39450dd4e174b88f8cfcd001916012b1c 100644 (file)
@@ -1,3 +1,10 @@
+2016-10-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR tree-optimization/77937
+       * gimple-ssa-strength-reduction.c (analyze_increments): Use
+       POINTER_TYPE_P on the candidate type to determine whether
+       candidates in this chain require pointer arithmetic.
+
 2016-10-12  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/visium/visium.c (visium_gimplify_va_arg): Emit a big-endian
index b1a6602ef0248aea7cacca39edd78cce1c9cf76e..cfa50d34ad002b3f48d0a3eb5eb6799dafba2648 100644 (file)
@@ -2816,8 +2816,7 @@ analyze_increments (slsr_cand_t first_dep, machine_mode mode, bool speed)
       else if (incr == 0
               || incr == 1
               || (incr == -1
-                  && (gimple_assign_rhs_code (first_dep->cand_stmt)
-                      != POINTER_PLUS_EXPR)))
+                  && !POINTER_TYPE_P (first_dep->cand_type)))
        incr_vec[i].cost = COST_NEUTRAL;
       
       /* FORNOW: If we need to add an initializer, give up if a cast from