[VENTUS][RISCV][fix] Fix stack size calculation bug

This commit is contained in:
zhoujing 2023-07-21 18:02:33 +08:00
parent 2069ca56d3
commit 623ca8b4ba
1 changed files with 1 additions and 1 deletions

View File

@ -702,7 +702,7 @@ uint64_t RISCVFrameLowering::getStackSize(MachineFunction &MF,
// Need to consider the alignment for different frame index
uint64_t Align = MFI.getObjectAlign(I).value();
uint64_t ActualAlignSize = (Align + 3) >> 2;
uint64_t Size = ActualAlignSize * MFI.getObjectSize(I);
uint64_t Size = ActualAlignSize * ((MFI.getObjectSize(I) + 3) >> 2) * 4;
StackSize += Size;
}