[llvm] cfe3f5f - [VPlan] Remove unneeded ExitBB variable after f0c5caa814.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 14 13:36:09 PDT 2024


Author: Florian Hahn
Date: 2024-09-14T21:35:45+01:00
New Revision: cfe3f5fa6104433933e5313cb88dd766b7184ef9

URL: https://github.com/llvm/llvm-project/commit/cfe3f5fa6104433933e5313cb88dd766b7184ef9
DIFF: https://github.com/llvm/llvm-project/commit/cfe3f5fa6104433933e5313cb88dd766b7184ef9.diff

LOG: [VPlan] Remove unneeded ExitBB variable after f0c5caa814.

Fix buildbot failures due to an unused variable, e.g.
https://lab.llvm.org/buildbot/#/builders/186/builds/2329

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index e7ed6ad5d47460..409769b4857c56 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8726,18 +8726,12 @@ static void addLiveOutsForFirstOrderRecurrences(
   // Plan->getScalarLoopRegion()->getSinglePredecessor() in the future once the
   // scalar region is modeled as well.
   auto *MiddleVPBB = cast<VPBasicBlock>(VectorRegion->getSingleSuccessor());
-  BasicBlock *ExitBB = nullptr;
   VPBasicBlock *ScalarPHVPBB = nullptr;
   if (MiddleVPBB->getNumSuccessors() == 2) {
     // Order is strict: first is the exit block, second is the scalar preheader.
-    ExitBB =
-        cast<VPIRBasicBlock>(MiddleVPBB->getSuccessors()[0])->getIRBasicBlock();
     ScalarPHVPBB = cast<VPBasicBlock>(MiddleVPBB->getSuccessors()[1]);
   } else if (ExitUsersToFix.empty()) {
     ScalarPHVPBB = cast<VPBasicBlock>(MiddleVPBB->getSingleSuccessor());
-  } else {
-    ExitBB = cast<VPIRBasicBlock>(MiddleVPBB->getSingleSuccessor())
-                 ->getIRBasicBlock();
   }
   if (!ScalarPHVPBB) {
     assert(ExitUsersToFix.empty() &&


        


More information about the llvm-commits mailing list