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 tree-optimization/23821] [4.3/4.4/4.5 Regression] DOM and VRP creating harder to optimize code



------- Comment #24 from rguenth at gcc dot gnu dot org  2009-09-23 15:23 -------
A simple band-aid for DOM is IMHO ok here, sth like:

Index: tree-ssa-dom.c
===================================================================
--- tree-ssa-dom.c      (revision 152059)
+++ tree-ssa-dom.c      (working copy)
@@ -2031,6 +2031,12 @@ cprop_operand (gimple stmt, use_operand_
       if (loop_depth_of_name (val) > loop_depth_of_name (op))
        return false;

+      /* Do not propagate copies into simple IV increment statements.
+         See PR23821 for how this can disturb IV analysis.  */
+      if (TREE_CODE (val) != INTEGER_CST
+         && simple_iv_increment_p (stmt))
+       return false;
+
       /* Dump details.  */
       if (dump_file && (dump_flags & TDF_DETAILS))
        {


the patch from comment #11 is also ok, randomly propagating one or the
other operand doesn't sound useful.  I will throw both patches to
performance testing.


-- 


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


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