On Tue, Feb 21, 2017 at 12:08:34PM -0800, Michael Eager wrote:
> >-  /* Shift by zero -- copy regs if necessary.  */
> >+  /* Shift by zero -- copy regs.  */
> >    if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 
> >    0))
> >      {
> >-      if (REGNO (operands[0]) != REGNO (operands[1]))
> >-    emit_insn (gen_movsi (operands[0], operands[1]));
> >+      emit_insn (gen_movsi (operands[0], operands[1]));
> >        return 1;
> >      }
> 
> 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])?


Segher

Reply via email to