aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/Target/RISCV/RISCVFrameLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/Target/RISCV/RISCVFrameLowering.cpp')
-rw-r--r--backend/lib/Target/RISCV/RISCVFrameLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/lib/Target/RISCV/RISCVFrameLowering.cpp b/backend/lib/Target/RISCV/RISCVFrameLowering.cpp
index 7ffaccb..8a40bc1 100644
--- a/backend/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/backend/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -2280,6 +2280,12 @@ public:
if (auto Result = Pending->addImplicitDef(Register::fromPhysical(Reg)); !Result)
return std::unexpected(Result.error());
}
+ for (const MachineOperand &Operand : Terminator.operands()) {
+ if (!Operand.isImplicit())
+ continue;
+ if (auto Result = Pending->addImplicitOperand(Operand.cloneDetached()); !Result)
+ return std::unexpected(Result.error());
+ }
if (auto Result = setFrameFlag(*Pending, MachineInstrFlag::FrameDestroy); !Result)
return std::unexpected(Result.error());
auto Built = Pending->build();