This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] flow.c: Don't call sets_cc0_p if insn is NULL_RTX.
- To: rth at cygnus dot com, gcc-patches at gcc dot gnu dot org, kazu at hxi dot com
- Subject: Re: [patch] flow.c: Don't call sets_cc0_p if insn is NULL_RTX.
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 20 Jul 2001 18:48:57 +0200
> #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