Skip to content

Commit ec56b1e

Browse files
committed
[VPlan] Refine the debug location passing for VPWidenIntrinsicRecipe
1 parent 44d0e95 commit ec56b1e

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8425,8 +8425,7 @@ VPSingleDefRecipe *VPRecipeBuilder::tryToWidenCall(CallInst *CI,
84258425
},
84268426
Range);
84278427
if (ShouldUseVectorIntrinsic)
8428-
return new VPWidenIntrinsicRecipe(*CI, ID, Ops, CI->getType(),
8429-
CI->getDebugLoc());
8428+
return new VPWidenIntrinsicRecipe(*CI, ID, Ops, CI->getType());
84308429

84318430
Function *Variant = nullptr;
84328431
std::optional<unsigned> MaskPos;

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,8 +1678,7 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
16781678

16791679
public:
16801680
VPWidenIntrinsicRecipe(CallInst &CI, Intrinsic::ID VectorIntrinsicID,
1681-
ArrayRef<VPValue *> CallArguments, Type *Ty,
1682-
DebugLoc DL = {})
1681+
ArrayRef<VPValue *> CallArguments, Type *Ty)
16831682
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments, CI),
16841683
VectorIntrinsicID(VectorIntrinsicID), ResultTy(Ty),
16851684
MayReadFromMemory(CI.mayReadFromMemory()),
@@ -1689,7 +1688,7 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
16891688
VPWidenIntrinsicRecipe(Intrinsic::ID VectorIntrinsicID,
16901689
ArrayRef<VPValue *> CallArguments, Type *Ty,
16911690
DebugLoc DL = {})
1692-
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments),
1691+
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments, DL),
16931692
VectorIntrinsicID(VectorIntrinsicID), ResultTy(Ty) {
16941693
LLVMContext &Ctx = Ty->getContext();
16951694
AttributeList Attrs = Intrinsic::getAttributes(Ctx, VectorIntrinsicID);
@@ -1706,7 +1705,7 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
17061705
VPWidenIntrinsicRecipe *clone() override {
17071706
return new VPWidenIntrinsicRecipe(*cast<CallInst>(getUnderlyingValue()),
17081707
VectorIntrinsicID, {op_begin(), op_end()},
1709-
ResultTy, getDebugLoc());
1708+
ResultTy);
17101709
}
17111710

17121711
VP_CLASSOF_IMPL(VPDef::VPWidenIntrinsicSC)

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ void VPlanTransforms::VPInstructionsToVPRecipes(
8484
} else if (CallInst *CI = dyn_cast<CallInst>(Inst)) {
8585
NewRecipe = new VPWidenIntrinsicRecipe(
8686
*CI, getVectorIntrinsicIDForCall(CI, &TLI),
87-
{Ingredient.op_begin(), Ingredient.op_end() - 1}, CI->getType(),
88-
CI->getDebugLoc());
87+
{Ingredient.op_begin(), Ingredient.op_end() - 1}, CI->getType());
8988
} else if (SelectInst *SI = dyn_cast<SelectInst>(Inst)) {
9089
NewRecipe = new VPWidenSelectRecipe(*SI, Ingredient.operands());
9190
} else if (auto *CI = dyn_cast<CastInst>(Inst)) {

0 commit comments

Comments
 (0)