LoopVectorizer: Ignore all dbg intrinisic
authorArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 9 Mar 2013 16:27:27 +0000 (16:27 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Sat, 9 Mar 2013 16:27:27 +0000 (16:27 +0000)
Ignore all DbgIntriniscInfo instructions instead of just DbgValueInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176769 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp

index e1f29322318018a9876b343da72bae90921e0a34..3da0f5d2104bd70335f5a2c36e172651a69dcbac 100644 (file)
@@ -2088,8 +2088,8 @@ InnerLoopVectorizer::vectorizeBlockInLoop(LoopVectorizationLegality *Legal,
     }
 
     case Instruction::Call: {
-      // Ignore dbg.value instructions.
-      if (isa<DbgValueInst>(it))
+      // Ignore dbg intrinsics.
+      if (isa<DbgInfoIntrinsic>(it))
         break;
 
       Module *M = BB->getParent()->getParent();
@@ -2328,10 +2328,10 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
         return false;
       }// end of PHI handling
 
-      // We still don't handle functions. However, we can ignore dbg.value
+      // We still don't handle functions. However, we can ignore dbg intrinsic
       // calls and we do handle certain intrinsic and libm functions.
       CallInst *CI = dyn_cast<CallInst>(it);
-      if (CI && !getIntrinsicIDForCall(CI, TLI) && !isa<DbgValueInst>(CI)) {
+      if (CI && !getIntrinsicIDForCall(CI, TLI) && !isa<DbgInfoIntrinsic>(CI)) {
         DEBUG(dbgs() << "LV: Found a call site.\n");
         return false;
       }
@@ -3268,8 +3268,8 @@ unsigned LoopVectorizationCostModel::expectedCost(unsigned VF) {
 
     // For each instruction in the old loop.
     for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; ++it) {
-      // Skip dbg.value instructions.
-      if (isa<DbgValueInst>(it))
+      // Skip dbg intrinsics.
+      if (isa<DbgInfoIntrinsic>(it))
         continue;
 
       unsigned C = getInstructionCost(it, VF);