+2016-03-23 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/69042
+ * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Add IV cand
+ for use with constant offset stripped in base.
+
2016-03-23 Richard Biener <rguenther@suse.de>
PR middle-end/70251
basetype = sizetype;
record_common_cand (data, build_int_cst (basetype, 0), iv->step, use);
- /* Record common candidate with constant offset stripped in base. */
+ /* Record common candidate with constant offset stripped in base.
+ Like the use itself, we also add candidate directly for it. */
+ base = strip_offset (iv->base, &offset);
+ if (offset || base != iv->base)
{
- base = strip_offset (iv->base, &offset);
- if (offset || base != iv->base)
- record_common_cand (data, base, iv->step, use);
+ record_common_cand (data, base, iv->step, use);
+ add_candidate (data, base, iv->step, false, use);
}
/* Record common candidate with base_object removed in base. */