summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-07-22 21:51:42 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-07-22 21:51:42 +0000
commitd2d52d1906b8105b3ad8ef393950be6088bcfc59 (patch)
tree827af98d6fce4fa78ed8da7fe6af07130f8c3203 /llvm/lib/CodeGen
parent5b9b066aebcb0892ac9d0265ac7b2e68429dad3f (diff)
downloadbcm5719-llvm-d2d52d1906b8105b3ad8ef393950be6088bcfc59.tar.gz
bcm5719-llvm-d2d52d1906b8105b3ad8ef393950be6088bcfc59.zip
Ignore undef uses.
llvm-svn: 76799
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterScavenging.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index 98f485045f6..972cf13a240 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud