Skip to content

Commit 3ab1481

Browse files
authored
[RemoveDIs] Use getFirstNonPHIIt to fix crash #85472 (#85618)
1 parent 0d313ee commit 3ab1481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ bool AMDGPUCodeGenPrepareImpl::visitPHINode(PHINode &I) {
19871987
for (VectorSlice &S : Slices) {
19881988
// We need to reset the build on each iteration, because getSlicedVal may
19891989
// have inserted something into I's BB.
1990-
B.SetInsertPoint(I.getParent()->getFirstNonPHI());
1990+
B.SetInsertPoint(I.getParent()->getFirstNonPHIIt());
19911991
S.NewPHI = B.CreatePHI(S.Ty, I.getNumIncomingValues());
19921992

19931993
for (const auto &[Idx, BB] : enumerate(I.blocks())) {

0 commit comments

Comments
 (0)