On Tue, Feb 21, 2017 at 01:02:30PM -0800, Michael Eager wrote:
> >>Why generate an unnecessary NOP?
> >
> >Why not?  It will be optimised away anyway, and the code to get at the
> >subregs is hairy...  But could optimise away the useless move here
> >already if both ops are a reg and both are the same, if you prefer that?
> >Or rtx_equal_p (operands[0], operands[1])?
> 
> It's optimized away only if optimization is on.
> 
> The existing code checks and does not generate the unneeded move.
> Whatever you change to clean up code should maintain the same behavior.
> 
> if ((operands[2] == const0_rtx) && !rtx_equal_p (operands[0], operands[1]))
>   {
>     emit_insn (gen_movsi (operands[0], operands[1]));
>   }

Hi Michael,

Will you take care of it?


Segher

Reply via email to