[llvm] 6c5e967 - Fix MSVC signed/unsigned mismatch warning. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 10:34:25 PST 2023


Author: Simon Pilgrim
Date: 2023-12-01T18:34:01Z
New Revision: 6c5e967f5d19ccefe6cf7700ac3998b80d19f202

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

LOG: Fix MSVC signed/unsigned mismatch warning. NFC.

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetInstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp
index fbb7c81fa1f86f7..b88bb9a8a0c418b 100644
--- a/llvm/lib/CodeGen/TargetInstrInfo.cpp
+++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp
@@ -1463,7 +1463,7 @@ bool TargetInstrInfo::hasLowDefLatency(const TargetSchedModel &SchedModel,
   unsigned DefClass = DefMI.getDesc().getSchedClass();
   std::optional<unsigned> DefCycle =
       ItinData->getOperandCycle(DefClass, DefIdx);
-  return DefCycle <= 1;
+  return DefCycle <= 1U;
 }
 
 bool TargetInstrInfo::isFunctionSafeToSplit(const MachineFunction &MF) const {


        


More information about the llvm-commits mailing list