-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[LV] Check if the VF is scalar by VFRange in handleUncountableEarlyExit
.
#135294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
1b83ae5
b7eca73
9e96e1d
01625c0
65bf335
53c168b
ce30391
dcaed17
aa4395a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
#include "VPlanAnalysis.h" | ||
#include "VPlanCFG.h" | ||
#include "VPlanDominatorTree.h" | ||
#include "VPlanHelpers.h" | ||
#include "VPlanPatternMatch.h" | ||
#include "VPlanUtils.h" | ||
#include "VPlanVerifier.h" | ||
|
@@ -2380,7 +2381,8 @@ void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan) { | |
|
||
void VPlanTransforms::handleUncountableEarlyExit( | ||
VPlan &Plan, ScalarEvolution &SE, Loop *OrigLoop, | ||
BasicBlock *UncountableExitingBlock, VPRecipeBuilder &RecipeBuilder) { | ||
BasicBlock *UncountableExitingBlock, VPRecipeBuilder &RecipeBuilder, | ||
VFRange &Range) { | ||
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion(); | ||
auto *LatchVPBB = cast<VPBasicBlock>(LoopRegion->getExiting()); | ||
VPBuilder Builder(LatchVPBB->getTerminator()); | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if using Perhaps using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code below There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated, thanks for advice! |
||
LoopVectorizationPlanner::getDecisionAndClampRange(IsVector, Range)) { | ||
VPValue *FirstActiveLane = EarlyExitB.createNaryOp( | ||
VPInstruction::FirstActiveLane, {EarlyExitTakenCond}, nullptr, | ||
"first.active.lane"); | ||
|
Uh oh!
There was an error while loading. Please reload this page.