summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2006-06-12 21:49:21 +0000
committerOwen Anderson <resistor@mac.com>2006-06-12 21:49:21 +0000
commitfd0a3d6e5cf5af8d75d9f5290fa2a047a46aed01 (patch)
treedcfba8f655ad379357aa798d817a81cac468d6fd /llvm/lib/Transforms
parentb5c9d7a0afbe1e2f4f08469888022ce518e81d50 (diff)
downloadbcm5719-llvm-fd0a3d6e5cf5af8d75d9f5290fa2a047a46aed01.tar.gz
bcm5719-llvm-fd0a3d6e5cf5af8d75d9f5290fa2a047a46aed01.zip
Reapply my 6/9 changes. The bug Evan saw no longer occurs.
llvm-svn: 28759
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnswitch.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index c583eea14d6..79243a4385b 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -73,6 +73,8 @@ namespace {
AU.addPreservedID(LoopSimplifyID);
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
+ AU.addRequiredID(LCSSAID);
+ AU.addPreservedID(LCSSAID);
}
private:
@@ -154,6 +156,8 @@ static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed) {
}
bool LoopUnswitch::visitLoop(Loop *L) {
+ assert(L->isLCSSAForm());
+
bool Changed = false;
// Loop over all of the basic blocks in the loop. If we find an interior
@@ -198,7 +202,9 @@ bool LoopUnswitch::visitLoop(Loop *L) {
}
}
}
-
+
+ assert(L->isLCSSAForm());
+
return Changed;
}
OpenPOWER on IntegriCloud