One more place where debug info affects codegen.
authorDale Johannesen <dalej@apple.com>
Fri, 13 Mar 2009 19:23:20 +0000 (19:23 +0000)
committerDale Johannesen <dalej@apple.com>
Fri, 13 Mar 2009 19:23:20 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66930 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index b2a6864194075dc74e5a5b4f0dfab9b7a9d7f0ed..44d85e706c6d999615af438cd613120942b448ac 100644 (file)
@@ -11144,7 +11144,8 @@ static bool isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom) {
 
     // If we see a free or a call (which might do a free) the pointer could be
     // marked invalid.
-    if (isa<FreeInst>(BBI) || isa<CallInst>(BBI))
+    if (isa<FreeInst>(BBI) || 
+        (isa<CallInst>(BBI) && !isa<DbgInfoIntrinsic>(BBI)))
       return false;
     
     if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) {