ARM patch: Fix PR 40697

Bernd Schmidt bernds@codesourcery.com
Fri Mar 19 12:47:00 GMT 2010


On 03/19/2010 12:42 PM, Richard Earnshaw wrote:
> 
> On Fri, 2010-03-19 at 12:33 +0100, Bernd Schmidt wrote:
>> On 03/19/2010 11:15 AM, Richard Earnshaw wrote:
>>
>>> +             return COSTS_N_INSNS (1);
>>>
>>> Surely doing the AND with shifts costs two insns, not one.  Could you
>>> also add a comment.
>>
>> Like so?
> 
> Well the comment is fine, but why do we have to lie to the front end to
> get it to do the right thing?  Bosscher has been jumping up and down
> recently because other parts of the ARM back-end aren't giving the true
> costs of things and this would be yet another case.

Looks like we can in fact tweak avoid_expensive_constant to also compute
the cost of the constant for a SET.


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: andsi-c.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100319/46653278/attachment.ksh>


More information about the Gcc-patches mailing list