[llvm] bc98076 - Silence MSVC signed/unsigned comparison warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 09:20:22 PDT 2021


Author: Simon Pilgrim
Date: 2021-04-20T17:20:13+01:00
New Revision: bc98076ff6dc301bc345a7ec307c7a9abea4313c

URL: https://github.com/llvm/llvm-project/commit/bc98076ff6dc301bc345a7ec307c7a9abea4313c
DIFF: https://github.com/llvm/llvm-project/commit/bc98076ff6dc301bc345a7ec307c7a9abea4313c.diff

LOG: Silence MSVC signed/unsigned comparison warning. NFCI.

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 0ab80de694a8..18ab62115b2e 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -4848,7 +4848,7 @@ LegalizerHelper::narrowScalarFPTOI(MachineInstr &MI, unsigned TypeIdx,
   // out the result type. This is practically only useful for conversions from
   // half to at least 16-bits, so just handle the one case.
   if (SrcTy.getScalarType() != LLT::scalar(16) ||
-      NarrowTy.getScalarSizeInBits() < (IsSigned ? 17 : 16))
+      NarrowTy.getScalarSizeInBits() < (IsSigned ? 17u : 16u))
     return UnableToLegalize;
 
   Observer.changingInstr(MI);


        


More information about the llvm-commits mailing list