diff options
| author | Nate Begeman <natebegeman@mac.com> | 2005-04-09 23:35:05 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2005-04-09 23:35:05 +0000 |
| commit | 2121a54868135daca12c6ad49df7955e9955a1ef (patch) | |
| tree | 51bd31447b0b9921837258c3e482cd6d8338da47 | |
| parent | 228fed92e67cc4a63d237c3da650584b27296c36 (diff) | |
| download | bcm5719-llvm-2121a54868135daca12c6ad49df7955e9955a1ef.tar.gz bcm5719-llvm-2121a54868135daca12c6ad49df7955e9955a1ef.zip | |
fix ISD::BRCONDTWOWAY codegen to not deference the end() iterator
llvm-svn: 21193
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp b/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp index 44e041a8ba5..02ad4e4ad4b 100644 --- a/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp +++ b/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp @@ -1000,7 +1000,7 @@ void ISel::SelectBranchCC(SDOperand N) // Iterate to the next basic block, unless we're already at the end of the ilist<MachineBasicBlock>::iterator It = BB, E = BB->getParent()->end(); - if (It != E) ++It; + if (++It == E) It = BB; // If this is a two way branch, then grab the fallthrough basic block argument // and build a PowerPC branch pseudo-op, suitable for long branch conversion |

