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 | 2250425d6e44558f9d333a5c7faef33744f561d6 (patch) | |
tree | cbb7de89b3b4110f43633cfdd083d85939313ddb /lib/CodeGen/MachineCSE.cpp | |
parent | b7ba5781e61099368499502636667be801945235 (diff) |
dbg_value may end a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineCSE.cpp')
-rw-r--r-- | lib/CodeGen/MachineCSE.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp index 355acfcd46..fc9dea8e82 100644 --- a/lib/CodeGen/MachineCSE.cpp +++ b/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); |