diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-11-10 09:47:48 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-11-10 09:47:48 +0000 |
commit | 21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6 (patch) | |
tree | 07eecae41260d3a841883657a9de3e95edacdeda /llvm/lib/Analysis/InlineCost.cpp | |
parent | f6f45476f5c2030cdb713e1aca3daeadc08d9e6d (diff) | |
download | bcm5719-llvm-21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6.tar.gz bcm5719-llvm-21ce8ecb09ae59b96fbca75eb595c100d0a4d5c6.zip |
Inliner: Do zero-cost inlines even if above a negative threshold (PR24851)
Differential Revision: http://reviews.llvm.org/D14499
llvm-svn: 252595
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 8169ce48246..26f2e7ff504 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1296,7 +1296,7 @@ bool CallAnalyzer::analyzeCall(CallSite CS) { else if (NumVectorInstructions <= NumInstructions / 2) Threshold -= (FiftyPercentVectorBonus - TenPercentVectorBonus); - return Cost < Threshold; + return Cost <= std::max(0, Threshold); } #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) |