diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-03-24 01:50:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-03-24 01:50:28 +0000 |
commit | cf7be39e245483b1f570a5032b1dd62d3c4555a9 (patch) | |
tree | bf4f2ba25343bf05efc476261d11fb62eaf8d832 /llvm/lib | |
parent | 5112157958438005095aff805853f9b14ba974eb (diff) | |
download | bcm5719-llvm-cf7be39e245483b1f570a5032b1dd62d3c4555a9.tar.gz bcm5719-llvm-cf7be39e245483b1f570a5032b1dd62d3c4555a9.zip |
dbg_value may end a block.
llvm-svn: 99378
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineCSE.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index 355acfcd46c..fc9dea8e827 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -118,14 +118,14 @@ bool MachineCSE::isPhysDefTriviallyDead(unsigned Reg, MachineBasicBlock::const_iterator E) { unsigned LookAheadLeft = 5; while (LookAheadLeft) { + // Skip over dbg_value's. + while (I != E && I->isDebugValue()) + ++I; + if (I == E) // Reached end of block, register is obviously dead. return true; - // Skip over dbg_value's. - while (I->isDebugValue()) - ++I; - bool SeenDef = false; for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) { const MachineOperand &MO = I->getOperand(i); |