Skip to content

Commit 54af194

Browse files
committed
Step 2.1: Directly create -1 in createEVLRecipe.
1 parent 911e7d5 commit 54af194

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,8 +1708,11 @@ static VPRecipeBase *createEVLRecipe(VPValue *HeaderMask,
17081708
.Case<VPInstruction>([&](VPInstruction *VPI) -> VPRecipeBase * {
17091709
if (VPI->getOpcode() == VPInstruction::FirstOrderRecurrenceSplice) {
17101710
assert(PrevEVL && "Fixed-order recurrences require previous EVL");
1711+
VPValue *MinusOneVPV = VPI->getParent()->getPlan()->getOrAddLiveIn(
1712+
ConstantInt::getSigned(Type::getInt32Ty(TypeInfo.getContext()),
1713+
-1));
17111714
SmallVector<VPValue *> Ops(VPI->operands());
1712-
Ops.append({&AllOneMask, PrevEVL, &EVL});
1715+
Ops.append({MinusOneVPV, &AllOneMask, PrevEVL, &EVL});
17131716
return new VPWidenIntrinsicRecipe(Intrinsic::experimental_vp_splice,
17141717
Ops, TypeInfo.inferScalarType(VPI),
17151718
VPI->getDebugLoc());

0 commit comments

Comments
 (0)