Skip to content

Commit 5b6b2a1

Browse files
committed
Move Ctx into transformRecipestoEVLRecipes
1 parent c0ecba0 commit 5b6b2a1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,9 +1351,9 @@ void VPlanTransforms::addActiveLaneMask(
13511351
}
13521352

13531353
/// Replace recipes with their EVL variants.
1354-
static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL,
1355-
LLVMContext &Ctx) {
1354+
static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
13561355
using namespace llvm::VPlanPatternMatch;
1356+
LLVMContext &Ctx = Plan.getCanonicalIV()->getScalarType()->getContext();
13571357
SmallVector<VPValue *> HeaderMasks = collectAllHeaderMasks(Plan);
13581358
for (VPValue *HeaderMask : collectAllHeaderMasks(Plan)) {
13591359
for (VPUser *U : collectUsersRecursively(HeaderMask)) {
@@ -1487,8 +1487,7 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
14871487
NextEVLIV->insertBefore(CanonicalIVIncrement);
14881488
EVLPhi->addOperand(NextEVLIV);
14891489

1490-
LLVMContext &Ctx = CanonicalIVPHI->getScalarType()->getContext();
1491-
transformRecipestoEVLRecipes(Plan, *VPEVL, Ctx);
1490+
transformRecipestoEVLRecipes(Plan, *VPEVL);
14921491

14931492
// Replace all uses of VPCanonicalIVPHIRecipe by
14941493
// VPEVLBasedIVPHIRecipe except for the canonical IV increment.

0 commit comments

Comments
 (0)