On 10/22/18 6:20 PM, Segher Boessenkool wrote: > Hi peter, > > On Mon, Oct 22, 2018 at 06:40:58PM -0500, Peter Bergner wrote: >> --- gcc/function.c (revision 265399) >> +++ gcc/function.c (working copy) >> @@ -6453,6 +6453,13 @@ match_asm_constraints_1 (rtx_insn *insn, >> || !general_operand (input, GET_MODE (output))) >> continue; >> >> + /* If we have a matching constraint and both operands are hard >> registers, >> + then they must be the same hard register. */ >> + if (HARD_REGISTER_P (output) >> + && HARD_REGISTER_P (input) >> + && REGNO (output) != REGNO (input)) > > You need to test for REG_P (input) before you can HARD_REGISTER_P (input) > or REGNO (input). One might argue that checking REG_P should be part of HARD_REGISTER_P.
Jeff