diff options
author | Owen Anderson <resistor@mac.com> | 2008-04-01 18:05:08 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-04-01 18:05:08 +0000 |
commit | 78216bc9f89ee819f325f79eebdc9d6365cd80ed (patch) | |
tree | 1957e1b4ad2a197e452f0598c921ebea322e7494 /lib | |
parent | 038112a4e0a9afd656f415ab397a230ae5921627 (diff) | |
download | external_llvm-78216bc9f89ee819f325f79eebdc9d6365cd80ed.zip external_llvm-78216bc9f89ee819f325f79eebdc9d6365cd80ed.tar.gz external_llvm-78216bc9f89ee819f325f79eebdc9d6365cd80ed.tar.bz2 |
Don't dereference MBB->end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 0c78536..f89d9f2 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -408,7 +408,7 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) { // Iterate over all the PHI nodes in this block MachineBasicBlock::iterator P = MBB->begin(); - while (P->getOpcode() == TargetInstrInfo::PHI) { + while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) { unsigned DestReg = P->getOperand(0).getReg(); // Don't both doing PHI elimination for dead PHI's. |