------- Comment #8 from sandra at codesourcery dot com  2010-06-10 13:01 -------
I was barking up the wrong tree with my last idea -- the signed/unsigned
conversion business was a red herring.  Here's what I now believe is the
problem: the costs computation is underestimating the register pressure costs
so that we are in fact spilling when the cost computation thinks it still has
"free" registers.

A hack to make get_computation_cost_at add target_reg_cost to the result when
it must use a scratch register seemed to have positive overall effects on code
size (as well as fixing the test case).  But, I don't think that's the real
solution, as I can't come up with a good logical justification for putting such
a cost there.  :-)  estimate_reg_pressure_cost already reserves 3 "free"
registers for such things.  Anyway, I am continuing to poke at this in hopes of
figuring out where the register costs model is really going wrong.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42505

Reply via email to