[llvm] [RemoveDIs] Use getFirstNonnPHIIt to fix crash #85472 (PR #85618)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 02:43:45 PDT 2024
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/85618
None
>From e20a40915f6be702f4197a6638443785bf96b97b Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Mon, 18 Mar 2024 09:41:58 +0000
Subject: [PATCH] [RemoveDIs] Use getFirstNonnPHIIt to fix crash #85472
---
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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