re PR tree-optimization/77916 (ICE in verify_gimple_in_cfg: invalid (pointer) operand...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 18 Oct 2016 13:35:19 +0000 (13:35 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Tue, 18 Oct 2016 13:35:19 +0000 (13:35 +0000)
2016-10-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/77916
* gimple-ssa-strength-reduction.c (analyze_increments): Reinstate
stopgap fix, as pointers with -1 increment are still broken.

From-SVN: r241305

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

index bd4435a4b37790cfde93936804fb4de57e656969..2ce7f479a0971bc6dac24491bfba6ab21915dfae 100644 (file)
@@ -1,3 +1,9 @@
+2016-10-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR tree-optimization/77916
+       * gimple-ssa-strength-reduction.c (analyze_increments): Reinstate
+       stopgap fix, as pointers with -1 increment are still broken.
+
 2016-10-18  David Edelsohn  <dje.gcc@gmail.com>
 
        * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage
index c6bc5a26ea692f2d232564cb316bc61f1125cbd6..45698d25cc1bd4fa1956449fb4b3dcc55ea37762 100644 (file)
@@ -2825,6 +2825,10 @@ analyze_increments (slsr_cand_t first_dep, machine_mode mode, bool speed)
                   && !POINTER_TYPE_P (first_dep->cand_type)))
        incr_vec[i].cost = COST_NEUTRAL;
 
+      /* FIXME: Still having trouble with pointers with a -1 increment.  */
+      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 could eventually be handled better by expressly retaining the