From 9b9ee6d392b6f4f50bacb299e8e1350b1173add8 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 27 Jul 2010 19:46:26 +0000 Subject: [PATCH] re PR rtl-optimization/40956 (Constants are never candidates for hoisting) PR rtl-optimization/40956 * config/arm/arm.c (thumb1_size_rtx_costs): Fix cost of simple constants. From-SVN: r162596 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0deef9c05662..9a2804376ecc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-07-27 Maxim Kuvyrkov + + PR rtl-optimization/40956 + * config/arm/arm.c (thumb1_size_rtx_costs): Fix cost of simple + constants. + 2010-07-27 Maxim Kuvyrkov PR target/42495 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 1146418fbfd1..9f004167c04a 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7013,7 +7013,7 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer) if (outer == SET) { if ((unsigned HOST_WIDE_INT) INTVAL (x) < 256) - return 0; + return COSTS_N_INSNS (1); /* See split "TARGET_THUMB1 && satisfies_constraint_J". */ if (INTVAL (x) >= -255 && INTVAL (x) <= -1) return COSTS_N_INSNS (2); -- 2.47.2