This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More ARM pattern merging


On Mon, 2010-08-02 at 12:38 +0200, Bernd Schmidt wrote:

> There was a problem with reload_cse_regs.  Since arith_shiftsi can take
> the same form as mulsi3_addsi, when reload_cse_regs tries to replace a
> constant operand with a register, arith_shiftsi no longer matches, but
> the mla does, so the replacement is validated.  Effect of this patch:
> 
>         mov     r2, #4
> -       mla     r1, r5, r2, r0
> +       add     r1, r0, r5, asl #2
> 
> Just guessing, but probably mla is a more expensive operation?

Yes, mla is definitely more expensive than the add with shift.


cheers
Ramana


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]