summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-13 01:05:24 +0000
committerDale Johannesen <dalej@apple.com>2009-03-13 01:05:24 +0000
commitcecfa6e08d2f4f9c8ec7e7d6adc6e2c8251d172b (patch)
tree228dae8f5f72b4eee0ad86d0d71620a5d8b77b3d /llvm/lib
parent0f35a026a965f7f44c339bebab99cdb9bb277fdd (diff)
downloadbcm5719-llvm-cecfa6e08d2f4f9c8ec7e7d6adc6e2c8251d172b.tar.gz
bcm5719-llvm-cecfa6e08d2f4f9c8ec7e7d6adc6e2c8251d172b.zip
Fix one more place where debug info affected
codegen (speculative execution). llvm-svn: 66859
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index b8bac6da2fe..925e3e9e1f8 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1069,9 +1069,12 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *BB1) {
}
// 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;
OpenPOWER on IntegriCloud