diff options
author | Alexander Kornienko <alexfh@google.com> | 2017-09-20 12:18:22 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2017-09-20 12:18:22 +0000 |
commit | 6c629b572893cd4fbf6a706c216f8dcacb4856b8 (patch) | |
tree | 667d35b1c57148c0e852f6862aa9f59f939673db /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 621e55578800b970b10630d9b23edddfb152bbd7 (diff) | |
download | bcm5719-llvm-6c629b572893cd4fbf6a706c216f8dcacb4856b8.tar.gz bcm5719-llvm-6c629b572893cd4fbf6a706c216f8dcacb4856b8.zip |
Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp
llvm-svn: 313753
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index efc3bc950b3..3b23b3314b9 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1143,7 +1143,8 @@ bool llvm::sortLoadAccesses(ArrayRef<Value *> VL, const DataLayout &DL, // 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); |