Skip to content

Commit e124f9f

Browse files
committed
Move Ctx into transformRecipestoEVLRecipes
1 parent 7e64b8f commit e124f9f

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
@@ -1350,9 +1350,9 @@ void VPlanTransforms::addActiveLaneMask(
13501350
}
13511351

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

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

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

0 commit comments

Comments
 (0)