Skip to content

Commit a078f47

Browse files
committed
Fix compilation of mesa, which I broke earlier today
llvm-svn: 12465
1 parent 684fa5a commit a078f47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,9 @@ bool llvm::SimplifyCFG(BasicBlock *BB) {
691691
}
692692

693693
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(BB->begin())) {
694-
if (FoldValueComparisonIntoPredecessors(SI))
695-
return SimplifyCFG(BB) || 1;
694+
if (isValueEqualityComparison(SI))
695+
if (FoldValueComparisonIntoPredecessors(SI))
696+
return SimplifyCFG(BB) || 1;
696697
} else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
697698
if (Value *CompVal = isValueEqualityComparison(BB->getTerminator())) {
698699
// This block must be empty, except for the setcond inst, if it exists.

0 commit comments

Comments
 (0)