[llvm] c6f2d35 - Fix a build warning introduce by my febbf910
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 13:41:42 PST 2024
Author: Philip Reames
Date: 2024-11-27T13:41:29-08:00
New Revision: c6f2d35c4d698deff781366cea46e273ff508693
URL: https://github.com/llvm/llvm-project/commit/c6f2d35c4d698deff781366cea46e273ff508693
DIFF: https://github.com/llvm/llvm-project/commit/c6f2d35c4d698deff781366cea46e273ff508693.diff
LOG: Fix a build warning introduce by my febbf910
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 01d5f01f535e4d..78dc3cb27a6988 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -5161,14 +5161,14 @@ static SDValue lowerShuffleViaVRegSplitting(ShuffleVectorSDNode *SVN,
static bool isCompressMask(ArrayRef<int> Mask) {
int Last = -1;
bool SawUndef = false;
- for (int i = 0; i < Mask.size(); i++) {
+ for (unsigned i = 0; i < Mask.size(); i++) {
if (Mask[i] == -1) {
SawUndef = true;
continue;
}
if (SawUndef)
return false;
- if (i > Mask[i])
+ if (i > (unsigned)Mask[i])
return false;
if (Mask[i] <= Last)
return false;
More information about the llvm-commits
mailing list