From fcaf345c88bc19d0ef96bfa1eaa411cb725250ed Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 9 Jun 2006 18:40:32 +0000 Subject: [PATCH] Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves LCSSA. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28739 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopUnswitch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index c583eea14d6..ab736c1de87 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: @@ -199,6 +201,8 @@ bool LoopUnswitch::visitLoop(Loop *L) { } } + assert(L->isLCSSAForm()); + return Changed; }