This is the mail archive of the 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]
Other format: [Raw text]

Re: [Committed] ifcvt.c solution to PR9814

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)).


> ! 		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.


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