summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-01-15 21:21:39 +0000
committerJustin Bogner <mail@justinbogner.com>2016-01-15 21:21:39 +0000
commitfd757648a4d123a09a4422c00113f8a6d4b698db (patch)
treed4fe3cc3c44f7633bc1c5536b4cd4d763ffed8c4 /llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
parentd8b5bde5d6300f15b6f798eed73b712378261314 (diff)
downloadbcm5719-llvm-fd757648a4d123a09a4422c00113f8a6d4b698db.tar.gz
bcm5719-llvm-fd757648a4d123a09a4422c00113f8a6d4b698db.zip
PM: Fix an inverted condition in simplifyFunctionCFG
I mentioned the issue here in code review way back in September and was sure we'd fixed it, but apparently we forgot: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150921/301850.html In any case, as soon as you try to use this pass in anything but the most basic pipeline everything falls apart. Fix the condition. llvm-svn: 257935
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index 63c8836bf38..80f0fa39e21 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -182,7 +182,7 @@ PreservedAnalyses SimplifyCFGPass::run(Function &F,
auto &TTI = AM->getResult<TargetIRAnalysis>(F);
auto &AC = AM->getResult<AssumptionAnalysis>(F);
- if (!simplifyFunctionCFG(F, TTI, &AC, BonusInstThreshold))
+ if (simplifyFunctionCFG(F, TTI, &AC, BonusInstThreshold))
return PreservedAnalyses::none();
return PreservedAnalyses::all();
@@ -236,4 +236,3 @@ llvm::createCFGSimplificationPass(int Threshold,
std::function<bool(const Function &)> Ftor) {
return new CFGSimplifyPass(Threshold, Ftor);
}
-
OpenPOWER on IntegriCloud