diff options
author | Devang Patel <dpatel@apple.com> | 2007-12-22 01:32:53 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-12-22 01:32:53 +0000 |
commit | 8bb3141d55f739ed7a32c3140e95b6045fb6a44e (patch) | |
tree | 75076d8d285f394a097943404d6db1f7d29dd36f /lib | |
parent | a257bdabdd9621cb9fcb66293dff816b65e538ae (diff) | |
download | external_llvm-8bb3141d55f739ed7a32c3140e95b6045fb6a44e.tar.gz external_llvm-8bb3141d55f739ed7a32c3140e95b6045fb6a44e.tar.bz2 external_llvm-8bb3141d55f739ed7a32c3140e95b6045fb6a44e.zip |
If succ has succ itself as one of the predecessors then do
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 1305fd92c7..ee283a04c5 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -110,10 +110,10 @@ static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { // update the PHI nodes correctly. if (!isa<PHINode>(BB->begin()) || Succ->getSinglePredecessor()) return true; - // If the predecessors of Succ are only BB and Succ itself, handle it. + // If the predecessors of Succ are only BB, handle it. bool IsSafe = true; for (pred_iterator PI = pred_begin(Succ), E = pred_end(Succ); PI != E; ++PI) - if (*PI != Succ && *PI != BB) { + if (*PI != BB) { IsSafe = false; break; } |