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

Re: [patch] flow.c: Don't call sets_cc0_p if insn is NULL_RTX.


>   #ifdef HAVE_cc0
>     insn = src->end;
>     if (GET_CODE (insn) == JUMP_INSN)
>       {
> !       if (reg_mentioned_p (cc0_rtx, PATTERN (insn)))
> !       flow_delete_insn (prev_nonnote_insn (insn));
> !     }
> !   else if (sets_cc0_p (insn))
> !     {
> !       src->end = PREV_INSN (insn);
>         flow_delete_insn (insn);
>       }
>   #endif

This won't work IMO, as the function work by first replacing or removing the
jump instruction and then gets to this common cleanup code.  So the jump insn
is always uncodnitional jump, as the original, possibly conditional jump is
already killed.

I would preffer adding the non-NULL check as done by previous patch, at least
thats the patch I was just testing with Roman.

Honza


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