mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-05 11:17:53 +00:00
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:
@@ -235,7 +235,7 @@ static unsigned calcDistanceToUse(MachineBasicBlock *MBB,
|
|||||||
I = next(I);
|
I = next(I);
|
||||||
while (I != MBB->end()) {
|
while (I != MBB->end()) {
|
||||||
Dist++;
|
Dist++;
|
||||||
if (I->findRegisterUseOperand(Reg))
|
if (I->findRegisterUseOperand(Reg) != -1)
|
||||||
return Dist;
|
return Dist;
|
||||||
I = next(I);
|
I = next(I);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user