diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-06 09:22:29 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-06 09:22:29 +0000 | 
| commit | f5a3459adfde823bc7617f8ecfdd9fbc5a1ffadf (patch) | |
| tree | 542734eaa7870f95912cbaebccb87dbec0c20b4f /lib/CodeGen/TwoAddressInstructionPass.cpp | |
| parent | 67a71b3184ce20a901e874d0ee25e01397dd87ef (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
| -rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 9 | 
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 0ba38433c220b..c840b3968cd3c 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -454,13 +454,10 @@ MachineInstr *findOnlyInterestingUse(unsigned Reg, MachineBasicBlock *MBB,                                       const TargetInstrInfo *TII,                                       bool &IsCopy,                                       unsigned &DstReg, bool &IsDstPhys) { -  MachineRegisterInfo::use_nodbg_iterator UI = MRI->use_nodbg_begin(Reg); -  if (UI == MRI->use_nodbg_end()) -    return 0; -  MachineInstr &UseMI = *UI; -  if (++UI != MRI->use_nodbg_end()) -    // More than one use. +  if (!MRI->hasOneNonDBGUse(Reg)) +    // None or more than one use.      return 0; +  MachineInstr &UseMI = *MRI->use_nodbg_begin(Reg);    if (UseMI.getParent() != MBB)      return 0;    unsigned SrcReg;  | 
