diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-07-22 21:51:42 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-07-22 21:51:42 +0000 |
commit | 474088a63f84f19eed2687c74605de0f70c99469 (patch) | |
tree | d755a6800d36d88b8f2f2c04ed59484cff5d4291 /lib/CodeGen/RegisterScavenging.cpp | |
parent | e24a8e4421ca8db64fb11281753dddbb8d098f49 (diff) | |
download | external_llvm-474088a63f84f19eed2687c74605de0f70c99469.zip external_llvm-474088a63f84f19eed2687c74605de0f70c99469.tar.gz external_llvm-474088a63f84f19eed2687c74605de0f70c99469.tar.bz2 |
Ignore undef uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r-- | lib/CodeGen/RegisterScavenging.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index 98f4850..972cf13 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -155,6 +155,9 @@ static bool isLiveInButUnusedBefore(unsigned Reg, MachineInstr *MI, SmallPtrSet<MachineInstr*, 4> UsesInMBB; for (MachineRegisterInfo::use_iterator UI = MRI->use_begin(Reg), UE = MRI->use_end(); UI != UE; ++UI) { + MachineOperand &UseMO = UI.getOperand(); + if (UseMO.isReg() && UseMO.isUndef()) + continue; MachineInstr *UseMI = &*UI; if (UseMI->getParent() == MBB) UsesInMBB.insert(UseMI); |