[clang] d6d4569 - Fix MSVC "signed/unsigned mismatch" warnings. NFC.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 04:45:58 PDT 2024
Author: Simon Pilgrim
Date: 2024-10-28T11:45:36Z
New Revision: d6d4569dd90261bc8cdb3d1c3c2204cde1fe566f
URL: https://github.com/llvm/llvm-project/commit/d6d4569dd90261bc8cdb3d1c3c2204cde1fe566f
DIFF: https://github.com/llvm/llvm-project/commit/d6d4569dd90261bc8cdb3d1c3c2204cde1fe566f.diff
LOG: Fix MSVC "signed/unsigned mismatch" warnings. NFC.
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 911eec48bcb2fd..a57c95d5b96672 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -19055,7 +19055,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
Args.push_back(llvm::PoisonValue::get(IntTy));
for (unsigned I = 0; I != E->getNumArgs(); ++I) {
llvm::Value *V = EmitScalarOrConstFoldImmArg(ICEArguments, I, E);
- if (I <= !InsertOld && Size < 32) {
+ if (I <= (InsertOld ? 0u : 1u) && Size < 32) {
if (!DataTy->isIntegerTy())
V = Builder.CreateBitCast(
V, llvm::IntegerType::get(Builder.getContext(), Size));
More information about the cfe-commits
mailing list