summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 602f2e7e328..c6b21eb1b69 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-04 Joseph Myers <joseph@codesourcery.com>
+
+ * config/rs6000/rs6000.c (rs6000_rtx_costs): Make adjustment for
+ MULT inside MINUS as either argument. Use rs6000_cost->dmul -
+ rs6000_cost->fp not 0 as adjustment for outer NEG.
+
2007-01-04 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_release_function_body): New function.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 15f263ab016..7ef7551764f 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -19738,11 +19738,12 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total)
case MINUS:
if (mode == DFmode)
{
- if (GET_CODE (XEXP (x, 0)) == MULT)
+ if (GET_CODE (XEXP (x, 0)) == MULT
+ || GET_CODE (XEXP (x, 1)) == MULT)
{
/* FNMA accounted in outer NEG. */
if (outer_code == NEG)
- *total = 0;
+ *total = rs6000_cost->dmul - rs6000_cost->fp;
else
*total = rs6000_cost->dmul;
}