[llvm] d221662 - [RISCV] In emitSelectPseudo, copy call frame size from LastSelectPseudo instead of MI.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 10:48:26 PDT 2024
Author: Craig Topper
Date: 2024-07-22T10:37:44-07:00
New Revision: d221662ed0cc758331ea4277d46f5983ea76f36d
URL: https://github.com/llvm/llvm-project/commit/d221662ed0cc758331ea4277d46f5983ea76f36d
DIFF: https://github.com/llvm/llvm-project/commit/d221662ed0cc758331ea4277d46f5983ea76f36d.diff
LOG: [RISCV] In emitSelectPseudo, copy call frame size from LastSelectPseudo instead of MI.
The split point is LastSelectPseudo. If MI is earlier, we might
sink it to LastSelectPseudo.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 585d8a060fe94..12d0e1d6ccb48 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -18479,7 +18479,7 @@ static MachineBasicBlock *emitSelectPseudo(MachineInstr &MI,
F->insert(I, TailMBB);
// Set the call frame size on entry to the new basic blocks.
- unsigned CallFrameSize = TII.getCallFrameSizeAt(MI);
+ unsigned CallFrameSize = TII.getCallFrameSizeAt(*LastSelectPseudo);
IfFalseMBB->setCallFrameSize(CallFrameSize);
TailMBB->setCallFrameSize(CallFrameSize);
More information about the llvm-commits
mailing list