On Fri, Jul 3, 2026 at 10:26 AM Oleg Endo <[email protected]> wrote: > > On Fri, 2026-07-03 at 09:31 +0200, Richard Biener wrote: > > > > So - make a "modeless" move available to LRA and have a later mdreorg > > pass "split" that into the appropriate 2x single or 1x double move? That > > said, > > possibly do not expose this "move detail" until after LRA and that mdreorg > > point? > > Yes, it could be one way to work around it. One problem is that it might > have to insert mode switches at such a late stage (in addition to the mode > switches that have been initially inserted before RA). For that it might > need a free gp-reg, so every such "mode invariant" fp-move insn must be > carrying a reserved gp-reg until the very end, or something like that. > > > > That mdreorg of course will have to recover the current insns "mode" > > somehow. > > > > That's exactly what I meant by > > "One way or another, it will require some infrastructure to figure out what > the current mode is in order to make the appropriate choice."
I hope this is recoverable from the instruction stream (thus, I hope the ABI specifies the mode upon function entry and call return). To me this doesn't sound much different from the CC0 reg exposure before/after reload. > I think it's better to have some common infrastructure for this instead of > some SH specific thing. Well, at least let's give it a try. I think these are all specialities that might not fit common infrastructure well, and sometimes the easiest is to hide target "yey"s from the compiler. Richard. > Best regards, > Oleg Endo > > > >
