diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-13 01:05:24 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-13 01:05:24 +0000 |
commit | 990afedb3a4b7d32832d74ad5b5863c19f909e1f (patch) | |
tree | ffd7befe0c6e6381c6febb752e0148ddc9678dc0 /lib/Transforms/Utils | |
parent | ee167a729ebf150950025ecec66ba8b3386ebfe9 (diff) | |
download | external_llvm-990afedb3a4b7d32832d74ad5b5863c19f909e1f.zip external_llvm-990afedb3a4b7d32832d74ad5b5863c19f909e1f.tar.gz external_llvm-990afedb3a4b7d32832d74ad5b5863c19f909e1f.tar.bz2 |
Fix one more place where debug info affected
codegen (speculative execution).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index b8bac6d..925e3e9 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/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; |