This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] ifcvt.c solution to PR9814
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 May 2005 14:46:21 -0700
- Subject: Re: [Committed] ifcvt.c solution to PR9814
- References: <Pine.LNX.4.44.0505262005030.20088-100000@www.eyesopen.com>
I have two problems with this patch. First,
> ! insn = emit_move_insn (x, y);
Passing IOR as a RHS argument to emit_move_insn is wrong. This
function does not handle arbitrary expressions, only "operands".
Think of that as general_operand, only with memories with invalid
addresses and invalid constants.
If you want to emit a set and check to see if it's recognizable,
then do that, i.e. emit_insn (gen_rtx_SET (VOIDmode, x, y)).
Second,
> ! start_sequence ();
> ! target = expand_unop (GET_MODE (y), ot, XEXP (y, 0), x, 0);
> ! if (target != NULL_RTX)
> ! {
> ! if (target != x)
> ! emit_move_insn (x, target);
> ! seq = get_insns ();
> ! }
> ! end_sequence ();
I see no attempt to verify that we didn't add clobbers of registers
heretofore unseen in the narrow window in which we've been looking.
What if there were some other reason the bare SET is not recognizable,
but the FLAGS register is in fact live?
I *really* think you need to verify that the new sequence does not
clobber any register that is live across this location.
r~