[llvm] [DebugInfo][LoopVectorizer][NFC] Use unknown annotations for more instructions (PR #170522)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 09:55:00 PST 2025
https://github.com/SLTozer created https://github.com/llvm/llvm-project/pull/170522
Some recent patches have added more non-annotated empty locations to the loop vectorizer, resulting in errors reported on the DebugLoc coverage tracking buildbot:
https://lab.llvm.org/staging/#/builders/222/builds/1938
This patch adds "unknown" annotations in place of the empty locations, allowing the buildbot to ignore them for now.
>From 89b26f7153e6e67f02180c6c2d1722d066d6221a Mon Sep 17 00:00:00 2001
From: Stephen Tozer <stephen.tozer at sony.com>
Date: Wed, 3 Dec 2025 15:42:10 +0000
Subject: [PATCH] [DebugInfo][LoopVectorizer][NFC] Use DebugLoc::getUnknown for
more locations
Some recent patches have added more non-annotated empty locations to the
loop vectorizer, resulting in errors reported on the DebugLoc coverage
tracking buildbot:
https://lab.llvm.org/staging/#/builders/222/builds/1938
This patch adds "unknown" annotations in place of the empty locations,
allowing the buildbot to ignore them for now.
---
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 38024aa6897fc..6429ff8e5e1b9 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -967,7 +967,7 @@ static VPValue *optimizeLatchExitInductionUser(
VPValue *Step = WideIV->getStepValue();
Type *ScalarTy = TypeInfo.inferScalarType(WideIV);
if (ScalarTy->isIntegerTy())
- return B.createNaryOp(Instruction::Sub, {EndValue, Step}, {}, "ind.escape");
+ return B.createNaryOp(Instruction::Sub, {EndValue, Step}, DebugLoc::getUnknown(), "ind.escape");
if (ScalarTy->isPointerTy()) {
Type *StepTy = TypeInfo.inferScalarType(Step);
auto *Zero = Plan.getConstantInt(StepTy, 0);
@@ -3770,11 +3770,11 @@ void VPlanTransforms::handleUncountableEarlyExit(VPBasicBlock *EarlyExitingVPBB,
if (!IncomingFromEarlyExit->isLiveIn()) {
// Update the incoming value from the early exit.
VPValue *FirstActiveLane = EarlyExitB.createNaryOp(
- VPInstruction::FirstActiveLane, {CondToEarlyExit}, nullptr,
+ VPInstruction::FirstActiveLane, {CondToEarlyExit}, DebugLoc::getUnknown(),
"first.active.lane");
IncomingFromEarlyExit = EarlyExitB.createNaryOp(
VPInstruction::ExtractLane, {FirstActiveLane, IncomingFromEarlyExit},
- nullptr, "early.exit.value");
+ DebugLoc::getUnknown(), "early.exit.value");
ExitIRI->setOperand(EarlyExitIdx, IncomingFromEarlyExit);
}
}
@@ -4990,7 +4990,7 @@ void VPlanTransforms::updateScalarResumePhis(
"Cannot handle loops with uncountable early exits");
if (IsFOR)
ResumeFromVectorLoop = MiddleBuilder.createNaryOp(
- VPInstruction::ExtractLastElement, {ResumeFromVectorLoop}, {},
+ VPInstruction::ExtractLastElement, {ResumeFromVectorLoop}, DebugLoc::getUnknown(),
"vector.recur.extract");
ResumePhiR->setName(IsFOR ? "scalar.recur.init" : "bc.merge.rdx");
ResumePhiR->setOperand(0, ResumeFromVectorLoop);
More information about the llvm-commits
mailing list