diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 8581f9ead74..153f09563df 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -56,12 +56,12 @@ namespace { // LCSSA form makes instruction renaming easier. virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(LoopSimplifyID); + AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); AU.addPreserved(); AU.addPreserved(); - AU.addRequiredID(LoopSimplifyID); - AU.addPreservedID(LoopSimplifyID); AU.addPreserved(); AU.addPreserved(); } diff --git a/test/Other/2008-02-14-PassManager.ll b/test/Other/2008-02-14-PassManager.ll new file mode 100644 index 00000000000..985e1908ef0 --- /dev/null +++ b/test/Other/2008-02-14-PassManager.ll @@ -0,0 +1,5 @@ +; RUN: llvm-as < %s | opt -loop-unroll -loop-rotate -simplifycfg -disable-output +; PR 2028 +define i32 @test1() { + ret i32 0; +}