Hi, > On 05/18/2011 11:20 PM, Zdenek Dvorak wrote: > >> + sa_cost = (TREE_CODE (expr) != MINUS_EXPR > >> + ? shiftadd_cost[speed][mode][m] > >> + : (mult == op1 > >> + ? shiftsub1_cost[speed][mode][m] > >> + : shiftsub0_cost[speed][mode][m])); > >> + res = new_cost (sa_cost, 0); > >> + res = add_costs (res, mult == op1 ? cost0 : cost1); > > > > just forgetting the cost of the other operand does not seem correct -- what > > if it contains some more complicated subexpression? > > > > True. I now added the cost of TREE_OPERAND (mult, 0).
OK, Zdenek