Skip to content

Commit cecc626

Browse files
committed
Simpify in-loop checking
1 parent a9c9a52 commit cecc626

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
@@ -5010,11 +5010,8 @@ LoopVectorizationCostModel::calculateRegisterUsage(
50105010
if (isa<VPVectorPointerRecipe, VPVectorEndPointerRecipe>(R))
50115011
continue;
50125012
if (auto *Phi = dyn_cast<VPReductionPHIRecipe>(R);
5013-
Phi && Phi->getUnderlyingInstr()) {
5014-
if (auto *PhiNode = dyn_cast<PHINode>(Phi->getUnderlyingInstr());
5015-
PhiNode && isInLoopReduction(PhiNode))
5013+
Phi && Phi->isInLoop())
50165014
continue;
5017-
}
50185015
if (isa<VPCanonicalIVPHIRecipe, VPReplicateRecipe, VPDerivedIVRecipe,
50195016
VPScalarIVStepsRecipe>(R) ||
50205017
(isa<VPInstruction>(R) &&

0 commit comments

Comments
 (0)