This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000_adjust_cost old thinko


> Note this also is wrong on PA and one of the SPARC adjust_cost macros.

Thanks for the heads up, fixed thusly, applied on the mainline


	PR target/28115
	* config/sparc/sparc.c (supersparc_adjust_cost): Fix thinko.
	(sparc_adjust_cost): Add missing space.

-- 
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 231010)
+++ config/sparc/sparc.c	(working copy)
@@ -9353,8 +9353,8 @@ supersparc_adjust_cost (rtx_insn *insn,
 {
   enum attr_type insn_type;
 
-  if (! recog_memoized (insn))
-    return 0;
+  if (recog_memoized (insn) < 0)
+    return cost;
 
   insn_type = get_attr_type (insn);
 
@@ -9487,7 +9487,7 @@ hypersparc_adjust_cost (rtx_insn *insn,
 }
 
 static int
-sparc_adjust_cost(rtx_insn *insn, rtx link, rtx_insn *dep, int cost)
+sparc_adjust_cost (rtx_insn *insn, rtx link, rtx_insn *dep, int cost)
 {
   switch (sparc_cpu)
     {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]