aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2014-01-10 11:48:37 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2014-01-10 11:48:37 +0000
commit5619162cdb418ba81d385e502e0d70e8d061cb31 (patch)
tree2ad13d383da016f9b79480c642b1d3f61eb78dd2
parent2d17b99fe35239b2db77533ecd89ab4687ac5799 (diff)
downloadgcc-5619162cdb418ba81d385e502e0d70e8d061cb31.zip
gcc-5619162cdb418ba81d385e502e0d70e8d061cb31.tar.gz
gcc-5619162cdb418ba81d385e502e0d70e8d061cb31.tar.bz2
arm.c (arm_new_rtx_costs): Use destination mode when handling a SET rtx.
2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * config/arm/arm.c (arm_new_rtx_costs): Use destination mode when handling a SET rtx. From-SVN: r206521
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arm/arm.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24cb3b8..b6f8089 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+ * config/arm/arm.c (arm_new_rtx_costs): Use destination mode
+ when handling a SET rtx.
+
+2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
* config/arm/arm-cores.def (cortex-a53): Specify FL_CRC32.
(cortex-a57): Likewise.
(cortex-a57.cortex-a53): Likewise. Remove redundant flags.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 842d67f..18196b3 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -9092,6 +9092,9 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
{
case SET:
*cost = 0;
+ /* SET RTXs don't have a mode so we get it from the destination. */
+ mode = GET_MODE (SET_DEST (x));
+
if (REG_P (SET_SRC (x))
&& REG_P (SET_DEST (x)))
{
@@ -9106,6 +9109,8 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
in 16 bits in Thumb mode. */
if (!speed_p && TARGET_THUMB && outer_code == COND_EXEC)
*cost >>= 1;
+
+ return true;
}
if (CONST_INT_P (SET_SRC (x)))
@@ -9113,7 +9118,6 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
/* Handle CONST_INT here, since the value doesn't have a mode
and we would otherwise be unable to work out the true cost. */
*cost = rtx_cost (SET_DEST (x), SET, 0, speed_p);
- mode = GET_MODE (SET_DEST (x));
outer_code = SET;
/* Slightly lower the cost of setting a core reg to a constant.
This helps break up chains and allows for better scheduling. */