From 2c34ab51a49fb28ffa9595fe554706e729646629 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 12 May 2016 21:41:53 +0000 Subject: [LAA] Use std::min. NFC llvm-svn: 269356 --- llvm/lib/Analysis/LoopAccessAnalysis.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib') 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) { -- cgit v1.2.3