Skip to content

Commit 8d7c8d8

Browse files
committed
[VPlan] Refine the debug location passing for VPWidenIntrinsicRecipe
1 parent a4fd3db commit 8d7c8d8

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
@@ -8430,8 +8430,7 @@ VPSingleDefRecipe *VPRecipeBuilder::tryToWidenCall(CallInst *CI,
84308430
},
84318431
Range);
84328432
if (ShouldUseVectorIntrinsic)
8433-
return new VPWidenIntrinsicRecipe(*CI, ID, Ops, CI->getType(),
8434-
CI->getDebugLoc());
8433+
return new VPWidenIntrinsicRecipe(*CI, ID, Ops, CI->getType());
84358434

84368435
Function *Variant = nullptr;
84378436
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()),
@@ -1690,7 +1689,7 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
16901689
ArrayRef<VPValue *> CallArguments, Type *Ty,
16911690
bool MayReadFromMemory, bool MayWriteToMemory,
16921691
bool MayHaveSideEffects, DebugLoc DL = {})
1693-
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments),
1692+
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments, DL),
16941693
VectorIntrinsicID(VectorIntrinsicID), ResultTy(Ty),
16951694
MayReadFromMemory(MayReadFromMemory),
16961695
MayWriteToMemory(MayWriteToMemory),
@@ -1701,7 +1700,7 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
17011700
VPWidenIntrinsicRecipe *clone() override {
17021701
return new VPWidenIntrinsicRecipe(*cast<CallInst>(getUnderlyingValue()),
17031702
VectorIntrinsicID, {op_begin(), op_end()},
1704-
ResultTy, getDebugLoc());
1703+
ResultTy);
17051704
}
17061705

17071706
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)