Hi, all,

The multiplication operation is low cost in nds32 target.
COSTS_N_INSNS(5) is too expensive for performance.
Adjust MULT cost to COSTS_N_INSNS(1).

Committed as Rev. 205478: http://gcc.gnu.org/r205478


Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog       (revision 205477)
+++ gcc/ChangeLog       (working copy)
@@ -1,3 +1,8 @@
+2013-11-28  Chung-Ju Wu  <jasonw...@gmail.com>
+
+       * config/nds32/nds32.c (nds32_rtx_costs): Adjust MULT cost if it is
+       not optimized for size.
+
 2013-11-28  Jakub Jelinek  <ja...@redhat.com>

        * cfgexpand.c (struct stack_vars_data): Add asan_base and asan_alignb

Index: gcc/config/nds32/nds32.c
===================================================================
--- gcc/config/nds32/nds32.c    (revision 205477)
+++ gcc/config/nds32/nds32.c    (working copy)
@@ -2471,7 +2471,7 @@
       break;

     case MULT:
-      *total = COSTS_N_INSNS (5);
+      *total = COSTS_N_INSNS (1);
       break;

     case DIV:


Best regards,
jasonwucj

Reply via email to