diff options
| author | Zhou Sheng <zhousheng00@gmail.com> | 2009-02-26 06:56:37 +0000 |
|---|---|---|
| committer | Zhou Sheng <zhousheng00@gmail.com> | 2009-02-26 06:56:37 +0000 |
| commit | 264e46e1e9b87edd0b29230d94dd994f1718da5f (patch) | |
| tree | a26f086595f11993112c127593cd4270d42365e6 /llvm/lib/Transforms/Utils | |
| parent | 64a6fe1bc0f7dbdace7535e89d2eaac804b68e59 (diff) | |
| download | bcm5719-llvm-264e46e1e9b87edd0b29230d94dd994f1718da5f.tar.gz bcm5719-llvm-264e46e1e9b87edd0b29230d94dd994f1718da5f.zip | |
Ignore dbg info intrinsics when folding conditional branch to
conditional branch predecessors.
llvm-svn: 65509
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 08c8a3f65e5..25579614ecf 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1592,7 +1592,11 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) { // If this is a conditional branch in an empty block, and if any // predecessors is a conditional branch to one of our destinations, // fold the conditions into logical ops and one cond br. - if (&BB->front() != BI) + BasicBlock::iterator BBI = BB->begin(); + // Ignore dbg intrinsics. + while (isa<DbgInfoIntrinsic>(BBI)) + ++BBI; + if (&*BBI != BI) return false; |

