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: [PATCH, ARM/Thumb1] Adjust rtx cost to prevent expanding MULT into shift/add instructions


On 24/07/13 03:36, Terry Guo wrote:
Hi there,

This patch intends to update thumb1_size_rtx_costs function to correctly
handle those RTXs defined by RTL expansion pass. Thus the GIMPLE
multiplication will be expanded to single mul instruction instead of a bunch
of shift/add/sub instructions which are in fact more expensive.

Tested with GCC regression test on QEMU ARM926, no regression. Is it OK to
trunk and 4.8 branch?

BR,
Terry


gcc/ChangeLog:
2013-07-24  Terry Guo  <terry.guo@arm.com>

         * config/arm/arm.c (thumb1_size_rtx_costs): Assign proper cost for
         shift_add/shift_sub0/shift_sub1 RTXs.

gcc/testsuite/ChangeLog:
2013-07-24  Terry Guo  <terry.guo@arm.com>

         * gcc.target/arm/thumb1-Os-mult.c: New test case.



OK.

I'll note for the record, though, that that function needs a major rewrite...

R.



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