Skip to content

Commit 43d239d

Browse files
Gabriel Hjort Åkerlundmikaelholmen
authored andcommitted
[GlobalISel] Fix incorrect setting of ValNo when splitting
Before, for each original argument i, ValNo was set to i + PartIdx, but ValNo is intended to reflect the index of the value before splitting. Hence, ValNo should always be set to i and not consider the PartIdx. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D86511
1 parent dfb717d commit 43d239d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
285285
}
286286
Args[i].Regs.push_back(Reg);
287287
Args[i].Flags.push_back(Flags);
288-
if (Handler.assignArg(i + Part, NewVT, NewVT, CCValAssign::Full,
288+
if (Handler.assignArg(i, NewVT, NewVT, CCValAssign::Full,
289289
Args[i], Args[i].Flags[Part], CCInfo)) {
290290
// Still couldn't assign this smaller part type for some reason.
291291
return false;
@@ -318,7 +318,7 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
318318
}
319319
Args[i].Regs.push_back(Unmerge.getReg(PartIdx));
320320
Args[i].Flags.push_back(Flags);
321-
if (Handler.assignArg(i + PartIdx, NewVT, NewVT, CCValAssign::Full,
321+
if (Handler.assignArg(i, NewVT, NewVT, CCValAssign::Full,
322322
Args[i], Args[i].Flags[PartIdx], CCInfo))
323323
return false;
324324
}

0 commit comments

Comments
 (0)