[llvm-commits] [llvm] r66921 - /llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp

Bill Wendling isanbard at gmail.com
Fri Mar 13 11:34:51 PDT 2009


Author: void
Date: Fri Mar 13 13:34:50 2009
New Revision: 66921

URL: http://llvm.org/viewvc/llvm-project?rev=66921&view=rev
Log:
--- Merging (from foreign repository) r66859 into '.':
U    lib/Transforms/Utils/SimplifyCFG.cpp

Fix one more place where debug info affected
codegen (speculative execution).

Modified:
    llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp?rev=66921&r1=66920&r2=66921&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Utils/SimplifyCFG.cpp Fri Mar 13 13:34:50 2009
@@ -1041,9 +1041,12 @@
   }
 
   // If we get here, we can hoist the instruction. Try to place it
-  // before the icmp instruction preceeding the conditional branch.
+  // before the icmp instruction preceding the conditional branch.
   BasicBlock::iterator InsertPos = BI;
-  if (InsertPos != BIParent->begin()) 
+  if (InsertPos != BIParent->begin())
+    --InsertPos;
+  // Skip debug info between condition and branch.
+  while (InsertPos != BIParent->begin() && isa<DbgInfoIntrinsic>(InsertPos))
     --InsertPos;
   if (InsertPos == BrCond && !isa<PHINode>(BrCond)) {
     SmallPtrSet<Instruction *, 4> BB1Insns;





More information about the llvm-commits mailing list