From 276e728e4b63e24606d22ddddc8c21866be44394 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 12 Jun 2006 21:49:21 +0000 Subject: [PATCH] Reapply my 6/9 changes. The bug Evan saw no longer occurs. llvm-svn: 28759 --- lib/Transforms/Scalar/LoopUnswitch.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index c583eea14d6..79243a4385b 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -73,6 +73,8 @@ namespace { AU.addPreservedID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); + 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; }