On Thu, 2016-03-17 at 12:16 +0100, Jakub Jelinek wrote:

> Thus, I've reverted the patch (kept the testcase), and after some
> discussions on IRC bootstrapped/regtested on x86_64-linux and i686
> -linux following version, which right now should change behavior just 
> for the i?86 case and nothing else, so shouldn't break other targets.
> I believe at least the epiphany and sh peepholes that use replace_rtx 
> will want similar treatment, but will leave testing of that to their
> maintainers.

As far as I can see, replace_rtx is used only in one pattern in sh.md:

(define_peephole2
  [(set (match_operand:SI 0 "general_movdst_operand" "")
        (match_operand:SI 1 "arith_reg_or_0_operand" ""))
   (set (match_operand:SI 2 "arith_reg_dest" "")
        (if_then_else:SI (match_operator 4 "equality_comparison_operator"
                           [(match_operand:SI 3 "arith_reg_operand" "")
                            (const_int 0)])
         (match_dup 0)
         (match_dup 2)))]
  "TARGET_SHMEDIA && peep2_reg_dead_p (2, operands[0])
   && (!REG_P (operands[1]) || GENERAL_REGISTER_P (REGNO (operands[1])))"
  [(set (match_dup 2)
        (if_then_else:SI (match_dup 4) (match_dup 1) (match_dup 2)))]
{
  replace_rtx (operands[4], operands[0], operands[1]);
})

This pattern is only for SH5/SH64, which I'm planning on removing after
GCC 6.  So no concerns or further actions required here.

Cheers,
Oleg

Reply via email to