Skip to content

Commit 85e7578

Browse files
committed
1 parent d1a6f92 commit 85e7578

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎llvm/lib/Transforms/Utils/SimplifyCFG.cpp‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,7 +2978,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, DomTreeUpdater *DTU,
29782978
unsigned BonusInstThreshold) {
29792979
// If this block ends with an unconditional branch,
29802980
// let SpeculativelyExecuteBB() deal with it.
2981-
if (!BI->isConditional() || is_splat(successors(BI)))
2981+
if (!BI->isConditional())
29822982
return false;
29832983

29842984
BasicBlock *BB = BI->getParent();
@@ -3059,8 +3059,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, DomTreeUpdater *DTU,
30593059
// Check that we have two conditional branches. If there is a PHI node in
30603060
// the common successor, verify that the same value flows in from both
30613061
// blocks.
3062-
if (!PBI || PBI->isUnconditional() || is_splat(successors(PBI)) ||
3063-
!SafeToMergeTerminators(BI, PBI))
3062+
if (!PBI || PBI->isUnconditional() || !SafeToMergeTerminators(BI, PBI))
30643063
continue;
30653064

30663065
// Determine if the two branches share a common destination.

0 commit comments

Comments
 (0)