Skip to content

Commit 6540bc6

Browse files
committed
Refactor ExtTy type inference
1 parent b389530 commit 6540bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ VPPartialReductionRecipe::computeCost(ElementCount VF,
304304
VPRecipeBase *ExtBR = BinOpR->getOperand(1)->getDefiningRecipe();
305305

306306
auto *PhiType = Ctx.Types.inferScalarType(getOperand(1));
307-
auto *ExtTy = ExtAR ? Ctx.Types.inferScalarType(ExtAR->getOperand(0))
308-
: BinOpR->getOperand(0)->getUnderlyingValue()->getType();
307+
auto *ExtTy = Ctx.Types.inferScalarType(ExtAR ? ExtAR->getOperand(0)
308+
: BinOpR->getOperand(0));
309309

310310
auto GetExtendKind = [](VPRecipeBase *R) {
311311
// The extend could come from outside the plan.

0 commit comments

Comments
 (0)