[llvm] [LV] Check if the VF is scalar by VFRange in `handleUncountableEarlyExit`. (PR #135294)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 01:47:10 PDT 2025
================
@@ -2435,8 +2437,12 @@ void VPlanTransforms::handleUncountableEarlyExit(
ExitIRI->addOperand(IncomingFromLatch);
ExitIRI->extractLastLaneOfOperand(MiddleBuilder);
}
+
+ auto IsVector = [](ElementCount VF) { return VF.isVector(); };
// Add the incoming value from the early exit.
- if (!IncomingFromEarlyExit->isLiveIn() && !Plan.hasScalarVFOnly()) {
+ if (!IncomingFromEarlyExit->isLiveIn() &&
+ // Limit range to scalar VF only, if the range contains the scalar VF.
----------------
david-arm wrote:
Should this say `// Limit range to vector VF only ...`? The code below only works if we're dealing with vectors.
https://github.com/llvm/llvm-project/pull/135294
More information about the llvm-commits
mailing list