Ignore dbg info intrinsics.
authorDevang Patel <dpatel@apple.com>
Thu, 11 Feb 2010 00:20:49 +0000 (00:20 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 11 Feb 2010 00:20:49 +0000 (00:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95828 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index 80e0027a1742240c63ff3cdb4c7a81852512943c..3ce7482dca74ac644ec3f2db6d0497d59ee14efc 100644 (file)
@@ -1891,6 +1891,10 @@ Value *GVN::lookupNumber(BasicBlock *BB, uint32_t num) {
 /// by inserting it into the appropriate sets
 bool GVN::processInstruction(Instruction *I,
                              SmallVectorImpl<Instruction*> &toErase) {
+  // Ignore dbg info intrinsics.
+  if (isa<DbgInfoIntrinsic>(I))
+    return false;
+
   if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
     bool Changed = processLoad(LI, toErase);