[llvm] r269356 - [LAA] Use std::min. NFC
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 14:41:54 PDT 2016
Author: anemet
Date: Thu May 12 16:41:53 2016
New Revision: 269356
URL: http://llvm.org/viewvc/llvm-project?rev=269356&view=rev
Log:
[LAA] Use std::min. NFC
Modified:
llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=269356&r1=269355&r2=269356&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Thu May 12 16:41:53 2016
@@ -1076,10 +1076,8 @@ bool MemoryDepChecker::couldPreventStore
// 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) {
More information about the llvm-commits
mailing list