------- 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