[llvm] 3ab1481 - [RemoveDIs] Use getFirstNonPHIIt to fix crash #85472 (#85618)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 02:57:25 PDT 2024
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T09:57:22Z
New Revision: 3ab1481f9aea30fd994d887c9e0801db6a219a31
URL: https://github.com/llvm/llvm-project/commit/3ab1481f9aea30fd994d887c9e0801db6a219a31
DIFF: https://github.com/llvm/llvm-project/commit/3ab1481f9aea30fd994d887c9e0801db6a219a31.diff
LOG: [RemoveDIs] Use getFirstNonPHIIt to fix crash #85472 (#85618)
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
index 0edbbf7cb0af54..f1cc4b524460e2 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
@@ -1987,7 +1987,7 @@ bool AMDGPUCodeGenPrepareImpl::visitPHINode(PHINode &I) {
for (VectorSlice &S : Slices) {
// We need to reset the build on each iteration, because getSlicedVal may
// have inserted something into I's BB.
- B.SetInsertPoint(I.getParent()->getFirstNonPHI());
+ B.SetInsertPoint(I.getParent()->getFirstNonPHIIt());
S.NewPHI = B.CreatePHI(S.Ty, I.getNumIncomingValues());
for (const auto &[Idx, BB] : enumerate(I.blocks())) {
More information about the llvm-commits
mailing list