From: Evan Cheng Date: Tue, 3 Apr 2007 06:43:29 +0000 (+0000) Subject: Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=595b6d121cbbae3f58e508ae928b4ed917e686b6;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index 06368639b8c..13a36199195 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -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); }