[PATCH] D116424: [ShrinkWrap] check for PPC's non-callee-saved LR
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 13:51:10 PST 2022
efriedma added a comment.
In D116424#3223526 <https://reviews.llvm.org/D116424#3223526>, @nickdesaulniers wrote:
> In D116424#3223345 <https://reviews.llvm.org/D116424#3223345>, @efriedma wrote:
>
>> Do we need coverage for lr use and/or def, in addition to clobber?
>
> Can you help me come up with test cases? :-3
Oh, I assumed it was working based on other testcases in this file. I guess it actually isn't. (There are in-tree testcases with an "lr" output, but they discard the output value.)
I'm a little concerned that isEarlyClobber() won't handle this correctly if it ever does get implemented, but I guess we can leave that for a followup, if anyone hacking on the PPC backend is interested.
> I would have guessed for a use+def:
>
> void x (void) {
> register int y asm("lr");
> asm (""::"r"(y));
> }
>
> but that actually asserts during post-RA pseudo expansion: `Impossible reg-to-reg copy` (probably we're missing support for `mfspr`?).
Yes, probably copies just aren't implemented.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116424/new/
https://reviews.llvm.org/D116424
More information about the llvm-commits
mailing list