[llvm] [LV] Align debug location of the widen-phi to the original phi. (PR #120338)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 11:11:42 PST 2025
================
@@ -2291,9 +2291,10 @@ class VPWidenPHIRecipe : public VPSingleDefRecipe {
SmallVector<VPBasicBlock *, 2> IncomingBlocks;
public:
- /// Create a new VPWidenPHIRecipe for \p Phi with start value \p Start.
- VPWidenPHIRecipe(PHINode *Phi, VPValue *Start = nullptr)
- : VPSingleDefRecipe(VPDef::VPWidenPHISC, ArrayRef<VPValue *>(), Phi) {
+ /// Create a new VPWidenPHIRecipe for \p Phi with start value \p Start and
+ /// debug location \p DL.
+ VPWidenPHIRecipe(PHINode *Phi, VPValue *Start = nullptr, DebugLoc DL = {})
+ : VPSingleDefRecipe(VPDef::VPWidenPHISC, ArrayRef<VPValue *>(), Phi, DL) {
----------------
fhahn wrote:
IMO it is better to pass the debug loc separately; the phi instruction is technically optionally
https://github.com/llvm/llvm-project/pull/120338
More information about the llvm-commits
mailing list