Skip to content

Commit 5975760

Browse files
committed
Simpify in-loop checking
1 parent 623b43b commit 5975760

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5013,11 +5013,8 @@ LoopVectorizationCostModel::calculateRegisterUsage(
50135013
if (isa<VPVectorPointerRecipe, VPVectorEndPointerRecipe>(R))
50145014
continue;
50155015
if (auto *Phi = dyn_cast<VPReductionPHIRecipe>(R);
5016-
Phi && Phi->getUnderlyingInstr()) {
5017-
if (auto *PhiNode = dyn_cast<PHINode>(Phi->getUnderlyingInstr());
5018-
PhiNode && isInLoopReduction(PhiNode))
5016+
Phi && Phi->isInLoop())
50195017
continue;
5020-
}
50215018
if (isa<VPCanonicalIVPHIRecipe, VPReplicateRecipe, VPDerivedIVRecipe,
50225019
VPScalarIVStepsRecipe>(R) ||
50235020
(isa<VPInstruction>(R) &&

0 commit comments

Comments
 (0)