2016-10-19 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/77916
PR tree-optimization/77937
* gimple-ssa-strength-reduction.c (analyze_increments): Remove
stopgap fix.
(insert_initializers): Requirement of initializer for -1 should be
based on pointer-typedness of the candidate basis.
From-SVN: r241342
+2016-10-19 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/77916
+ PR tree-optimization/77937
+ * gimple-ssa-strength-reduction.c (analyze_increments): Remove
+ stopgap fix.
+ (insert_initializers): Requirement of initializer for -1 should be
+ based on pointer-typedness of the candidate basis.
+
2016-10-19 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/78005
&& !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
if (!profitable_increment_p (i)
|| incr == 1
|| (incr == -1
- && gimple_assign_rhs_code (c->cand_stmt) != POINTER_PLUS_EXPR)
+ && (!POINTER_TYPE_P (lookup_cand (c->basis)->cand_type)))
|| incr == 0)
continue;