This is the mail archive of the 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]

[patch] target/21927

This was a warning that didn't make a whole lot of sense to me when I
saw it before, but I hadn't been convinced I'd put it in on my target.
Apparently I had when I decided that BRANCH_COST should be unsigned on
my target :)

I don't see the point of a negative branch cost on any target,
especially when the doc says that the default is 1 and everything is
based relative to that. I mean, you may want zero to make it cheaper
than anything else, but negative just seems ridiculous.

Tested by building cc1 for mipsisa64-elf. Bootstrap in process.



2005-06-05  Eric Christopher  <>

	* expr.c (do_store_flag): Remove check for non-negative BRANCH_COST.

Index: expr.c
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.792
diff -u -p -w -r1.792 expr.c
--- expr.c	4 Jun 2005 17:22:17 -0000	1.792
+++ expr.c	6 Jun 2005 05:11:53 -0000
@@ -8729,8 +8729,7 @@ do_store_flag (tree exp, rtx target, enu
       if ((code == LT && integer_zerop (arg1))
 	  || (! only_cheap && code == GE && integer_zerop (arg1)))
-      else if (BRANCH_COST >= 0
-	       && ! only_cheap && (code == NE || code == EQ)
+      else if (! only_cheap && (code == NE || code == EQ)
 	       && TREE_CODE (type) != REAL_TYPE
 	       && ((abs_optab->handlers[(int) operand_mode].insn_code
 		    != CODE_FOR_nothing)

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