2011-05-19 Tom de Vries <tom@codesourcery.com>
PR target/45098
* tree-ssa-loop-ivopts.c (determine_iv_cost): Prevent
cost_base.cost == 0.
From-SVN: r173893
+2011-05-19 Tom de Vries <tom@codesourcery.com>
+
+ PR target/45098
+ * tree-ssa-loop-ivopts.c (determine_iv_cost): Prevent
+ cost_base.cost == 0.
+
2011-05-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/49002
base = cand->iv->base;
cost_base = force_var_cost (data, base, NULL);
+ /* It will be exceptional that the iv register happens to be initialized with
+ the proper value at no cost. In general, there will at least be a regcopy
+ or a const set. */
+ if (cost_base.cost == 0)
+ cost_base.cost = COSTS_N_INSNS (1);
cost_step = add_cost (TYPE_MODE (TREE_TYPE (base)), data->speed);
cost = cost_step + adjust_setup_cost (data, cost_base.cost);