https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101882

--- Comment #17 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #15)
> The problem is operand 4 does not have "0", and it's also assigned the hard
> register r23.  It's fine for operand 0 and 1 to be the same, also for
> operand 1 and 4 to be the same, but operand 0 and 4 cannot be same.  Thus
> this combine breaks the code.

The reason operands 0, 1 and 4 all use the register r23, is that each operand
is using the same pseudo, coming from variable "x", which is a user defined
hard register:

   register long x asm ("s0");

It does seem wrong that combine succeeded in combining those patterns, but as
Segher mentioned, it's recog() that said it was "ok".



(In reply to Segher Boessenkool from comment #16)
> It is allowed by recog().  Most likely your pattern is incorrect, but it
> is not completely impossible there is something wrong in genrecog.cc --
> but that isn't combine either.

Does recog() not check for early clobber when run before RA?  Or does it assume
a pseudo cannot early clobber itself?

Reply via email to