Skip to content

Commit 823219a

Browse files
committed
Simpify in-loop checking
1 parent ad3ee1c commit 823219a

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
@@ -5017,11 +5017,8 @@ LoopVectorizationCostModel::calculateRegisterUsage(
50175017
if (isa<VPVectorPointerRecipe, VPVectorEndPointerRecipe>(R))
50185018
continue;
50195019
if (auto *Phi = dyn_cast<VPReductionPHIRecipe>(R);
5020-
Phi && Phi->getUnderlyingInstr()) {
5021-
if (auto *PhiNode = dyn_cast<PHINode>(Phi->getUnderlyingInstr());
5022-
PhiNode && isInLoopReduction(PhiNode))
5020+
Phi && Phi->isInLoop())
50235021
continue;
5024-
}
50255022
if (isa<VPCanonicalIVPHIRecipe, VPReplicateRecipe, VPDerivedIVRecipe,
50265023
VPScalarIVStepsRecipe>(R) ||
50275024
(isa<VPInstruction>(R) &&

0 commit comments

Comments
 (0)