* m68k.h (CONST_COSTS): Lower cost of 0.0 when used inside a
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Mar 2002 19:25:13 +0000 (19:25 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Mar 2002 19:25:13 +0000 (19:25 +0000)
        COMPARE operator.

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

gcc/ChangeLog
gcc/config/m68k/m68k.h

index 778b934..ff9a8dc 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar  6 12:27:10 2002  Jeffrey A Law  (law@redhat.com)
+
+       * m68k.h (CONST_COSTS): Lower cost of 0.0 when used inside a
+       COMPARE operator.
+       
 2002-03-06  Phil Edwards  <pme@gcc.gnu.org>
 
        * version.c:  Fix misplaced leading blanks on first line.
index 1f21ba9..9d89fe7 100644 (file)
@@ -1555,6 +1555,12 @@ __transfer_from_trampoline ()                                    \
   case SYMBOL_REF:                                             \
     return 3;                                                  \
   case CONST_DOUBLE:                                           \
+    /* Make 0.0 cheaper than other floating constants to       \
+       encourage creating tstsf and tstdf insns.  */           \
+    if ((OUTER_CODE) == COMPARE                                        \
+        && ((RTX) == CONST0_RTX (SFmode)                       \
+           || (RTX) == CONST0_RTX (DFmode)))                   \
+      return 4;                                                        \
     return 5;
 
 /* Compute the cost of various arithmetic operations.