From 7acd1ccb8a61217f8c06b5fbdcc9785437bd0989 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 17 Mar 2004 02:02:47 +0000 Subject: [PATCH] Fix compilation of mesa, which I broke earlier today git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12465 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/SimplifyCFG.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 09153ed3bb0..a8785fe0a99 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -691,8 +691,9 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { } } else if (SwitchInst *SI = dyn_cast(BB->begin())) { - if (FoldValueComparisonIntoPredecessors(SI)) - return SimplifyCFG(BB) || 1; + if (isValueEqualityComparison(SI)) + if (FoldValueComparisonIntoPredecessors(SI)) + return SimplifyCFG(BB) || 1; } else if (BranchInst *BI = dyn_cast(BB->getTerminator())) { if (Value *CompVal = isValueEqualityComparison(BB->getTerminator())) { // This block must be empty, except for the setcond inst, if it exists. -- 2.34.1