diff mbox

[PATCH/AARCH64] Improve cost of arithmetic instructions with shift/extend on ThunderX2T99

Message ID CA+=Sn1nwkjwmU1YVWeZAy2XCvCogSYDcqcr=13tJkU53hFyWbA@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski June 23, 2017, 5:59 p.m. UTC
Hi,
  This patch is similar to what I did for ThunderX where I increase
the costs of these instructions slightly to point out there is a
slight cost to using them over using the two instructions.

OK?  Bootstrapped and tested on aarch64-linux-gnu with no regressions.
This gave ~2% on SPEC CPU 2006 int.

Thanks,
Andrew Pinski

ChangeLog:
* config/aarch64/aarch64-cost-tables.h (thunderx2t99_extra_costs):
Increment Arith_shift, Arith_shift_reg, Log_shift, Log_shift_reg and
Extend_arith by 1.
diff mbox

Patch

Index: gcc/config/aarch64/aarch64-cost-tables.h
===================================================================
--- gcc/config/aarch64/aarch64-cost-tables.h	(revision 249583)
+++ gcc/config/aarch64/aarch64-cost-tables.h	(working copy)
@@ -239,12 +239,12 @@ 
     0,			/* Logical.  */
     0,			/* Shift.  */
     0,			/* Shift_reg.  */
-    COSTS_N_INSNS (1),	/* Arith_shift.  */
-    COSTS_N_INSNS (1),	/* Arith_shift_reg.  */
-    COSTS_N_INSNS (1),	/* Log_shift.  */
-    COSTS_N_INSNS (1),	/* Log_shift_reg.  */
+    COSTS_N_INSNS (1)+1,	/* Arith_shift.  */
+    COSTS_N_INSNS (1)+1,	/* Arith_shift_reg.  */
+    COSTS_N_INSNS (1)+1,	/* Log_shift.  */
+    COSTS_N_INSNS (1)+1,	/* Log_shift_reg.  */
     0,			/* Extend.  */
-    COSTS_N_INSNS (1),	/* Extend_arith.  */
+    COSTS_N_INSNS (1)+1,	/* Extend_arith.  */
     0,			/* Bfi.  */
     0,			/* Bfx.  */
     COSTS_N_INSNS (3),	/* Clz.  */