]> granicus.if.org Git - llvm/commitdiff
Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp
authorAlexander Kornienko <alexfh@google.com>
Wed, 20 Sep 2017 12:18:22 +0000 (12:18 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 20 Sep 2017 12:18:22 +0000 (12:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313753 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopAccessAnalysis.cpp

index efc3bc950b369a0352af1c44f8e501a662f0dbd7..3b23b3314b9f47a9d81a35f8331be47aa8cc6aed 100644 (file)
@@ -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);