[llvm] r313753 - Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp
Alexander Kornienko via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 05:18:22 PDT 2017
Author: alexfh
Date: Wed Sep 20 05:18:22 2017
New Revision: 313753
URL: http://llvm.org/viewvc/llvm-project?rev=313753&view=rev
Log:
Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp
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=313753&r1=313752&r2=313753&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Wed Sep 20 05:18:22 2017
@@ -1143,7 +1143,8 @@ bool llvm::sortLoadAccesses(ArrayRef<Val
// The pointers may not have a constant offset from each other, or SCEV
// may just not be smart enough to figure out they do. Regardless,
// there's nothing we can do.
- if (!Diff || Diff->getAPInt().abs().getSExtValue() > (VL.size() - 1) * Size)
+ if (!Diff || Diff->getAPInt().abs().getSExtValue() >
+ static_cast<int64_t>((VL.size() - 1) * Size))
return false;
OffValPairs.emplace_back(Diff->getAPInt().getSExtValue(), Val);
More information about the llvm-commits
mailing list