diff options
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 18f8c00..3254ec0 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -549,7 +549,7 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, MachineBasicBlock::iterator KillInst = opBlock.end(); for (MachineBasicBlock::iterator Term = InsertPos; Term != opBlock.end(); ++Term) { - if (Term->readsRegister(SrcReg)) + if (Term->readsRegister(SrcReg, /*TRI=*/nullptr)) KillInst = Term; } @@ -563,7 +563,7 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, --KillInst; if (KillInst->isDebugInstr()) continue; - if (KillInst->readsRegister(SrcReg)) + if (KillInst->readsRegister(SrcReg, /*TRI=*/nullptr)) break; } } else { @@ -571,7 +571,8 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, KillInst = NewSrcInstr; } } - assert(KillInst->readsRegister(SrcReg) && "Cannot find kill instruction"); + assert(KillInst->readsRegister(SrcReg, /*TRI=*/nullptr) && + "Cannot find kill instruction"); // Finally, mark it killed. LV->addVirtualRegisterKilled(SrcReg, *KillInst); @@ -607,7 +608,7 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, MachineBasicBlock::iterator KillInst = opBlock.end(); for (MachineBasicBlock::iterator Term = InsertPos; Term != opBlock.end(); ++Term) { - if (Term->readsRegister(SrcReg)) + if (Term->readsRegister(SrcReg, /*TRI=*/nullptr)) KillInst = Term; } @@ -621,7 +622,7 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, --KillInst; if (KillInst->isDebugInstr()) continue; - if (KillInst->readsRegister(SrcReg)) + if (KillInst->readsRegister(SrcReg, /*TRI=*/nullptr)) break; } } else { @@ -629,7 +630,7 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, KillInst = std::prev(InsertPos); } } - assert(KillInst->readsRegister(SrcReg) && + assert(KillInst->readsRegister(SrcReg, /*TRI=*/nullptr) && "Cannot find kill instruction"); SlotIndex LastUseIndex = LIS->getInstructionIndex(*KillInst); |