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]

Blackfin patch: Handle UDIV/UMOD in bfin_rtx_costs


A followup to the previous patch; we need to return a high cost for divide operations to make the previously installed test in doloop trigger.

Committed on trunk.


Bernd
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 116966)
+++ ChangeLog	(working copy)
@@ -3,6 +3,7 @@
 	* params.def (PARAM_MAX_ITERATIONS_COMPUTATION_COST): New.
 	* loop-doloop.c (doloop_optimize): Use it to limit costs of
 	expanding the number of iterations.
+	* config/bfin/bfin.c (bfin_rtx_costs): Handle UDIV, UMOD.
 
 2006-09-15  Kazu Hirata  <kazu@codesourcery.com>
 
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 116965)
+++ config/bfin/bfin.c	(working copy)
@@ -2390,6 +2390,11 @@
 	*total = COSTS_N_INSNS (3);
       return false;
 
+    case UDIV:
+    case UMOD:
+      *total = COSTS_N_INSNS (32);
+      return true;
+
     case VEC_CONCAT:
     case VEC_SELECT:
       if (outer_code == SET)

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