http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418
--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> --- basic_block bbb = gimple_bb (SSA_NAME_DEF_STMT (oea->op)); in the patch contains a pasto, which I guess can explain most if not all the -fcompare-debug failures. That said, thinking more about it, there still could be -fcompare-debug differences, because debug stmts also get uids and sometimes when inserting stmts the previous stmt uid is used, sometimes next stmt uid, so we probably should use reassoc_stmt_dominates_stmt_p.