OSDN Git Service

gcc/
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Mar 2010 18:41:22 +0000 (18:41 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:13:40 +0000 (14:13 +0900)
PR target/40697
* optabs.c (avoid_expensive_constant): Use rtx_cost to find out
the cost of loading the constant rather than assuming
COSTS_N_INSNS (1).
* config/arm/arm.c (thumb1_rtx_costs) <case CONST_INT>: If the
outer code is AND, do the same tests as the andsi3 expander and
return COSTS_N_INSNS (1) if and is cheap.

testsuite/
PR target/40697
* gcc.target/arm/thumb-andsi.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157582 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/thumb-andsi.c

index 8ca2f79..020cbaf 100644 (file)
@@ -4,6 +4,14 @@
        * ira-lives.c (check_and_make_def_conflict): Ignore conflict for a
        use that may match DEF.
 
+       PR target/40697
+       * optabs.c (avoid_expensive_constant): Use rtx_cost to find out
+       the cost of loading the constant rather than assuming
+       COSTS_N_INSNS (1).
+       * config/arm/arm.c (thumb1_rtx_costs) <case CONST_INT>: If the
+       outer code is AND, do the same tests as the andsi3 expander and
+       return COSTS_N_INSNS (1) if and is cheap.
+       
 2010-03-19  Michael Matz  <matz@suse.de>
 
        PR c++/43116
index cf5873b..7cc8714 100644 (file)
@@ -1390,7 +1390,6 @@ avoid_expensive_constant (enum machine_mode mode, optab binoptab,
                          rtx x, bool unsignedp)
 {
   bool speed = optimize_insn_for_speed_p ();
-
   if (mode != VOIDmode
       && optimize
       && CONSTANT_P (x)
index 026f927..83b5c4a 100644 (file)
@@ -2,7 +2,10 @@
 
        PR rtl-optimization/42258
        * gcc.target/arm/thumb1-mul-moves.c: New test.
-       
+
+       PR target/40697
+       * gcc.target/arm/thumb-andsi.c: New test.
+
 2010-03-19  Michael Matz  <matz@suse.de>
 
        PR c++/43116
index 992d437..9e8e4d4 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mthumb -Os" }  */
-/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-options "-Os -mthumb -march=armv5te" } */
 
 unsigned get_least_bits(unsigned value)
 {