fwprop.c (try_fwprop_subst): Skip profitability check for forward propagation into...
authorPaolo Bonzini <bonzini@gcc.gnu.org>
Thu, 15 Nov 2007 14:45:55 +0000 (14:45 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Thu, 15 Nov 2007 14:45:55 +0000 (14:45 +0000)
2007-11-15  Paolo Bonzini  <bonzini@gnu.org>

* fwprop.c (try_fwprop_subst): Skip profitability check for forward
propagation into an address; that's done in should_replace_address.

From-SVN: r130201

gcc/ChangeLog
gcc/fwprop.c

index d5683b916937e4a9005d56d0c8e41a2bb6ec0d99..95efbfad3f621cf50b4fbc3f6e3bb1aecaeb3d71 100644 (file)
@@ -1,9 +1,14 @@
+2007-11-15  Paolo Bonzini  <bonzini@gnu.org>
+
+       * fwprop.c (try_fwprop_subst): Skip profitability check for forward
+       propagation into an address; that's done in should_replace_address.
+               
 2007-11-15  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/spu/spu-protos.h (legitimate_const): Remove prototype.
        * config/spu/spu.c (legitimate_const): Remove.
        (classify_immediate): Inline call to legitimate_const.
-       (spu_legitimate_address): Likewise.  Allow SMBOL_REF + CONST_INT
+       (spu_legitimate_address): Likewise.  Allow SYMBOL_REF + CONST_INT
        for any constant, not just -512 .. 511.
 
 2007-11-15  Sa Liu  <saliu@de.ibm.com>
index eecd0a0a5dea34936a34ed879bf1aaf87d0c3850..6bc9c674a7657e6598c29f7314fea64b11d3f0f5 100644 (file)
@@ -697,7 +697,8 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_
       ok = false;
     }
 
-  else if (rtx_cost (SET_SRC (set), SET) > old_cost)
+  else if (DF_REF_TYPE (use) == DF_REF_REG_USE
+          && rtx_cost (SET_SRC (set), SET) > old_cost)
     {
       if (dump_file)
        fprintf (dump_file, "Changes to insn %d not profitable\n",