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 | ff63c6848deeff6ddb414d654532a14b2b38b673 (patch) | |
| tree | 1957e1b4ad2a197e452f0598c921ebea322e7494 /lib/CodeGen | |
| parent | fc0036120cbfae4edfa372c36fb05f2756f5f0ee (diff) | |
| download | external_llvm-ff63c6848deeff6ddb414d654532a14b2b38b673.zip external_llvm-ff63c6848deeff6ddb414d654532a14b2b38b673.tar.gz external_llvm-ff63c6848deeff6ddb414d654532a14b2b38b673.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/CodeGen')
| -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. |
