Skip to content

Commit 19d286b

Browse files
committed
[VPlan] Assert that inst isnt' a debug or pseudo inst (NFCI).
Debug and pseudo instructions aren't modeled in VPlan. Turn a check into an assertion. This will help removing the direct use of Inst here in the future.
1 parent d819f19 commit 19d286b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ void VPTransformState::setDebugLocFromInst(const Value *V) {
371371
// When a FSDiscriminator is enabled, we don't need to add the multiply
372372
// factors to the discriminators.
373373
if (DIL && Inst->getFunction()->shouldEmitDebugInfoForProfiling() &&
374-
!Inst->isDebugOrPseudoInst() && !EnableFSDiscriminator) {
374+
!EnableFSDiscriminator) {
375+
assert(!Inst->isDebugOrPseudoInst() &&
376+
"debug and pseudo instruction aren't part of VPlan");
375377
// FIXME: For scalable vectors, assume vscale=1.
376378
auto NewDIL =
377379
DIL->cloneByMultiplyingDuplicationFactor(UF * VF.getKnownMinValue());

0 commit comments

Comments
 (0)