From c9157d925c489f07ba9c0b2ce47e5149b75969a5 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2023 21:30:12 +0100 Subject: Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb. PR: 276104 MFC after: 1 month (cherry picked from commit 5f757f3ff9144b609b3c433dfd370cc6bdc191ad) --- contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp') diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp index 78ebe75c121b..548b0f3c55f0 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -145,8 +145,8 @@ void LoopVersioning::addPHINodes( } // If not create it. if (!PN) { - PN = PHINode::Create(Inst->getType(), 2, Inst->getName() + ".lver", - &PHIBlock->front()); + PN = PHINode::Create(Inst->getType(), 2, Inst->getName() + ".lver"); + PN->insertBefore(PHIBlock->begin()); SmallVector UsersToUpdate; for (User *U : Inst->users()) if (!VersionedLoop->contains(cast(U)->getParent())) -- cgit v1.2.3