[PATCH] D98802: [RISCV][WIP] Fix offset computation for RVV
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 18 22:46:53 PDT 2021
StephenFan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:882
+ if (RVVStackSize && !hasFP(MF) && Size % 8 != 0) {
+ RVFI->setRVVPadding(getStackAlign().value());
+ }
----------------
StephenFan wrote:
> If we can set the RVVPadding as
> ```
> RVFI->setRVVPadding(alignTo(Size, getStackAlign().value()) -Size);
> ```
> or just align to 8, because we just want the RVV stack aligned to 8 bytes.
> ```
> RVFI->setRVVPadding(alignTo(Size, 8) - Size);
> ```
> ?
> In this way, maybe we can save some stack space.
If we can set the RVVPadding as
```
RVFI->setRVVPadding(alignTo(Size, getStackAlign().value()) -Size);
```
or just align to 8, because we just want the RVV stack aligned to 8 bytes.
```
RVFI->setRVVPadding(alignTo(Size, 8) - Size);
```
?
In this way, maybe we can save some stack space.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98802/new/
https://reviews.llvm.org/D98802
More information about the llvm-commits
mailing list