aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-02-15 01:24:49 +0000
committerDevang Patel <dpatel@apple.com>2008-02-15 01:24:49 +0000
commit9d9b204d6a155f4778a9009c643eed5bf59148e2 (patch)
treeaf68747bcc11c40366c773c5178be148c9706a8f
parentb4c9a687eb8fd98f66ce04415f2fb6ca833e4d3a (diff)
downloadexternal_llvm-9d9b204d6a155f4778a9009c643eed5bf59148e2.zip
external_llvm-9d9b204d6a155f4778a9009c643eed5bf59148e2.tar.gz
external_llvm-9d9b204d6a155f4778a9009c643eed5bf59148e2.tar.bz2
Fix PR2028
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47150 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp4
-rw-r--r--test/Other/2008-02-14-PassManager.ll5
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp
index 8581f9e..153f095 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<ScalarEvolution>();
AU.addPreserved<LoopInfo>();
- AU.addRequiredID(LoopSimplifyID);
- AU.addPreservedID(LoopSimplifyID);
AU.addPreserved<DominatorTree>();
AU.addPreserved<DominanceFrontier>();
}
diff --git a/test/Other/2008-02-14-PassManager.ll b/test/Other/2008-02-14-PassManager.ll
new file mode 100644
index 0000000..985e190
--- /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;
+}