On 10/14/22 11:35, Segher Boessenkool wrote:
On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote:
LRA only ever generates insns that pass recog.  The backend allows this
define_insn, requiring it to be split (it returns template "#"), but
then somehow it doesn't match in any split pass?
Nope.  The elimination code will just change one register without
re-recognizing.  That's precisely what happens here.
That is a big oversight then.  Please file a PR?

Sure.  But just recognizing (for this particular case) will just move the fault from a failure to split to a failure to recognize. From my wanderings in the elimination code, I don't see that it has a path that would allow it to reasonably handle this case -- ie, if the insn does not recognize, what then?   Conceptually we need to generate an input-reload but I don't see a way to do that in the elimination code.  Maybe Vlad knows how it ought to be handled.



It is the only way it can know if it needs to reload more.  Even if it
somehow can assume it doesn't have to check this in some cases, an
assert (inside a CHECKING_P) would be nice?

Agreed.


jeff

Reply via email to