Hi, > 2011-05-05 Tom de Vries <t...@codesourcery.com> > > PR target/45098 > * tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0.
this looks strange. Something like cost = seq_cost (seq, speed); if (MEM_P (rslt)) the current code; else cost += rtx_cost (rslt, SET, speed)); would make more sense to me (if I understand correctly what you are trying to achieve). Zdenek > Index: gcc/tree-ssa-loop-ivopts.c > =================================================================== > --- gcc/tree-ssa-loop-ivopts.c (revision 173380) > +++ gcc/tree-ssa-loop-ivopts.c (working copy) > @@ -2862,7 +2862,9 @@ computation_cost (tree expr, bool speed) > default_rtl_profile (); > node->frequency = real_frequency; > > - cost = seq_cost (seq, speed); > + cost = (seq != NULL_RTX > + ? seq_cost (seq, speed) > + : (unsigned)rtx_cost (rslt, SET, speed)); > if (MEM_P (rslt)) > cost += address_cost (XEXP (rslt, 0), TYPE_MODE (type), > TYPE_ADDR_SPACE (type), speed);