[llvm] eeb8c20 - [X86] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 07:36:58 PST 2025
Author: Kazu Hirata
Date: 2025-02-26T07:36:51-08:00
New Revision: eeb8c2085fb96dbb59446ba1d142803b12a43e18
URL: https://github.com/llvm/llvm-project/commit/eeb8c2085fb96dbb59446ba1d142803b12a43e18
DIFF: https://github.com/llvm/llvm-project/commit/eeb8c2085fb96dbb59446ba1d142803b12a43e18.diff
LOG: [X86] Fix a warning
This patch fixes:
llvm/lib/Target/X86/X86ISelLowering.cpp:47257:15: error: comparison
of integers of different signs: 'int' and 'size_t' (aka 'unsigned
long') [-Werror,-Wsign-compare]
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 56985e28e0637..9a259fef719f5 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -47254,7 +47254,7 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
for (auto [I, M] : enumerate(ByteMask)) {
// getConstVector sets negative shuffle mask values as undef, so ensure
// we hardcode SM_SentinelZero values to zero (0x80).
- if (M < ByteMask.size()) {
+ if (M < (int)ByteMask.size()) {
LHSMask[I] = isUndefOrZero(LHSMask[I]) ? 0x80 : LHSMask[I];
RHSMask[I] = 0x80;
} else {
More information about the llvm-commits
mailing list