summaryrefslogtreecommitdiffstats
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
commita42c3147cce7292b9f000bfdc81232f44f143d24 (patch)
treef9fd69bd5f3b78fa7f519ee8915df484e6f6d658
parent401a4d72d5cf6cbb4845025cdd298d50e6cda5fa (diff)
downloadbcm5719-llvm-a42c3147cce7292b9f000bfdc81232f44f143d24.tar.gz
bcm5719-llvm-a42c3147cce7292b9f000bfdc81232f44f143d24.zip
Fix PR2028
llvm-svn: 47150
-rw-r--r--llvm/lib/Transforms/Scalar/LoopRotation.cpp4
-rw-r--r--llvm/test/Other/2008-02-14-PassManager.ll5
2 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
index 8581f9ead74..153f09563df 100644
--- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/llvm/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/llvm/test/Other/2008-02-14-PassManager.ll b/llvm/test/Other/2008-02-14-PassManager.ll
new file mode 100644
index 00000000000..985e1908ef0
--- /dev/null
+++ b/llvm/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;
+}
OpenPOWER on IntegriCloud