aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-09-11 15:32:03 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-09-11 15:32:03 +0100
commit48b510c4bc0fe090e635ee0440e46fc176527d7e (patch)
tree17547febf183273e0bc430068aef295d524e1dc2 /llvm/lib/Analysis/VectorUtils.cpp
parent4d12d6149ced575be5386889b27f3bb1891052ab (diff)
downloadllvm-48b510c4bc0fe090e635ee0440e46fc176527d7e.zip
llvm-48b510c4bc0fe090e635ee0440e46fc176527d7e.tar.gz
llvm-48b510c4bc0fe090e635ee0440e46fc176527d7e.tar.bz2
[NFC] Fix compiler warnings due to integer comparison of different signedness
Fix by directly using INT_MAX and INT32_MAX. Patch by: @nullptr.cpp (Yang Fan) Differential Revision: https://reviews.llvm.org/D87347
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index 0b10983..34fa0f2 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -416,8 +416,7 @@ void llvm::narrowShuffleMaskElts(int Scale, ArrayRef<int> Mask,
ScaledMask.clear();
for (int MaskElt : Mask) {
if (MaskElt >= 0) {
- assert(((uint64_t)Scale * MaskElt + (Scale - 1)) <=
- std::numeric_limits<int32_t>::max() &&
+ assert(((uint64_t)Scale * MaskElt + (Scale - 1)) <= INT32_MAX &&
"Overflowed 32-bits");
}
for (int SliceElt = 0; SliceElt != Scale; ++SliceElt)