[llvm] [LoongArch] Strengthen stack size estimation for LSX/LASX extension (PR #146455)
Lu Weining via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 01:31:53 PDT 2025
================
@@ -158,7 +158,12 @@ void LoongArchFrameLowering::processFunctionBeforeFrameFinalized(
// estimateStackSize has been observed to under-estimate the final stack
// size, so give ourselves wiggle-room by checking for stack size
// representable an 11-bit signed field rather than 12-bits.
- if (!isInt<11>(MFI.estimateStackSize(MF)))
+ // For [x]vstelm.{b/h/w/d} memory instructions with 8 imm offset, 7-bit
+ // signed field is fine.
----------------
SixWeining wrote:
I think you can use https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/LoongArch/frame.ll#L31
https://github.com/llvm/llvm-project/pull/146455
More information about the llvm-commits
mailing list