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

[Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-09-15 21:25 -------
Looks like http://www.nabble.com/-patch--Fix-nonsensical-exit-test-replacement-
td8289646.html caused the IV-opts difference.

The problem here is that the two costs are the same as we go for the
original one but we really should use elimination one as it will
provide for better optimizations later on.
The patch:
Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c      (revision 2825)
+++ tree-ssa-loop-ivopts.c      (working copy)
@@ -3814,8 +3814,8 @@
   fd_ivopts_data = data;
   walk_tree (&cmp_iv->base, find_depends, &depends_on_express, NULL);

-  /* Choose the better approach.  */
-  if (compare_costs (elim_cost, express_cost) < 0)
+  /* Choose the better approach, preferring the eliminating one.  */
+  if (compare_costs (elim_cost, express_cost) <= 0)
     {
       cost = elim_cost;
       depends_on = depends_on_elim;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263


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