Bad choices by expand_mult_highpart

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Tue Mar 23 13:59:00 GMT 2004


Richard Sandiford wrote:

>     extra_cost = shift_cost[GET_MODE_BITSIZE (mode) - 1];

Here you may be accessing outside the array bounds of shift_cost;
that's why I had the test earlier ...

Apart from this the patch looks OK to me.  Do you have any results
on whether the code gets in fact better?  You avoid the adjustment,
but on the other hand you call synth_mult with an integer with a
lot more 1 bits set; I'm not sure I can easily see which one is
better.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc-patches mailing list