[PATCH] D100574: [RISCV][WIP] Fix missing emergency slots for scalable stack offsets

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 19:46:33 PDT 2021


HsiangKai added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:858
   // would currently be missed.
   if (!isInt<11>(MFI.estimateStackSize(MF)) || RVVStackSize != 0) {
     int RegScavFI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC),
----------------
I found a bug in our downstream testing about the condition. We may need to change the condition to

```
const auto &STI = MF.getSubtarget<RISCVSubtarget>();
...
if (!isInt<11>(MFI.estimateStackSize(MF)) || STI.hasStdExtV())
```

The reason is we will use VLA instructions for VLS data set. If all the data are VLS types, `RVVStackSize` will be 0. However, we still need one scavenging slot because vector load/store have no immediate offset field in the instructions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100574/new/

https://reviews.llvm.org/D100574



More information about the llvm-commits mailing list