[PATCH] D77636: [LV] Assert no DbgInfoIntrinsic calls are passed to widening (NFC).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 04:17:35 PDT 2020


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: rogfer01, rkruppe, bollu, hiraditya, aprantl.
Herald added a project: LLVM.

When building a VPlan, BasicBlock::instructionsWithoutDebug() is used to
iterate over the instructions in a block. This means that no recipes
should be created for debug info intrinsics already and we can turn the
early exit into an assertion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77636

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp


Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4360,11 +4360,8 @@
 }
 
 void InnerLoopVectorizer::widenCallInstruction(CallInst &I) {
-  // Ignore dbg intrinsics.
-  // TODO: Debug intrinsics should be skipped/handled during VPlan construction
-  // rather than dropping them here.
-  if (isa<DbgInfoIntrinsic>(I))
-    return;
+  assert(!isa<DbgInfoIntrinsic>(I) &&
+         "DbgInfoIntrinsic should have been dropped during VPlan construction");
   setDebugLocFromInst(Builder, &I);
 
   Module *M = I.getParent()->getParent()->getParent();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77636.255630.patch
Type: text/x-patch
Size: 728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/a5e05c26/attachment.bin>


More information about the llvm-commits mailing list