[llvm] bfb6bb6 - [AMDGPU] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 22:40:14 PST 2025
Author: Kazu Hirata
Date: 2025-01-16T22:40:08-08:00
New Revision: bfb6bb69fde1071aa60f7c5a6d8cda1604809bee
URL: https://github.com/llvm/llvm-project/commit/bfb6bb69fde1071aa60f7c5a6d8cda1604809bee
DIFF: https://github.com/llvm/llvm-project/commit/bfb6bb69fde1071aa60f7c5a6d8cda1604809bee.diff
LOG: [AMDGPU] Fix a warning
This patch fixes:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp:13908:46: error:
comparison of integers of different signs: 'uint32_t' (aka 'unsigned
int') and 'int' [-Werror,-Wsign-compare]
Added:
Modified:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 4d932cd6582506..e068b5f0b8769b 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -13905,7 +13905,7 @@ static SDValue tryFoldMADwithSRL(SelectionDAG &DAG, const SDLoc &SL,
return SDValue();
ConstantSDNode *Const = dyn_cast<ConstantSDNode>(MulRHS.getNode());
- if (!Const || Hi_32(Const->getZExtValue()) != -1)
+ if (!Const || Hi_32(Const->getZExtValue()) != uint32_t(-1))
return SDValue();
SDValue ConstMul =
More information about the llvm-commits
mailing list