Skip to content

Commit 07152d2

Browse files
bors[bot]ptersilie
andauthored
86: Fix bug in FixStackmapsSpillReloads pass. r=ltratt a=ptersilie Co-authored-by: Lukas Diekmann <[email protected]>
2 parents 2234bb6 + a4b6b9f commit 07152d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/CodeGen/Yk/FixStackmapsSpillReloads.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ bool FixStackmapsSpillReloads::runOnMachineFunction(MachineFunction &MF) {
137137
Register Reg = MOI->getReg();
138138
// Check if the register operand in the stackmap is a restored
139139
// spill.
140-
if (Spills.count(Reg) > 0) {
140+
// Since implicit operands are ignored by stackmaps (they are not
141+
// added into the record) we must not replace them with spills so
142+
// we don't add extra locations that aren't needed. Doing so leads
143+
// to bugs during deoptimisation.
144+
if (Spills.count(Reg) > 0 && !MOI->isImplicit()) {
141145
// Get spill reload instruction
142146
MachineInstr *SMI = Spills[Reg];
143147
int FI;

0 commit comments

Comments
 (0)