[llvm] [Transforms] Construct SmallVector with iterator ranges (NFC) (PR #136259)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 20 06:46:11 PDT 2025


================
@@ -8267,9 +8267,8 @@ EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton() {
   // The vec.epilog.iter.check block may contain Phi nodes from inductions or
   // reductions which merge control-flow from the latch block and the middle
   // block. Update the incoming values here and move the Phi into the preheader.
-  SmallVector<PHINode *, 4> PhisInBlock;
-  for (PHINode &Phi : VecEpilogueIterationCountCheck->phis())
-    PhisInBlock.push_back(&Phi);
+  SmallVector<PHINode *, 4> PhisInBlock(
+      llvm::make_pointer_range(VecEpilogueIterationCountCheck->phis()));
----------------
fhahn wrote:

`llvm::` prefixes should not needed?

https://github.com/llvm/llvm-project/pull/136259


More information about the llvm-commits mailing list