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 | 49dd9f16a9a2191f2f343e1c48db03502a950e9f (patch) | |
| tree | 1fbdb51923ce5da602a4b090bab6cb48bc5dd7b1 /llvm/lib | |
| parent | 595cf9ff81ebef21f73e0f0c479451d97809fe65 (diff) | |
| download | bcm5719-llvm-49dd9f16a9a2191f2f343e1c48db03502a950e9f.tar.gz bcm5719-llvm-49dd9f16a9a2191f2f343e1c48db03502a950e9f.zip | |
Don't dereference MBB->end().
llvm-svn: 49043
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/StrongPHIElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index 0c785367168..f89d9f2f2e8 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/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. |

