Skip to content

Commit 83e01ea

Browse files
committed
Fix MSVC signed/unsigned mismatch warning. NFC.
1 parent 4275da2 commit 83e01ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4473,7 +4473,7 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
44734473
ItinData->getOperandCycle(DefMCID.getSchedClass(), DefIdx);
44744474
int Adj = Subtarget.getPreISelOperandLatencyAdjustment();
44754475
int Threshold = 1 + Adj;
4476-
return !Latency || Latency <= Threshold ? 1 : *Latency - Adj;
4476+
return !Latency || Latency <= (unsigned)Threshold ? 1 : *Latency - Adj;
44774477
}
44784478

44794479
const MCInstrDesc &UseMCID = get(UseNode->getMachineOpcode());
@@ -4490,7 +4490,7 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
44904490
if (!Latency)
44914491
return std::nullopt;
44924492

4493-
if (Latency > 1 &&
4493+
if (Latency > 1U &&
44944494
(Subtarget.isCortexA8() || Subtarget.isLikeA9() ||
44954495
Subtarget.isCortexA7())) {
44964496
// FIXME: Shifter op hack: no shift (i.e. [r +/- r]) or [r + r << 2]
@@ -4519,7 +4519,7 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
45194519
break;
45204520
}
45214521
}
4522-
} else if (DefIdx == 0 && Latency > 2 && Subtarget.isSwift()) {
4522+
} else if (DefIdx == 0 && Latency > 2U && Subtarget.isSwift()) {
45234523
// FIXME: Properly handle all of the latency adjustments for address
45244524
// writeback.
45254525
switch (DefMCID.getOpcode()) {
@@ -4836,7 +4836,7 @@ bool ARMBaseInstrInfo::hasLowDefLatency(const TargetSchedModel &SchedModel,
48364836
unsigned DefClass = DefMI.getDesc().getSchedClass();
48374837
std::optional<unsigned> DefCycle =
48384838
ItinData->getOperandCycle(DefClass, DefIdx);
4839-
return DefCycle <= 2;
4839+
return DefCycle <= 2U;
48404840
}
48414841
return false;
48424842
}

0 commit comments

Comments
 (0)