This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Workarounds for issues with rs6000_rtx_costs
- From: Roger Sayle <roger at eyesopen dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 22:13:38 -0600 (MDT)
- Subject: Re: Workarounds for issues with rs6000_rtx_costs
On Tue, 29 Jun 2004, David Edelsohn wrote:
> I would prefer if rs6000_rtx_costs were updated with the second
> option: providing a cost for MINUS that matches PLUS cost behavior as
> an interim solution.
The following patch has been tested on powerpc-apple-darwin7.4.0 with a
full "make bootstrap", all default languages, and regression tested with
a top-level "make -k check" with no new failures. I've also bootstrapped
this patch with my patch to combine, and confirmed that ppc-fmadd-1.c
PASSes without problems with both patches applied.
Ok for mainline?
2004-06-29 Roger Sayle <roger@eyesopen.com>
* config/rs6000/rs6000.c (rs6000_rtx_costs) <MINUS_EXPR>: Handle
subtractions identically to additions, always COSTS_N_INSNS (1).
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.653
diff -c -3 -p -r1.653 rs6000.c
*** config/rs6000/rs6000.c 23 Jun 2004 21:18:57 -0000 1.653
--- config/rs6000/rs6000.c 29 Jun 2004 20:35:56 -0000
*************** rs6000_rtx_costs (rtx x, int code, int o
*** 16157,16162 ****
--- 16157,16166 ----
: COSTS_N_INSNS (1));
return true;
+ case MINUS:
+ *total = COSTS_N_INSNS (1);
+ return true;
+
case AND:
case IOR:
case XOR:
Roger
--