[PATCH] D99136: [RISCV] RVV stack needs two emergency stack slots.
PeiHsiangHung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 20:05:23 PDT 2021
NickHung created this revision.
NickHung added a reviewer: HsiangKai.
NickHung added a project: LLVM.
Herald added subscribers: vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
NickHung requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
D94465 <https://reviews.llvm.org/D94465>, Function RISCVInstrInfo::getVLENFactoredAmount handles NumOfVReg.
If it's not the power of two, MUL instruction needs two virtual registers (SizeOfVector and VN).
So, two emergency stack slots may be needed for the RegScavenger.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99136
Files:
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Index: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -821,6 +821,9 @@
int RegScavFI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC),
RegInfo->getSpillAlign(*RC), false);
RS->addScavengingFrameIndex(RegScavFI);
+ int RegScavFI1 = MFI.CreateStackObject(RegInfo->getSpillSize(*RC),
+ RegInfo->getSpillAlign(*RC), false);
+ RS->addScavengingFrameIndex(RegScavFI1);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99136.332503.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210323/74006af4/attachment.bin>
More information about the llvm-commits
mailing list