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

llvm-svn: 35618
This commit is contained in:
Evan Cheng 2007-04-03 06:43:29 +00:00
parent a2eabd50c0
commit bad40843ec

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);
}