[PATCH] D123528: [AVR] Always expand STDSPQRr & STDWSPQRr
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 4 05:50:49 PDT 2022
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRFrameLowering.cpp:369
- // instructions.
- fixStackStores(MBB, MI, TII, AVR::R31R30);
- } else {
----------------
benshi001 wrote:
> benshi001 wrote:
> > I do not think the removal of `fixStackStores` at here is good, since we seperate the preparation of `R31R30` and the substitution of `STDWSPQRr`-> `STDWPtrQRr`. It makes the code hard to understand, and I also concern there might be other issues introduced.
> >
> > So I suggest we keep this `fixStackStores` call.
> I suggest a moderate way:
>
> Keep the second `fixStackStores` (with R31R30) and remove the first one (R29R28). And in the `expand<AVR::STDWSPQRr>`, add an extra line
>
> ```
> assert(STI.getFrameLowering()->hasReservedCallFrame(MF) &&
> "unexpected STDWSPQRr pseudo instruction");
> ```
Then we only substitute `SP` with `R29R28`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123528/new/
https://reviews.llvm.org/D123528
More information about the llvm-commits
mailing list