]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/40956 (Constants are never candidates for hoisting)
authorMaxim Kuvyrkov <maxim@codesourcery.com>
Tue, 27 Jul 2010 19:46:26 +0000 (19:46 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Tue, 27 Jul 2010 19:46:26 +0000 (19:46 +0000)
PR rtl-optimization/40956
* config/arm/arm.c (thumb1_size_rtx_costs): Fix cost of simple
constants.

From-SVN: r162596

gcc/ChangeLog
gcc/config/arm/arm.c

index 0deef9c056629faf1d58cfb36f19b70a827cada4..9a2804376eccb1d12099016b403be82961fbdee1 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       PR rtl-optimization/40956
+       * config/arm/arm.c (thumb1_size_rtx_costs): Fix cost of simple
+       constants.
+
 2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        PR target/42495
index 1146418fbfd105080dcef172d3ba7f37ed1e7297..9f004167c04a35d0715ed32b8835b0cee1fdcbbc 100644 (file)
@@ -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);