diff options
author | Serguei Katkov <serguei.katkov@azul.com> | 2018-02-05 09:05:43 +0000 |
---|---|---|
committer | Serguei Katkov <serguei.katkov@azul.com> | 2018-02-05 09:05:43 +0000 |
commit | 276b32bb14eb1a7413af7b73bc0805799c67c75e (patch) | |
tree | 4bd47857e12645aacde69122b0dca7d3f9042874 /llvm/lib/Transforms/Utils | |
parent | 5a2bd99a9e0cb63a44c27c881341ea347ae0fe38 (diff) | |
download | bcm5719-llvm-276b32bb14eb1a7413af7b73bc0805799c67c75e.tar.gz bcm5719-llvm-276b32bb14eb1a7413af7b73bc0805799c67c75e.zip |
Revert [SimplifyCFG] Relax restriction for folding unconditional branches
The patch causes the failure of the test
compiler-rt/test/profile/Linux/counter_promo_nest.c
To unblock buildbot, revert the patch while investigation is in progress.
Differential Revision: https://reviews.llvm.org/D42691
llvm-svn: 324214
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index bcea927925b..c3343ed8ecc 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -5733,12 +5733,9 @@ bool SimplifyCFGOpt::SimplifyUncondBranch(BranchInst *BI, // header. (This is for early invocations before loop simplify and // vectorization to keep canonical loop forms for nested loops. These blocks // can be eliminated when the pass is invoked later in the back-end.) - // Note that if BB has only one predecessor then we do not introduce new - // backedge, so we can eliminate BB. bool NeedCanonicalLoop = Options.NeedCanonicalLoop && - (LoopHeaders && !BB->getSinglePredecessor() && - (LoopHeaders->count(BB) || LoopHeaders->count(Succ))); + (LoopHeaders && (LoopHeaders->count(BB) || LoopHeaders->count(Succ))); BasicBlock::iterator I = BB->getFirstNonPHIOrDbg()->getIterator(); if (I->isTerminator() && BB != &BB->getParent()->getEntryBlock() && !NeedCanonicalLoop && TryToSimplifyUncondBranchFromEmptyBlock(BB)) |