Another missing check for debug intrinsics.
[oota-llvm.git] / lib / Transforms / Utils / SimplifyCFG.cpp
index 555e30e5f02ef83b49798beb96da11c653f8cf34..e3fa995de8deff83774f4bfee02dab04d4c15795 100644 (file)
@@ -2000,7 +2000,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
       --BBI;
       // Do not delete instructions that can have side effects, like calls
       // (which may never return) and volatile loads and stores.
-      if (isa<CallInst>(BBI)) break;
+      if (isa<CallInst>(BBI) && !isa<DbgInfoIntrinsic>(BBI)) break;
 
       if (StoreInst *SI = dyn_cast<StoreInst>(BBI))
         if (SI->isVolatile())