[llvm] [LV] Improve code using VPIRPhi::getIRPhi (NFC) (PR #162270)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 05:17:23 PDT 2025


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/162270

None

>From d4ee9d48349c57dac91234ebad740588edcff691 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Tue, 7 Oct 2025 13:15:05 +0100
Subject: [PATCH] [LV] Improve code using VPIRPhi::getIRPhi (NFC)

---
 llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index cee08ef94aeb5..0b7963b98e7a4 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7282,8 +7282,8 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
     if (!Exit->hasPredecessors())
       continue;
     for (VPRecipeBase &PhiR : Exit->phis())
-      SE.forgetLcssaPhiWithNewPredecessor(
-          OrigLoop, cast<PHINode>(&cast<VPIRPhi>(PhiR).getInstruction()));
+      SE.forgetLcssaPhiWithNewPredecessor(OrigLoop,
+                                          &cast<VPIRPhi>(PhiR).getIRPhi());
   }
   // Forget the original loop and block dispositions.
   SE.forgetLoop(OrigLoop);



More information about the llvm-commits mailing list