[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp

Nate Begeman natebegeman at mac.com
Sat Apr 9 16:35:16 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PPC32ISelPattern.cpp updated: 1.57 -> 1.58
---
Log message:

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


---
Diffs of the changes:  (+1 -1)

 PPC32ISelPattern.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.57 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.58
--- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.57	Sat Apr  9 16:23:24 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp	Sat Apr  9 18:35:05 2005
@@ -1000,7 +1000,7 @@
 
   // 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






More information about the llvm-commits mailing list