Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit d378e71

Browse files
committed
Fix "comparison of unsigned expression >= 0 is always true" warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351816 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 928b0fd commit d378e71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Target/X86/X86InstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ MachineInstr *X86InstrInfo::commuteInstructionImpl(MachineInstr &MI, bool NewMI,
15821582
if (DstIdx == SrcIdx && (ZMask & (1 << DstIdx)) == 0 &&
15831583
countPopulation(ZMask) == 2) {
15841584
unsigned AltIdx = findFirstSet((ZMask | (1 << DstIdx)) ^ 15);
1585-
assert(0 <= AltIdx && AltIdx < 4 && "Illegal insertion index");
1585+
assert(AltIdx < 4 && "Illegal insertion index");
15861586
unsigned AltImm = (AltIdx << 6) | (AltIdx << 4) | ZMask;
15871587
auto &WorkingMI = cloneIfNew(MI);
15881588
WorkingMI.getOperand(MI.getNumOperands() - 1).setImm(AltImm);

0 commit comments

Comments
 (0)