diff mbox

Fix PR77916

Message ID 1476798026.14125.7.camel@oc8801110288.ibm.com
State New
Headers show

Commit Message

Bill Schmidt Oct. 18, 2016, 1:40 p.m. UTC
Hi,

The previous solution for PR77916 was inadequately tested, for which I
sincerely apologize.  I've reinstated the stopgap fix previously
reverted, as follows.

Thanks for your patience,
Bill


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.
diff mbox

Patch

Index: gcc/gimple-ssa-strength-reduction.c
===================================================================
--- gcc/gimple-ssa-strength-reduction.c	(revision 241302)
+++ gcc/gimple-ssa-strength-reduction.c	(working copy)
@@ -2825,6 +2825,10 @@  analyze_increments (slsr_cand_t first_dep, machine
 		   && !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