diff options
| author | Adam Nemet <anemet@apple.com> | 2016-05-12 21:41:53 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2016-05-12 21:41:53 +0000 |
| commit | 2c34ab51a49fb28ffa9595fe554706e729646629 (patch) | |
| tree | edc38409e5b58f767997e8460a4ad024f75f4025 /llvm/lib | |
| parent | d82025b133bc068170e197b92f05e3bd331e1f96 (diff) | |
| download | bcm5719-llvm-2c34ab51a49fb28ffa9595fe554706e729646629.tar.gz bcm5719-llvm-2c34ab51a49fb28ffa9595fe554706e729646629.zip | |
[LAA] Use std::min. NFC
llvm-svn: 269356
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 173b03178b5..9244b0f9cb6 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1076,10 +1076,8 @@ bool MemoryDepChecker::couldPreventStoreLoadForward(unsigned Distance, // Store-load forwarding distance. const unsigned NumCyclesForStoreLoadThroughMemory = 8*TypeByteSize; // Maximum vector factor. - unsigned MaxVFWithoutSLForwardIssues = - VectorizerParams::MaxVectorWidth * TypeByteSize; - if(MaxSafeDepDistBytes < MaxVFWithoutSLForwardIssues) - MaxVFWithoutSLForwardIssues = MaxSafeDepDistBytes; + unsigned MaxVFWithoutSLForwardIssues = std::min( + VectorizerParams::MaxVectorWidth * TypeByteSize, MaxSafeDepDistBytes); for (unsigned vf = 2*TypeByteSize; vf <= MaxVFWithoutSLForwardIssues; vf *= 2) { |

