Changes in directory llvm/lib/Transforms/Scalar:

LoopUnswitch.cpp updated: 1.23 -> 1.24
---
Log message:

fix a bug where we unswitched the wrong way


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

 LoopUnswitch.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.23 
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.24
--- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.23    Wed Feb 15 16:52:05 2006
+++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Feb 15 19:24:41 2006
@@ -197,9 +197,9 @@
     // side-effects.  If so, determine the value of Cond that causes it to do
     // this.
     if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(0)))) {
-      if (Val) *Val = ConstantBool::True;
-    } else if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(1)))) {
       if (Val) *Val = ConstantBool::False;
+    } else if ((LoopExitBB = isTrivialLoopExitBlock(L, BI->getSuccessor(1)))) {
+      if (Val) *Val = ConstantBool::True;
     }
   } else if (SwitchInst *SI = dyn_cast<SwitchInst>(HeaderTerm)) {
     // If this isn't a switch on Cond, we can't handle it.



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to