diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index 0ab80de694a8cb..18ab62115b2e89 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);