1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

fix ISD::BRCONDTWOWAY codegen to not deference the end() iterator

llvm-svn: 21193
This commit is contained in:
Nate Begeman 2005-04-09 23:35:05 +00:00
parent 17c60891c1
commit a2374d39df

View File

@ -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