[llvm] 06d4876 - [VPlan] Replace checking IR loop with checking VPlan predecessors (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 04:29:57 PDT 2025
Author: Florian Hahn
Date: 2025-04-24T12:29:34+01:00
New Revision: 06d48769825c656bff97c05d398ce3ec77acfb36
URL: https://github.com/llvm/llvm-project/commit/06d48769825c656bff97c05d398ce3ec77acfb36
DIFF: https://github.com/llvm/llvm-project/commit/06d48769825c656bff97c05d398ce3ec77acfb36.diff
LOG: [VPlan] Replace checking IR loop with checking VPlan predecessors (NFC).
Update check to use VPEarlyExitBlock's predecessors, which removes a
dependence on underlying IR and is more in line with the comment below.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index ee33a58404818..10cd7d85ba41c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -2508,7 +2508,7 @@ void VPlanTransforms::handleUncountableEarlyExit(
// Early exit operand should always be last, i.e., 0 if VPEarlyExitBlock has
// a single predecessor and 1 if it has two.
unsigned EarlyExitIdx = ExitIRI->getNumOperands() - 1;
- if (OrigLoop->getUniqueExitBlock()) {
+ if (!VPEarlyExitBlock->getSinglePredecessor()) {
// If VPEarlyExitBlock has two predecessors, they are already ordered such
// that early exit is second (and latch exit is first), by construction.
// But its underlying IRBB (EarlyExitIRBB) may have its predecessors
More information about the llvm-commits
mailing list