------- Comment #7 from hp at gcc dot gnu dot org  2010-09-09 04:08 -------
Bother, I should have spotted the general area of this bug faster.  It's a
matter of ifcvt.c calling
       emit_insn_before_setloc (seq, if_info->jump,
                               INSN_LOCATOR (if_info->insn_a));
when it should do
      emit_insn_before_setloc (seq, if_info->cond_earliest,
                               INSN_LOCATOR (if_info->insn_a));
(looks like most calls may be wrong)
*and* to handle the case where if_info->cond_earliest (insn 327 above) has
side-effects, since try_redirect_by_replacing_jump (a callee of
redirect_edge_and_branch_force) doesn't remove cc0 setters with side-effects
(while without the if_info->cond_earliest change, it'd see the last of the
emit_store_flag insns instead of the expected cc0 setter).  And last but not
least, decorate the new insn(s) with REG_INC notes as appropriate, as regmove
(the next pass) seems to expect them: note that insn 1223 doesn't have one.


-- 


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

Reply via email to