Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-04-03 06:43:29 +00:00
parent c9c9d2d554
commit 595b6d121c

View File

@ -235,7 +235,7 @@ static unsigned calcDistanceToUse(MachineBasicBlock *MBB,
I = next(I);
while (I != MBB->end()) {
Dist++;
if (I->findRegisterUseOperand(Reg))
if (I->findRegisterUseOperand(Reg) != -1)
return Dist;
I = next(I);
}