File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -4877,14 +4877,10 @@ void LoopVectorizationCostModel::collectElementTypesForWidening() {
48774877// / Get the VF scaling factor applied to the recipe's output, if the recipe has
48784878// / one.
48794879static unsigned getVFScaleFactor (VPRecipeBase *R) {
4880- if (isa<VPPartialReductionRecipe, VPReductionPHIRecipe>(R)) {
4881- auto *ReductionR = dyn_cast<VPReductionPHIRecipe>(R);
4882- auto *PartialReductionR =
4883- ReductionR ? nullptr : dyn_cast<VPPartialReductionRecipe>(R);
4884- unsigned ScaleFactor = ReductionR ? ReductionR->getVFScaleFactor ()
4885- : PartialReductionR->getVFScaleFactor ();
4886- return ScaleFactor;
4887- }
4880+ if (auto *RR = dyn_cast<VPReductionPHIRecipe>(R))
4881+ return RR->getVFScaleFactor ();
4882+ if (auto *RR = dyn_cast<VPPartialReductionRecipe>(R))
4883+ return RR->getVFScaleFactor ();
48884884 return 1 ;
48894885}
48904886
You can’t perform that action at this time.
0 commit comments