Skip to content

Commit e7b6d6e

Browse files
committed
Step 2.1: Directly create -1 in createEVLRecipe.
1 parent 02db15b commit e7b6d6e

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
@@ -1709,8 +1709,11 @@ static VPRecipeBase *createEVLRecipe(VPValue *HeaderMask,
17091709
.Case<VPInstruction>([&](VPInstruction *VPI) -> VPRecipeBase * {
17101710
if (VPI->getOpcode() == VPInstruction::FirstOrderRecurrenceSplice) {
17111711
assert(PrevEVL && "Fixed-order recurrences require previous EVL");
1712+
VPValue *MinusOneVPV = VPI->getParent()->getPlan()->getOrAddLiveIn(
1713+
ConstantInt::getSigned(Type::getInt32Ty(TypeInfo.getContext()),
1714+
-1));
17121715
SmallVector<VPValue *> Ops(VPI->operands());
1713-
Ops.append({&AllOneMask, PrevEVL, &EVL});
1716+
Ops.append({MinusOneVPV, &AllOneMask, PrevEVL, &EVL});
17141717
return new VPWidenIntrinsicRecipe(Intrinsic::experimental_vp_splice,
17151718
Ops, TypeInfo.inferScalarType(VPI),
17161719
VPI->getDebugLoc());

0 commit comments

Comments
 (0)