rename *.llx -> *.ll, last batch.
authorChris Lattner <sabre@nondot.org>
Sat, 19 Apr 2008 22:32:52 +0000 (22:32 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 19 Apr 2008 22:32:52 +0000 (22:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49971 91177308-0d34-0410-b5e6-96231b3b80d8

92 files changed:
test/Analysis/BasicAA/2004-01-29-InvariantMemory.ll [new file with mode: 0644]
test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx [deleted file]
test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll [new file with mode: 0644]
test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx [deleted file]
test/ExecutionEngine/2003-05-06-LivenessClobber.ll [new file with mode: 0644]
test/ExecutionEngine/2003-05-06-LivenessClobber.llx [deleted file]
test/ExecutionEngine/2003-05-07-ArgumentTest.ll [new file with mode: 0644]
test/ExecutionEngine/2003-05-07-ArgumentTest.llx [deleted file]
test/Transforms/ADCE/2003-12-19-MergeReturn.ll [new file with mode: 0644]
test/Transforms/ADCE/2003-12-19-MergeReturn.llx [deleted file]
test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll [new file with mode: 0644]
test/Transforms/ADCE/2004-05-04-UnreachableBlock.llx [deleted file]
test/Transforms/DeadStoreElimination/alloca.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/alloca.llx [deleted file]
test/Transforms/DeadStoreElimination/context-sensitive.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/context-sensitive.llx [deleted file]
test/Transforms/DeadStoreElimination/free.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/free.llx [deleted file]
test/Transforms/DeadStoreElimination/simple.ll [new file with mode: 0644]
test/Transforms/DeadStoreElimination/simple.llx [deleted file]
test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.llx [deleted file]
test/Transforms/GlobalOpt/basictest.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/basictest.llx [deleted file]
test/Transforms/GlobalOpt/deadglobal.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/deadglobal.llx [deleted file]
test/Transforms/GlobalOpt/globalsra-partial.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/globalsra-partial.llx [deleted file]
test/Transforms/GlobalOpt/globalsra.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/globalsra.llx [deleted file]
test/Transforms/GlobalOpt/iterate.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/iterate.llx [deleted file]
test/Transforms/GlobalOpt/load-store-global.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/load-store-global.llx [deleted file]
test/Transforms/GlobalOpt/malloc-promote-1.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/malloc-promote-1.llx [deleted file]
test/Transforms/GlobalOpt/malloc-promote-2.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/malloc-promote-2.llx [deleted file]
test/Transforms/GlobalOpt/malloc-promote-3.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/malloc-promote-3.llx [deleted file]
test/Transforms/GlobalOpt/phi-select.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/phi-select.llx [deleted file]
test/Transforms/GlobalOpt/storepointer-compare.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/storepointer-compare.llx [deleted file]
test/Transforms/GlobalOpt/storepointer.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/storepointer.llx [deleted file]
test/Transforms/GlobalOpt/trivialstore.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/trivialstore.llx [deleted file]
test/Transforms/GlobalOpt/undef-init.ll [new file with mode: 0644]
test/Transforms/GlobalOpt/undef-init.llx [deleted file]
test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx [deleted file]
test/Transforms/IndVarsSimplify/2003-12-15-Crash.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/2003-12-15-Crash.llx [deleted file]
test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.llx [deleted file]
test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.llx [deleted file]
test/Transforms/IndVarsSimplify/exit_value_tests.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/exit_value_tests.llx [deleted file]
test/Transforms/IndVarsSimplify/lftr_simple.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/lftr_simple.llx [deleted file]
test/Transforms/IndVarsSimplify/tripcount_compute.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/tripcount_compute.llx [deleted file]
test/Transforms/IndVarsSimplify/tripcount_infinite.ll [new file with mode: 0644]
test/Transforms/IndVarsSimplify/tripcount_infinite.llx [deleted file]
test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll [new file with mode: 0644]
test/Transforms/Inline/2004-04-20-InlineLinkOnce.llx [deleted file]
test/Transforms/InstCombine/2004-08-09-RemInfLoop.ll [new file with mode: 0644]
test/Transforms/InstCombine/2004-08-09-RemInfLoop.llx [deleted file]
test/Transforms/InstCombine/2004-09-20-BadLoadCombine.ll [new file with mode: 0644]
test/Transforms/InstCombine/2004-09-20-BadLoadCombine.llx [deleted file]
test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll [new file with mode: 0644]
test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.llx [deleted file]
test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.ll [new file with mode: 0644]
test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.llx [deleted file]
test/Transforms/InstCombine/CPP_min_max.ll [new file with mode: 0644]
test/Transforms/InstCombine/CPP_min_max.llx [deleted file]
test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.ll [new file with mode: 0644]
test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx [deleted file]
test/Transforms/LowerInvoke/2003-12-10-Crash.ll [new file with mode: 0644]
test/Transforms/LowerInvoke/2003-12-10-Crash.llx [deleted file]
test/Transforms/LowerInvoke/2004-02-29-PHICrash.ll [new file with mode: 0644]
test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx [deleted file]
test/Transforms/PruneEH/2003-09-14-ExternalCall.ll [new file with mode: 0644]
test/Transforms/PruneEH/2003-09-14-ExternalCall.llx [deleted file]
test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll [new file with mode: 0644]
test/Transforms/PruneEH/2003-11-21-PHIUpdate.llx [deleted file]
test/Transforms/PruneEH/recursivetest.ll [new file with mode: 0644]
test/Transforms/PruneEH/recursivetest.llx [deleted file]
test/Transforms/TailDup/2004-04-01-DemoteRegToStack.ll [new file with mode: 0644]
test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx [deleted file]

diff --git a/test/Analysis/BasicAA/2004-01-29-InvariantMemory.ll b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.ll
new file mode 100644 (file)
index 0000000..692c6f8
--- /dev/null
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | \
+; RUN:    llvm-dis | not grep load
+
+@X = constant [2 x i32] [i32 4, i32 5]
+
+define i32 @test(i32* %Y, i64 %idx) {
+    %P = getelementptr [2 x i32]* @X, i64 0, i64 %idx
+       %A = load i32* %P      ; Load from invariant memory
+       store i32 4, i32* %Y   ; Store could not be to @X
+       %B = load i32* %P
+       %C = sub i32 %A, %B
+       ret i32 %C
+}
diff --git a/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx b/test/Analysis/BasicAA/2004-01-29-InvariantMemory.llx
deleted file mode 100644 (file)
index 692c6f8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | \
-; RUN:    llvm-dis | not grep load
-
-@X = constant [2 x i32] [i32 4, i32 5]
-
-define i32 @test(i32* %Y, i64 %idx) {
-    %P = getelementptr [2 x i32]* @X, i64 0, i64 %idx
-       %A = load i32* %P      ; Load from invariant memory
-       store i32 4, i32* %Y   ; Store could not be to @X
-       %B = load i32* %P
-       %C = sub i32 %A, %B
-       ret i32 %C
-}
diff --git a/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll b/test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll
new file mode 100644 (file)
index 0000000..407932c
--- /dev/null
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | grep {store i32 0}
+
+define void @test({i32,i32 }* %P) {
+       %Q = getelementptr {i32,i32}* %P, i32 1
+       %X = getelementptr {i32,i32}* %Q, i32 0, i32 1
+       %Y = getelementptr {i32,i32}* %Q, i32 1, i32 1
+       store i32 0, i32* %X
+       store i32 1, i32* %Y
+       ret void
+}
diff --git a/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx b/test/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
deleted file mode 100644 (file)
index 407932c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: llvm-as < %s | opt -dse | llvm-dis | grep {store i32 0}
-
-define void @test({i32,i32 }* %P) {
-       %Q = getelementptr {i32,i32}* %P, i32 1
-       %X = getelementptr {i32,i32}* %Q, i32 0, i32 1
-       %Y = getelementptr {i32,i32}* %Q, i32 1, i32 1
-       store i32 0, i32* %X
-       store i32 1, i32* %Y
-       ret void
-}
diff --git a/test/ExecutionEngine/2003-05-06-LivenessClobber.ll b/test/ExecutionEngine/2003-05-06-LivenessClobber.ll
new file mode 100644 (file)
index 0000000..57fe95b
--- /dev/null
@@ -0,0 +1,19 @@
+; This testcase shoudl return with an exit code of 1.
+;
+; RUN: llvm-as < %s | not lli
+
+@test = global i64 0           ; <i64*> [#uses=1]
+
+define internal i64 @test.upgrd.1() {
+       %tmp.0 = load i64* @test                ; <i64> [#uses=1]
+       %tmp.1 = add i64 %tmp.0, 1              ; <i64> [#uses=1]
+       ret i64 %tmp.1
+}
+
+define i32 @main() {
+       %L = call i64 @test.upgrd.1( )          ; <i64> [#uses=1]
+       %I = trunc i64 %L to i32                ; <i32> [#uses=1]
+       ret i32 %I
+}
+
+
diff --git a/test/ExecutionEngine/2003-05-06-LivenessClobber.llx b/test/ExecutionEngine/2003-05-06-LivenessClobber.llx
deleted file mode 100644 (file)
index 57fe95b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-; This testcase shoudl return with an exit code of 1.
-;
-; RUN: llvm-as < %s | not lli
-
-@test = global i64 0           ; <i64*> [#uses=1]
-
-define internal i64 @test.upgrd.1() {
-       %tmp.0 = load i64* @test                ; <i64> [#uses=1]
-       %tmp.1 = add i64 %tmp.0, 1              ; <i64> [#uses=1]
-       ret i64 %tmp.1
-}
-
-define i32 @main() {
-       %L = call i64 @test.upgrd.1( )          ; <i64> [#uses=1]
-       %I = trunc i64 %L to i32                ; <i32> [#uses=1]
-       ret i32 %I
-}
-
-
diff --git a/test/ExecutionEngine/2003-05-07-ArgumentTest.ll b/test/ExecutionEngine/2003-05-07-ArgumentTest.ll
new file mode 100644 (file)
index 0000000..fa15d71
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | lli - test
+
+declare i32 @puts(i8*)
+
+define i32 @main(i32 %argc.1, i8** %argv.1) {
+       %tmp.5 = getelementptr i8** %argv.1, i64 1              ; <i8**> [#uses=1]
+       %tmp.6 = load i8** %tmp.5               ; <i8*> [#uses=1]
+       %tmp.0 = call i32 @puts( i8* %tmp.6 )           ; <i32> [#uses=0]
+       ret i32 0
+}
+
diff --git a/test/ExecutionEngine/2003-05-07-ArgumentTest.llx b/test/ExecutionEngine/2003-05-07-ArgumentTest.llx
deleted file mode 100644 (file)
index fa15d71..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llvm-as < %s | lli - test
-
-declare i32 @puts(i8*)
-
-define i32 @main(i32 %argc.1, i8** %argv.1) {
-       %tmp.5 = getelementptr i8** %argv.1, i64 1              ; <i8**> [#uses=1]
-       %tmp.6 = load i8** %tmp.5               ; <i8*> [#uses=1]
-       %tmp.0 = call i32 @puts( i8* %tmp.6 )           ; <i32> [#uses=0]
-       ret i32 0
-}
-
diff --git a/test/Transforms/ADCE/2003-12-19-MergeReturn.ll b/test/Transforms/ADCE/2003-12-19-MergeReturn.ll
new file mode 100644 (file)
index 0000000..b2c294b
--- /dev/null
@@ -0,0 +1,27 @@
+; This testcase was failing because without merging the return blocks, ADCE
+; didn't know that it could get rid of the then.0 block.
+
+; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep load
+
+
+define void @main(i32 %argc, i8** %argv) {
+entry:
+        call void @__main( )
+        %tmp.1 = icmp ule i32 %argc, 5          ; <i1> [#uses=1]
+        br i1 %tmp.1, label %then.0, label %return
+
+then.0:         ; preds = %entry
+        %tmp.8 = load i8** %argv                ; <i8*> [#uses=1]
+        %tmp.10 = load i8* %tmp.8               ; <i8> [#uses=1]
+        %tmp.11 = icmp eq i8 %tmp.10, 98                ; <i1> [#uses=1]
+        br i1 %tmp.11, label %then.1, label %return
+
+then.1:         ; preds = %then.0
+        ret void
+
+return:         ; preds = %then.0, %entry
+        ret void
+}
+
+declare void @__main()
+
diff --git a/test/Transforms/ADCE/2003-12-19-MergeReturn.llx b/test/Transforms/ADCE/2003-12-19-MergeReturn.llx
deleted file mode 100644 (file)
index b2c294b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-; This testcase was failing because without merging the return blocks, ADCE
-; didn't know that it could get rid of the then.0 block.
-
-; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep load
-
-
-define void @main(i32 %argc, i8** %argv) {
-entry:
-        call void @__main( )
-        %tmp.1 = icmp ule i32 %argc, 5          ; <i1> [#uses=1]
-        br i1 %tmp.1, label %then.0, label %return
-
-then.0:         ; preds = %entry
-        %tmp.8 = load i8** %argv                ; <i8*> [#uses=1]
-        %tmp.10 = load i8* %tmp.8               ; <i8> [#uses=1]
-        %tmp.11 = icmp eq i8 %tmp.10, 98                ; <i1> [#uses=1]
-        br i1 %tmp.11, label %then.1, label %return
-
-then.1:         ; preds = %then.0
-        ret void
-
-return:         ; preds = %then.0, %entry
-        ret void
-}
-
-declare void @__main()
-
diff --git a/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll b/test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll
new file mode 100644 (file)
index 0000000..87a1550
--- /dev/null
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | opt -adce -disable-output
+
+define void @test() {
+entry:
+        br label %UnifiedReturnBlock
+
+UnifiedReturnBlock:             ; preds = %invoke_catch.0, %entry
+        ret void
+
+invoke_catch.0:         ; No predecessors!
+        br i1 false, label %UnifiedUnwindBlock, label %UnifiedReturnBlock
+
+UnifiedUnwindBlock:             ; preds = %invoke_catch.0
+        unwind
+}
+
diff --git a/test/Transforms/ADCE/2004-05-04-UnreachableBlock.llx b/test/Transforms/ADCE/2004-05-04-UnreachableBlock.llx
deleted file mode 100644 (file)
index 87a1550..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-; RUN: llvm-as < %s | opt -adce -disable-output
-
-define void @test() {
-entry:
-        br label %UnifiedReturnBlock
-
-UnifiedReturnBlock:             ; preds = %invoke_catch.0, %entry
-        ret void
-
-invoke_catch.0:         ; No predecessors!
-        br i1 false, label %UnifiedUnwindBlock, label %UnifiedReturnBlock
-
-UnifiedUnwindBlock:             ; preds = %invoke_catch.0
-        unwind
-}
-
diff --git a/test/Transforms/DeadStoreElimination/alloca.ll b/test/Transforms/DeadStoreElimination/alloca.ll
new file mode 100644 (file)
index 0000000..7a2c94f
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+
+define void @test(i32* %Q) {
+        %P = alloca i32         ; <i32*> [#uses=1]
+        %DEAD = load i32* %Q            ; <i32> [#uses=1]
+        store i32 %DEAD, i32* %P
+        ret void
+}
+
diff --git a/test/Transforms/DeadStoreElimination/alloca.llx b/test/Transforms/DeadStoreElimination/alloca.llx
deleted file mode 100644 (file)
index 7a2c94f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
-
-define void @test(i32* %Q) {
-        %P = alloca i32         ; <i32*> [#uses=1]
-        %DEAD = load i32* %Q            ; <i32> [#uses=1]
-        store i32 %DEAD, i32* %P
-        ret void
-}
-
diff --git a/test/Transforms/DeadStoreElimination/context-sensitive.ll b/test/Transforms/DeadStoreElimination/context-sensitive.ll
new file mode 100644 (file)
index 0000000..266fdbc
--- /dev/null
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+
+declare void @ext()
+
+define i32* @caller() {
+        %P = malloc i32         ; <i32*> [#uses=4]
+        %DEAD = load i32* %P            ; <i32> [#uses=1]
+        %DEAD2 = add i32 %DEAD, 1               ; <i32> [#uses=1]
+        store i32 %DEAD2, i32* %P
+        call void @ext( )
+        store i32 0, i32* %P
+        ret i32* %P
+}
+
diff --git a/test/Transforms/DeadStoreElimination/context-sensitive.llx b/test/Transforms/DeadStoreElimination/context-sensitive.llx
deleted file mode 100644 (file)
index 266fdbc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
-
-declare void @ext()
-
-define i32* @caller() {
-        %P = malloc i32         ; <i32*> [#uses=4]
-        %DEAD = load i32* %P            ; <i32> [#uses=1]
-        %DEAD2 = add i32 %DEAD, 1               ; <i32> [#uses=1]
-        store i32 %DEAD2, i32* %P
-        call void @ext( )
-        store i32 0, i32* %P
-        ret i32* %P
-}
-
diff --git a/test/Transforms/DeadStoreElimination/free.ll b/test/Transforms/DeadStoreElimination/free.ll
new file mode 100644 (file)
index 0000000..e0611d3
--- /dev/null
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+
+define void @test(i32* %Q, i32* %P) {
+        %DEAD = load i32* %Q            ; <i32> [#uses=1]
+        store i32 %DEAD, i32* %P
+        free i32* %P
+        ret void
+}
diff --git a/test/Transforms/DeadStoreElimination/free.llx b/test/Transforms/DeadStoreElimination/free.llx
deleted file mode 100644 (file)
index e0611d3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
-
-define void @test(i32* %Q, i32* %P) {
-        %DEAD = load i32* %Q            ; <i32> [#uses=1]
-        store i32 %DEAD, i32* %P
-        free i32* %P
-        ret void
-}
diff --git a/test/Transforms/DeadStoreElimination/simple.ll b/test/Transforms/DeadStoreElimination/simple.ll
new file mode 100644 (file)
index 0000000..594671d
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
+
+define void @test(i32* %Q, i32* %P) {
+        %DEAD = load i32* %Q            ; <i32> [#uses=1]
+        store i32 %DEAD, i32* %P
+        store i32 0, i32* %P
+        ret void
+}
+
diff --git a/test/Transforms/DeadStoreElimination/simple.llx b/test/Transforms/DeadStoreElimination/simple.llx
deleted file mode 100644 (file)
index 594671d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -dse | llvm-dis | not grep DEAD
-
-define void @test(i32* %Q, i32* %P) {
-        %DEAD = load i32* %Q            ; <i32> [#uses=1]
-        store i32 %DEAD, i32* %P
-        store i32 0, i32* %P
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.ll b/test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.ll
new file mode 100644 (file)
index 0000000..5f784e0
--- /dev/null
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -globalopt
+
+@V = global float 1.200000e+01          ; <float*> [#uses=1]
+@G = internal global i32* null          ; <i32**> [#uses=2]
+
+define i32 @user() {
+        %P = load i32** @G              ; <i32*> [#uses=1]
+        %Q = load i32* %P               ; <i32> [#uses=1]
+        ret i32 %Q
+}
+
+define void @setter() {
+        %Vi = bitcast float* @V to i32*         ; <i32*> [#uses=1]
+        store i32* %Vi, i32** @G
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.llx b/test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.llx
deleted file mode 100644 (file)
index 5f784e0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt
-
-@V = global float 1.200000e+01          ; <float*> [#uses=1]
-@G = internal global i32* null          ; <i32**> [#uses=2]
-
-define i32 @user() {
-        %P = load i32** @G              ; <i32*> [#uses=1]
-        %Q = load i32* %P               ; <i32> [#uses=1]
-        ret i32 %Q
-}
-
-define void @setter() {
-        %Vi = bitcast float* @V to i32*         ; <i32*> [#uses=1]
-        store i32* %Vi, i32** @G
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/basictest.ll b/test/Transforms/GlobalOpt/basictest.ll
new file mode 100644 (file)
index 0000000..1c3bdbb
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+@X = internal global i32 4              ; <i32*> [#uses=1]
+
+define i32 @foo() {
+        %V = load i32* @X               ; <i32> [#uses=1]
+        ret i32 %V
+}
+
diff --git a/test/Transforms/GlobalOpt/basictest.llx b/test/Transforms/GlobalOpt/basictest.llx
deleted file mode 100644 (file)
index 1c3bdbb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
-
-@X = internal global i32 4              ; <i32*> [#uses=1]
-
-define i32 @foo() {
-        %V = load i32* @X               ; <i32> [#uses=1]
-        ret i32 %V
-}
-
diff --git a/test/Transforms/GlobalOpt/deadglobal.ll b/test/Transforms/GlobalOpt/deadglobal.ll
new file mode 100644 (file)
index 0000000..7a47b8e
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
+
+@G = internal global i32 123            ; <i32*> [#uses=1]
+
+define void @foo() {
+        store i32 1, i32* @G
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/deadglobal.llx b/test/Transforms/GlobalOpt/deadglobal.llx
deleted file mode 100644 (file)
index 7a47b8e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep internal
-
-@G = internal global i32 123            ; <i32*> [#uses=1]
-
-define void @foo() {
-        store i32 1, i32* @G
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/globalsra-partial.ll b/test/Transforms/GlobalOpt/globalsra-partial.ll
new file mode 100644 (file)
index 0000000..e52e7fe
--- /dev/null
@@ -0,0 +1,23 @@
+; In this case, the global can only be broken up by one level.
+
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep 12345
+
+@G = internal global { i32, [4 x float] } zeroinitializer               ; <{ i32, [4 x float] }*> [#uses=3]
+
+define void @onlystore() {
+        store i32 12345, i32* getelementptr ({ i32, [4 x float] }* @G, i32 0, i32 0)
+        ret void
+}
+
+define void @storeinit(i32 %i) {
+        %Ptr = getelementptr { i32, [4 x float] }* @G, i32 0, i32 1, i32 %i             ; <float*> [#uses=1]
+        store float 1.000000e+00, float* %Ptr
+        ret void
+}
+
+define float @readval(i32 %i) {
+        %Ptr = getelementptr { i32, [4 x float] }* @G, i32 0, i32 1, i32 %i             ; <float*> [#uses=1]
+        %V = load float* %Ptr           ; <float> [#uses=1]
+        ret float %V
+}
+
diff --git a/test/Transforms/GlobalOpt/globalsra-partial.llx b/test/Transforms/GlobalOpt/globalsra-partial.llx
deleted file mode 100644 (file)
index e52e7fe..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-; In this case, the global can only be broken up by one level.
-
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep 12345
-
-@G = internal global { i32, [4 x float] } zeroinitializer               ; <{ i32, [4 x float] }*> [#uses=3]
-
-define void @onlystore() {
-        store i32 12345, i32* getelementptr ({ i32, [4 x float] }* @G, i32 0, i32 0)
-        ret void
-}
-
-define void @storeinit(i32 %i) {
-        %Ptr = getelementptr { i32, [4 x float] }* @G, i32 0, i32 1, i32 %i             ; <float*> [#uses=1]
-        store float 1.000000e+00, float* %Ptr
-        ret void
-}
-
-define float @readval(i32 %i) {
-        %Ptr = getelementptr { i32, [4 x float] }* @G, i32 0, i32 1, i32 %i             ; <float*> [#uses=1]
-        %V = load float* %Ptr           ; <float> [#uses=1]
-        ret float %V
-}
-
diff --git a/test/Transforms/GlobalOpt/globalsra.ll b/test/Transforms/GlobalOpt/globalsra.ll
new file mode 100644 (file)
index 0000000..3623555
--- /dev/null
@@ -0,0 +1,23 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+@G = internal global { i32, float, { double } } {
+    i32 1, 
+    float 1.000000e+00, 
+    { double } { double 1.727000e+01 } }                ; <{ i32, float, { double } }*> [#uses=3]
+
+define void @onlystore() {
+        store i32 123, i32* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 0)
+        ret void
+}
+
+define float @storeinit() {
+        store float 1.000000e+00, float* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 1)
+        %X = load float* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 1)           ; <float> [#uses=1]
+        ret float %X
+}
+
+define double @constantize() {
+        %X = load double* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 2, i32 0)           ; <double> [#uses=1]
+        ret double %X
+}
+
diff --git a/test/Transforms/GlobalOpt/globalsra.llx b/test/Transforms/GlobalOpt/globalsra.llx
deleted file mode 100644 (file)
index 3623555..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
-
-@G = internal global { i32, float, { double } } {
-    i32 1, 
-    float 1.000000e+00, 
-    { double } { double 1.727000e+01 } }                ; <{ i32, float, { double } }*> [#uses=3]
-
-define void @onlystore() {
-        store i32 123, i32* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 0)
-        ret void
-}
-
-define float @storeinit() {
-        store float 1.000000e+00, float* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 1)
-        %X = load float* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 1)           ; <float> [#uses=1]
-        ret float %X
-}
-
-define double @constantize() {
-        %X = load double* getelementptr ({ i32, float, { double } }* @G, i32 0, i32 2, i32 0)           ; <double> [#uses=1]
-        ret double %X
-}
-
diff --git a/test/Transforms/GlobalOpt/iterate.ll b/test/Transforms/GlobalOpt/iterate.ll
new file mode 100644 (file)
index 0000000..d764c5d
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep %G
+
+@G = internal global i32 0              ; <i32*> [#uses=1]
+@H = internal global { i32* } { i32* @G }               ; <{ i32* }*> [#uses=1]
+
+define i32 @loadg() {
+        %G = load i32** getelementptr ({ i32* }* @H, i32 0, i32 0)              ; <i32*> [#uses=1]
+        %GV = load i32* %G              ; <i32> [#uses=1]
+        ret i32 %GV
+}
+
diff --git a/test/Transforms/GlobalOpt/iterate.llx b/test/Transforms/GlobalOpt/iterate.llx
deleted file mode 100644 (file)
index d764c5d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep %G
-
-@G = internal global i32 0              ; <i32*> [#uses=1]
-@H = internal global { i32* } { i32* @G }               ; <{ i32* }*> [#uses=1]
-
-define i32 @loadg() {
-        %G = load i32** getelementptr ({ i32* }* @H, i32 0, i32 0)              ; <i32*> [#uses=1]
-        %GV = load i32* %G              ; <i32> [#uses=1]
-        ret i32 %GV
-}
-
diff --git a/test/Transforms/GlobalOpt/load-store-global.ll b/test/Transforms/GlobalOpt/load-store-global.ll
new file mode 100644 (file)
index 0000000..d89d226
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
+
+@G = internal global i32 17             ; <i32*> [#uses=3]
+
+define void @foo() {
+        %V = load i32* @G               ; <i32> [#uses=1]
+        store i32 %V, i32* @G
+        ret void
+}
+
+define i32 @bar() {
+        %X = load i32* @G               ; <i32> [#uses=1]
+        ret i32 %X
+}
+
diff --git a/test/Transforms/GlobalOpt/load-store-global.llx b/test/Transforms/GlobalOpt/load-store-global.llx
deleted file mode 100644 (file)
index d89d226..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
-
-@G = internal global i32 17             ; <i32*> [#uses=3]
-
-define void @foo() {
-        %V = load i32* @G               ; <i32> [#uses=1]
-        store i32 %V, i32* @G
-        ret void
-}
-
-define i32 @bar() {
-        %X = load i32* @G               ; <i32> [#uses=1]
-        ret i32 %X
-}
-
diff --git a/test/Transforms/GlobalOpt/malloc-promote-1.ll b/test/Transforms/GlobalOpt/malloc-promote-1.ll
new file mode 100644 (file)
index 0000000..fea4dbd
--- /dev/null
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+@G = internal global i32* null          ; <i32**> [#uses=3]
+
+define void @init() {
+        %P = malloc i32         ; <i32*> [#uses=1]
+        store i32* %P, i32** @G
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        store i32 0, i32* %GV
+        ret void
+}
+
+define i32 @get() {
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %V = load i32* %GV              ; <i32> [#uses=1]
+        ret i32 %V
+}
+
diff --git a/test/Transforms/GlobalOpt/malloc-promote-1.llx b/test/Transforms/GlobalOpt/malloc-promote-1.llx
deleted file mode 100644 (file)
index fea4dbd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
-
-@G = internal global i32* null          ; <i32**> [#uses=3]
-
-define void @init() {
-        %P = malloc i32         ; <i32*> [#uses=1]
-        store i32* %P, i32** @G
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        store i32 0, i32* %GV
-        ret void
-}
-
-define i32 @get() {
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %V = load i32* %GV              ; <i32> [#uses=1]
-        ret i32 %V
-}
-
diff --git a/test/Transforms/GlobalOpt/malloc-promote-2.ll b/test/Transforms/GlobalOpt/malloc-promote-2.ll
new file mode 100644 (file)
index 0000000..1b33632
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
+
+@G = internal global i32* null          ; <i32**> [#uses=3]
+
+define void @init() {
+        %P = malloc i32, i32 100                ; <i32*> [#uses=1]
+        store i32* %P, i32** @G
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
+        store i32 20, i32* %GVe
+        ret void
+}
+
+define i32 @get() {
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
+        %V = load i32* %GVe             ; <i32> [#uses=1]
+        ret i32 %V
+}
+
diff --git a/test/Transforms/GlobalOpt/malloc-promote-2.llx b/test/Transforms/GlobalOpt/malloc-promote-2.llx
deleted file mode 100644 (file)
index 1b33632..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
-
-@G = internal global i32* null          ; <i32**> [#uses=3]
-
-define void @init() {
-        %P = malloc i32, i32 100                ; <i32*> [#uses=1]
-        store i32* %P, i32** @G
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
-        store i32 20, i32* %GVe
-        ret void
-}
-
-define i32 @get() {
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
-        %V = load i32* %GVe             ; <i32> [#uses=1]
-        ret i32 %V
-}
-
diff --git a/test/Transforms/GlobalOpt/malloc-promote-3.ll b/test/Transforms/GlobalOpt/malloc-promote-3.ll
new file mode 100644 (file)
index 0000000..26ce8fd
--- /dev/null
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
+
+@G = internal global i32* null          ; <i32**> [#uses=4]
+
+define void @init() {
+        %P = malloc i32, i32 100                ; <i32*> [#uses=1]
+        store i32* %P, i32** @G
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
+        store i32 20, i32* %GVe
+        ret void
+}
+
+define i32 @get() {
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
+        %V = load i32* %GVe             ; <i32> [#uses=1]
+        ret i32 %V
+}
+
+define i1 @check() {
+        %GV = load i32** @G             ; <i32*> [#uses=1]
+        %V = icmp eq i32* %GV, null             ; <i1> [#uses=1]
+        ret i1 %V
+}
+
diff --git a/test/Transforms/GlobalOpt/malloc-promote-3.llx b/test/Transforms/GlobalOpt/malloc-promote-3.llx
deleted file mode 100644 (file)
index 26ce8fd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
-
-@G = internal global i32* null          ; <i32**> [#uses=4]
-
-define void @init() {
-        %P = malloc i32, i32 100                ; <i32*> [#uses=1]
-        store i32* %P, i32** @G
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
-        store i32 20, i32* %GVe
-        ret void
-}
-
-define i32 @get() {
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %GVe = getelementptr i32* %GV, i32 40           ; <i32*> [#uses=1]
-        %V = load i32* %GVe             ; <i32> [#uses=1]
-        ret i32 %V
-}
-
-define i1 @check() {
-        %GV = load i32** @G             ; <i32*> [#uses=1]
-        %V = icmp eq i32* %GV, null             ; <i1> [#uses=1]
-        ret i1 %V
-}
-
diff --git a/test/Transforms/GlobalOpt/phi-select.ll b/test/Transforms/GlobalOpt/phi-select.ll
new file mode 100644 (file)
index 0000000..da1314f
--- /dev/null
@@ -0,0 +1,31 @@
+; Test that PHI nodes and select instructions do not necessarily make stuff
+; non-constant.
+
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+@X = internal global i32 4              ; <i32*> [#uses=2]
+@Y = internal global i32 5              ; <i32*> [#uses=2]
+
+define i32 @test1(i1 %C) {
+        %P = select i1 %C, i32* @X, i32* @Y             ; <i32*> [#uses=1]
+        %V = load i32* %P               ; <i32> [#uses=1]
+        ret i32 %V
+}
+
+define i32 @test2(i1 %C) {
+; <label>:0
+        br i1 %C, label %T, label %Cont
+
+T:              ; preds = %0
+        br label %Cont
+
+Cont:           ; preds = %T, %0
+        %P = phi i32* [ @X, %0 ], [ @Y, %T ]            ; <i32*> [#uses=1]
+        %V = load i32* %P               ; <i32> [#uses=1]
+        ret i32 %V
+}
+
+
+
+
+
diff --git a/test/Transforms/GlobalOpt/phi-select.llx b/test/Transforms/GlobalOpt/phi-select.llx
deleted file mode 100644 (file)
index da1314f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-; Test that PHI nodes and select instructions do not necessarily make stuff
-; non-constant.
-
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
-
-@X = internal global i32 4              ; <i32*> [#uses=2]
-@Y = internal global i32 5              ; <i32*> [#uses=2]
-
-define i32 @test1(i1 %C) {
-        %P = select i1 %C, i32* @X, i32* @Y             ; <i32*> [#uses=1]
-        %V = load i32* %P               ; <i32> [#uses=1]
-        ret i32 %V
-}
-
-define i32 @test2(i1 %C) {
-; <label>:0
-        br i1 %C, label %T, label %Cont
-
-T:              ; preds = %0
-        br label %Cont
-
-Cont:           ; preds = %T, %0
-        %P = phi i32* [ @X, %0 ], [ @Y, %T ]            ; <i32*> [#uses=1]
-        %V = load i32* %P               ; <i32> [#uses=1]
-        ret i32 %V
-}
-
-
-
-
-
diff --git a/test/Transforms/GlobalOpt/storepointer-compare.ll b/test/Transforms/GlobalOpt/storepointer-compare.ll
new file mode 100644 (file)
index 0000000..86eff51
--- /dev/null
@@ -0,0 +1,30 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | \
+; RUN:   grep {call void @Actual}
+
+; Check that a comparison does not prevent an indirect call from being made 
+; direct.  The global will still remain, but indirect call elim is still good.
+
+@G = internal global void ()* null              ; <void ()**> [#uses=2]
+
+define internal void @Actual() {
+        ret void
+}
+
+define void @init() {
+        store void ()* @Actual, void ()** @G
+        ret void
+}
+
+define void @doit() {
+        %FP = load void ()** @G         ; <void ()*> [#uses=2]
+        %CC = icmp eq void ()* %FP, null                ; <i1> [#uses=1]
+        br i1 %CC, label %isNull, label %DoCall
+
+DoCall:         ; preds = %0
+        call void %FP( )
+        ret void
+
+isNull:         ; preds = %0
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/storepointer-compare.llx b/test/Transforms/GlobalOpt/storepointer-compare.llx
deleted file mode 100644 (file)
index 86eff51..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | \
-; RUN:   grep {call void @Actual}
-
-; Check that a comparison does not prevent an indirect call from being made 
-; direct.  The global will still remain, but indirect call elim is still good.
-
-@G = internal global void ()* null              ; <void ()**> [#uses=2]
-
-define internal void @Actual() {
-        ret void
-}
-
-define void @init() {
-        store void ()* @Actual, void ()** @G
-        ret void
-}
-
-define void @doit() {
-        %FP = load void ()** @G         ; <void ()*> [#uses=2]
-        %CC = icmp eq void ()* %FP, null                ; <i1> [#uses=1]
-        br i1 %CC, label %isNull, label %DoCall
-
-DoCall:         ; preds = %0
-        call void %FP( )
-        ret void
-
-isNull:         ; preds = %0
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/storepointer.ll b/test/Transforms/GlobalOpt/storepointer.ll
new file mode 100644 (file)
index 0000000..d57a6ac
--- /dev/null
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
+
+@G = internal global void ()* null              ; <void ()**> [#uses=2]
+
+define internal void @Actual() {
+        ret void
+}
+
+define void @init() {
+        store void ()* @Actual, void ()** @G
+        ret void
+}
+
+define void @doit() {
+        %FP = load void ()** @G         ; <void ()*> [#uses=1]
+        call void %FP( )
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/storepointer.llx b/test/Transforms/GlobalOpt/storepointer.llx
deleted file mode 100644 (file)
index d57a6ac..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global
-
-@G = internal global void ()* null              ; <void ()**> [#uses=2]
-
-define internal void @Actual() {
-        ret void
-}
-
-define void @init() {
-        store void ()* @Actual, void ()** @G
-        ret void
-}
-
-define void @doit() {
-        %FP = load void ()** @G         ; <void ()*> [#uses=1]
-        call void %FP( )
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/trivialstore.ll b/test/Transforms/GlobalOpt/trivialstore.ll
new file mode 100644 (file)
index 0000000..a662565
--- /dev/null
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
+
+@G = internal global i32 17             ; <i32*> [#uses=3]
+
+define void @foo() {
+        store i32 17, i32* @G
+        ret void
+}
+
+define i32 @bar() {
+        %X = load i32* @G               ; <i32> [#uses=1]
+        ret i32 %X
+}
+
+define internal void @dead() {
+        store i32 123, i32* @G
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/trivialstore.llx b/test/Transforms/GlobalOpt/trivialstore.llx
deleted file mode 100644 (file)
index a662565..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep G
-
-@G = internal global i32 17             ; <i32*> [#uses=3]
-
-define void @foo() {
-        store i32 17, i32* @G
-        ret void
-}
-
-define i32 @bar() {
-        %X = load i32* @G               ; <i32> [#uses=1]
-        ret i32 %X
-}
-
-define internal void @dead() {
-        store i32 123, i32* @G
-        ret void
-}
-
diff --git a/test/Transforms/GlobalOpt/undef-init.ll b/test/Transforms/GlobalOpt/undef-init.ll
new file mode 100644 (file)
index 0000000..bb483fc
--- /dev/null
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep store
+
+@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z3foov } ]          ; <[1 x { i32, void ()* }]*> [#uses=0]
+@X.0 = internal global i32 undef                ; <i32*> [#uses=2]
+
+define i32 @_Z3foov() {
+entry:
+        %tmp.1 = load i32* @X.0         ; <i32> [#uses=1]
+        ret i32 %tmp.1
+}
+
+define internal void @_GLOBAL__I__Z3foov() {
+entry:
+        store i32 1, i32* @X.0
+        ret void
+}
+
diff --git a/test/Transforms/GlobalOpt/undef-init.llx b/test/Transforms/GlobalOpt/undef-init.llx
deleted file mode 100644 (file)
index bb483fc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep store
-
-@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z3foov } ]          ; <[1 x { i32, void ()* }]*> [#uses=0]
-@X.0 = internal global i32 undef                ; <i32*> [#uses=2]
-
-define i32 @_Z3foov() {
-entry:
-        %tmp.1 = load i32* @X.0         ; <i32> [#uses=1]
-        ret i32 %tmp.1
-}
-
-define internal void @_GLOBAL__I__Z3foov() {
-entry:
-        store i32 1, i32* @X.0
-        ret void
-}
-
diff --git a/test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.ll b/test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.ll
new file mode 100644 (file)
index 0000000..11af997
--- /dev/null
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | opt -indvars -disable-output
+
+define void @test() {
+entry:
+        %inc.2 = add i32 1, 1           ; <i32> [#uses=1]
+        br i1 false, label %no_exit, label %loopexit
+
+no_exit:                ; preds = %no_exit, %entry
+        %j.0.pn = phi i32 [ %inc.3, %no_exit ], [ %inc.2, %entry ]              ; <i32> [#uses=1]
+        %k.0.pn = phi i32 [ %inc.4, %no_exit ], [ 1, %entry ]           ; <i32> [#uses=1]
+        %inc.3 = add i32 %j.0.pn, 1             ; <i32> [#uses=1]
+        %inc.4 = add i32 %k.0.pn, 1             ; <i32> [#uses=1]
+        br i1 false, label %no_exit, label %loopexit
+
+loopexit:               ; preds = %no_exit, %entry
+        ret void
+}
+
diff --git a/test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx b/test/Transforms/IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
deleted file mode 100644 (file)
index 11af997..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llvm-as < %s | opt -indvars -disable-output
-
-define void @test() {
-entry:
-        %inc.2 = add i32 1, 1           ; <i32> [#uses=1]
-        br i1 false, label %no_exit, label %loopexit
-
-no_exit:                ; preds = %no_exit, %entry
-        %j.0.pn = phi i32 [ %inc.3, %no_exit ], [ %inc.2, %entry ]              ; <i32> [#uses=1]
-        %k.0.pn = phi i32 [ %inc.4, %no_exit ], [ 1, %entry ]           ; <i32> [#uses=1]
-        %inc.3 = add i32 %j.0.pn, 1             ; <i32> [#uses=1]
-        %inc.4 = add i32 %k.0.pn, 1             ; <i32> [#uses=1]
-        br i1 false, label %no_exit, label %loopexit
-
-loopexit:               ; preds = %no_exit, %entry
-        ret void
-}
-
diff --git a/test/Transforms/IndVarsSimplify/2003-12-15-Crash.ll b/test/Transforms/IndVarsSimplify/2003-12-15-Crash.ll
new file mode 100644 (file)
index 0000000..b964d78
--- /dev/null
@@ -0,0 +1,24 @@
+; RUN: llvm-as < %s | opt -indvars -disable-output 
+define void @_ZN17CoinFactorization7cleanupEv() {
+entry:
+        br i1 false, label %loopexit.14, label %cond_continue.3
+
+cond_continue.3:                ; preds = %entry
+        ret void
+
+loopexit.14:            ; preds = %entry
+        %tmp.738 = sub i32 0, 0         ; <i32> [#uses=1]
+        br i1 false, label %no_exit.15.preheader, label %loopexit.15
+
+no_exit.15.preheader:           ; preds = %loopexit.14
+        br label %no_exit.15
+
+no_exit.15:             ; preds = %no_exit.15, %no_exit.15.preheader
+        %highC.0 = phi i32 [ %tmp.738, %no_exit.15.preheader ], [ %dec.0, %no_exit.15 ]         ; <i32> [#uses=1]
+        %dec.0 = add i32 %highC.0, -1           ; <i32> [#uses=1]
+        br i1 false, label %no_exit.15, label %loopexit.15
+
+loopexit.15:            ; preds = %no_exit.15, %loopexit.14
+        ret void
+}
+
diff --git a/test/Transforms/IndVarsSimplify/2003-12-15-Crash.llx b/test/Transforms/IndVarsSimplify/2003-12-15-Crash.llx
deleted file mode 100644 (file)
index b964d78..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: llvm-as < %s | opt -indvars -disable-output 
-define void @_ZN17CoinFactorization7cleanupEv() {
-entry:
-        br i1 false, label %loopexit.14, label %cond_continue.3
-
-cond_continue.3:                ; preds = %entry
-        ret void
-
-loopexit.14:            ; preds = %entry
-        %tmp.738 = sub i32 0, 0         ; <i32> [#uses=1]
-        br i1 false, label %no_exit.15.preheader, label %loopexit.15
-
-no_exit.15.preheader:           ; preds = %loopexit.14
-        br label %no_exit.15
-
-no_exit.15:             ; preds = %no_exit.15, %no_exit.15.preheader
-        %highC.0 = phi i32 [ %tmp.738, %no_exit.15.preheader ], [ %dec.0, %no_exit.15 ]         ; <i32> [#uses=1]
-        %dec.0 = add i32 %highC.0, -1           ; <i32> [#uses=1]
-        br i1 false, label %no_exit.15, label %loopexit.15
-
-loopexit.15:            ; preds = %no_exit.15, %loopexit.14
-        ret void
-}
-
diff --git a/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll b/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll
new file mode 100644 (file)
index 0000000..6933ee7
--- /dev/null
@@ -0,0 +1,283 @@
+; RUN: llvm-as < %s | opt -indvars -disable-output
+; ModuleID = '2004-04-05-InvokeCastCrash.llx'
+       %struct.__false_type = type { i8 }
+       %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>" = type { %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"*, %"struct.llvm::Constant"* }
+       %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >" = type { %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"*, %"struct.std::pair<const llvm::Value* const,int>" }
+       %"struct.__gnu_cxx::hash_map<const llvm::Value*,int,__gnu_cxx::hash<const llvm::Value*>,std::equal_to<const llvm::Value*>,std::allocator<int> >" = type { %"struct.__gnu_cxx::hashtable<std::pair<const llvm::Value* const, int>,const llvm::Value*,__gnu_cxx::hash<const llvm::Value*>,std::_Select1st<std::pair<const llvm::Value* const, int> >,std::equal_to<const llvm::Value*>,std::allocator<int> >" }
+       %"struct.__gnu_cxx::hash_set<const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" = type { %"struct.__gnu_cxx::hashtable<const llvm::Constant*,const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::_Identity<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" }
+       %"struct.__gnu_cxx::hashtable<const llvm::Constant*,const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::_Identity<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" = type { %struct.__false_type, %struct.__false_type, %struct.__false_type, %struct.__false_type, %"struct.std::vector<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >", i32 }
+       %"struct.__gnu_cxx::hashtable<std::pair<const llvm::Value* const, int>,const llvm::Value*,__gnu_cxx::hash<const llvm::Value*>,std::_Select1st<std::pair<const llvm::Value* const, int> >,std::equal_to<const llvm::Value*>,std::allocator<int> >" = type { %struct.__false_type, %struct.__false_type, %struct.__false_type, %struct.__false_type, %"struct.std::vector<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >", i32 }
+       %"struct.llvm::AbstractTypeUser" = type { i32 (...)** }
+       %"struct.llvm::Annotable" = type { i32 (...)**, %"struct.llvm::Annotation"* }
+       %"struct.llvm::Annotation" = type { i32 (...)**, %"struct.llvm::AnnotationID", %"struct.llvm::Annotation"* }
+       %"struct.llvm::AnnotationID" = type { i32 }
+       %"struct.llvm::Argument" = type { %"struct.llvm::Value", %"struct.llvm::Function"*, %"struct.llvm::Argument"*, %"struct.llvm::Argument"* }
+       %"struct.llvm::BasicBlock" = type { %"struct.llvm::Value", %"struct.llvm::iplist<llvm::Instruction,llvm::ilist_traits<llvm::Instruction> >", %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* }
+       %"struct.llvm::Constant" = type opaque
+       %"struct.llvm::DerivedType" = type { %"struct.llvm::Type", %"struct.llvm::AbstractTypeUser", %"struct.std::vector<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" }
+       %"struct.llvm::Function" = type { %"struct.llvm::GlobalValue", %"struct.llvm::Annotable", %"struct.llvm::iplist<llvm::BasicBlock,llvm::ilist_traits<llvm::BasicBlock> >", %"struct.llvm::iplist<llvm::Argument,llvm::ilist_traits<llvm::Argument> >", %"struct.llvm::SymbolTable"*, %"struct.llvm::Function"*, %"struct.llvm::Function"* }
+       %"struct.llvm::FunctionPass" = type { %"struct.llvm::Pass" }
+       %"struct.llvm::FunctionType" = type { %"struct.llvm::DerivedType", i1 }
+       %"struct.llvm::GlobalValue" = type { %"struct.llvm::User", i32, %"struct.llvm::Module"* }
+       %"struct.llvm::Instruction" = type { %"struct.llvm::User", %"struct.llvm::Annotable", %"struct.llvm::BasicBlock"*, %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"*, i32 }
+       %"struct.llvm::IntrinsicLowering" = type opaque
+       %"struct.llvm::MachineBasicBlock" = type { %"struct.llvm::ilist<llvm::MachineInstr>", %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::BasicBlock"* }
+       %"struct.llvm::MachineConstantPool" = type opaque
+       %"struct.llvm::MachineFrameInfo" = type opaque
+       %"struct.llvm::MachineFunction" = type { %"struct.llvm::Annotation", %"struct.llvm::Function"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::iplist<llvm::MachineBasicBlock,llvm::ilist_traits<llvm::MachineBasicBlock> >", %"struct.llvm::SSARegMap"*, %"struct.llvm::MachineFunctionInfo"*, %"struct.llvm::MachineFrameInfo"*, %"struct.llvm::MachineConstantPool"* }
+       %"struct.llvm::MachineFunctionInfo" = type { %"struct.__gnu_cxx::hash_set<const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >", %"struct.__gnu_cxx::hash_map<const llvm::Value*,int,__gnu_cxx::hash<const llvm::Value*>,std::equal_to<const llvm::Value*>,std::allocator<int> >", i32, i32, i32, i32, i32, i32, i32, i1, i1, i1, %"struct.llvm::MachineFunction"* }
+       %"struct.llvm::MachineFunctionPass" = type { %"struct.llvm::FunctionPass" }
+       %"struct.llvm::MachineInstr" = type { i16, i8, %"struct.std::vector<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >", %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineBasicBlock"* }
+       %"struct.llvm::MachineInstrBuilder" = type { %"struct.llvm::MachineInstr"* }
+       %"struct.llvm::MachineOperand" = type { %"union.llvm::MachineOperand::._65", i32, i32 }
+       %"struct.llvm::Module" = type opaque
+       %"struct.llvm::PATypeHandle" = type { %"struct.llvm::Type"*, %"struct.llvm::AbstractTypeUser"* }
+       %"struct.llvm::PATypeHolder" = type { %"struct.llvm::Type"* }
+       %"struct.llvm::Pass" = type { i32 (...)**, %"struct.llvm::AbstractTypeUser"*, %"struct.llvm::PassInfo"*, %"struct.std::vector<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" }
+       %"struct.llvm::PassInfo" = type { i8*, i8*, %"struct.std::type_info"*, i8, %"struct.std::vector<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >", %"struct.llvm::Pass"* ()*, %"struct.llvm::Pass"* (%"struct.llvm::TargetMachine"*)* }
+       %"struct.llvm::SSARegMap" = type opaque
+       %"struct.llvm::SymbolTable" = type opaque
+       %"struct.llvm::SymbolTableListTraits<llvm::Argument,llvm::Function,llvm::Function,llvm::ilist_traits<llvm::Argument> >" = type { %"struct.llvm::Function"*, %"struct.llvm::Function"* }
+       %"struct.llvm::SymbolTableListTraits<llvm::Instruction,llvm::BasicBlock,llvm::Function,llvm::ilist_traits<llvm::Instruction> >" = type { %"struct.llvm::Function"*, %"struct.llvm::BasicBlock"* }
+       %"struct.llvm::TargetData" = type { %"struct.llvm::FunctionPass", i1, i8, i8, i8, i8, i8, i8, i8, i8 }
+       %"struct.llvm::TargetFrameInfo" = type { i32 (...)**, i32, i32, i32 }
+       %"struct.llvm::TargetInstrDescriptor" = type { i8*, i32, i32, i32, i1, i32, i32, i32, i32, i32, i32*, i32* }
+       %"struct.llvm::TargetInstrInfo" = type { i32 (...)**, %"struct.llvm::TargetInstrDescriptor"*, i32, i32 }
+       %"struct.llvm::TargetMachine" = type { i32 (...)**, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >", %"struct.llvm::TargetData", %"struct.llvm::IntrinsicLowering"* }
+       %"struct.llvm::TargetRegClassInfo" = type { i32 (...)**, i32, i32, i32 }
+       %"struct.llvm::TargetRegInfo" = type { i32 (...)**, %"struct.std::vector<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >", %"struct.llvm::TargetMachine"* }
+       %"struct.llvm::Type" = type { %"struct.llvm::Value", i32, i32, i1, i32, %"struct.llvm::Type"*, %"struct.std::vector<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" }
+       %"struct.llvm::Use" = type { %"struct.llvm::Value"*, %"struct.llvm::User"*, %"struct.llvm::Use"*, %"struct.llvm::Use"* }
+       %"struct.llvm::User" = type { %"struct.llvm::Value", %"struct.std::vector<llvm::Use,std::allocator<llvm::Use> >" }
+       %"struct.llvm::Value" = type { i32 (...)**, %"struct.llvm::iplist<llvm::Use,llvm::ilist_traits<llvm::Use> >", %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >", %"struct.llvm::PATypeHolder", i32 }
+       %"struct.llvm::_GLOBAL__N_::InsertPrologEpilogCode" = type { %"struct.llvm::MachineFunctionPass" }
+       %"struct.llvm::ilist<llvm::MachineInstr>" = type { %"struct.llvm::iplist<llvm::MachineInstr,llvm::ilist_traits<llvm::MachineInstr> >" }
+       %"struct.llvm::ilist_iterator<const llvm::MachineBasicBlock>" = type { %"struct.llvm::MachineBasicBlock"* }
+       %"struct.llvm::ilist_traits<llvm::Argument>" = type { %"struct.llvm::SymbolTableListTraits<llvm::Argument,llvm::Function,llvm::Function,llvm::ilist_traits<llvm::Argument> >" }
+       %"struct.llvm::ilist_traits<llvm::Instruction>" = type { %"struct.llvm::SymbolTableListTraits<llvm::Instruction,llvm::BasicBlock,llvm::Function,llvm::ilist_traits<llvm::Instruction> >" }
+       %"struct.llvm::iplist<llvm::Argument,llvm::ilist_traits<llvm::Argument> >" = type { %"struct.llvm::ilist_traits<llvm::Argument>", %"struct.llvm::Argument"*, %"struct.llvm::Argument"* }
+       %"struct.llvm::iplist<llvm::BasicBlock,llvm::ilist_traits<llvm::BasicBlock> >" = type { %"struct.llvm::ilist_traits<llvm::Argument>", %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* }
+       %"struct.llvm::iplist<llvm::Instruction,llvm::ilist_traits<llvm::Instruction> >" = type { %"struct.llvm::ilist_traits<llvm::Instruction>", %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"* }
+       %"struct.llvm::iplist<llvm::MachineBasicBlock,llvm::ilist_traits<llvm::MachineBasicBlock> >" = type { %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"* }
+       %"struct.llvm::iplist<llvm::MachineInstr,llvm::ilist_traits<llvm::MachineInstr> >" = type { %"struct.llvm::ilist_iterator<const llvm::MachineBasicBlock>", %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"* }
+       %"struct.llvm::iplist<llvm::Use,llvm::ilist_traits<llvm::Use> >" = type { %"struct.llvm::Use"*, %"struct.llvm::Use"* }
+       %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*>, true>" = type { %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"**, %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"**, %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"** }
+       %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int>, true>" = type { %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"**, %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"**, %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"** }
+       %"struct.std::_Vector_alloc_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*>, true>" = type { %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"** }
+       %"struct.std::_Vector_alloc_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*>, true>" = type { %"struct.llvm::TargetFrameInfo"**, %"struct.llvm::TargetFrameInfo"**, %"struct.llvm::TargetFrameInfo"** }
+       %"struct.std::_Vector_alloc_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*>, true>" = type { %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"** }
+       %"struct.std::_Vector_alloc_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*>, true>" = type { %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"** }
+       %"struct.std::_Vector_alloc_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand>, true>" = type { %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"* }
+       %"struct.std::_Vector_alloc_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle>, true>" = type { %"struct.llvm::PATypeHandle"*, %"struct.llvm::PATypeHandle"*, %"struct.llvm::PATypeHandle"* }
+       %"struct.std::_Vector_alloc_base<llvm::Use,std::allocator<llvm::Use>, true>" = type { %"struct.llvm::Use"*, %"struct.llvm::Use"*, %"struct.llvm::Use"* }
+       %"struct.std::_Vector_alloc_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> >, true>" = type { %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"*, %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"*, %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"* }
+       %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" = type { %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*>, true>" }
+       %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" = type { %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int>, true>" }
+       %"struct.std::_Vector_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" = type { %"struct.std::_Vector_alloc_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*>, true>" }
+       %"struct.std::_Vector_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" = type { %"struct.std::_Vector_alloc_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*>, true>" }
+       %"struct.std::_Vector_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" = type { %"struct.std::_Vector_alloc_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*>, true>" }
+       %"struct.std::_Vector_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" = type { %"struct.std::_Vector_alloc_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*>, true>" }
+       %"struct.std::_Vector_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" = type { %"struct.std::_Vector_alloc_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand>, true>" }
+       %"struct.std::_Vector_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" = type { %"struct.std::_Vector_alloc_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle>, true>" }
+       %"struct.std::_Vector_base<llvm::Use,std::allocator<llvm::Use> >" = type { %"struct.std::_Vector_alloc_base<llvm::Use,std::allocator<llvm::Use>, true>" }
+       %"struct.std::_Vector_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" = type { %"struct.std::_Vector_alloc_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> >, true>" }
+       %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
+       %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
+       %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>" = type { %"struct.llvm::PassInfo"*, %"struct.llvm::Pass"* }
+       %"struct.std::pair<const llvm::Value* const,int>" = type { %"struct.llvm::Value"*, i32 }
+       %"struct.std::type_info" = type { i32 (...)**, i8* }
+       %"struct.std::vector<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" = type { %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" }
+       %"struct.std::vector<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" = type { %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" }
+       %"struct.std::vector<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" = type { %"struct.std::_Vector_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" }
+       %"struct.std::vector<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" = type { %"struct.std::_Vector_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" }
+       %"struct.std::vector<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" = type { %"struct.std::_Vector_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" }
+       %"struct.std::vector<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" = type { %"struct.std::_Vector_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" }
+       %"struct.std::vector<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" = type { %"struct.std::_Vector_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" }
+       %"struct.std::vector<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" = type { %"struct.std::_Vector_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" }
+       %"struct.std::vector<llvm::Use,std::allocator<llvm::Use> >" = type { %"struct.std::_Vector_base<llvm::Use,std::allocator<llvm::Use> >" }
+       %"struct.std::vector<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" = type { %"struct.std::_Vector_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" }
+       %"union.llvm::MachineOperand::._65" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* }
+
+declare void @_Znwj()
+
+declare void @_ZN4llvm12MachineInstrC1Esjbb()
+
+declare void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_()
+
+declare void @_ZNK4llvm8Function15getFunctionTypeEv()
+
+declare void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE()
+
+declare void @_ZNK4llvm19MachineInstrBuilder7addSImmEi()
+
+define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) {
+entry:
+       %tmp.8.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.0.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetFrameInfo"*> [#uses=0]
+
+invoke_catch.0.i:              ; preds = %invoke_cont.49.i, %invoke_cont.48.i, %invoke_cont.47.i, %invoke_cont.i53.i, %no_exit.i, %invoke_cont.44.i, %invoke_cont.43.i, %invoke_cont.42.i, %invoke_cont.41.i, %invoke_cont.40.i, %invoke_cont.39.i, %invoke_cont.38.i, %invoke_cont.37.i, %then.2.i, %invoke_cont.35.i, %invoke_cont.34.i, %then.1.i, %endif.0.i, %invoke_cont.9.i, %invoke_cont.8.i, %invoke_cont.7.i, %invoke_cont.i.i, %then.0.i, %invoke_cont.4.i, %invoke_cont.3.i, %invoke_cont.2.i, %invoke_cont.1.i, %endif.0.i.i, %tmp.7.i.noexc.i, %invoke_cont.0.i, %entry
+       ret void
+
+invoke_cont.0.i:               ; preds = %entry
+       %tmp.7.i1.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %tmp.7.i.noexc.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetFrameInfo"*> [#uses=2]
+
+tmp.7.i.noexc.i:               ; preds = %invoke_cont.0.i
+       %tmp.17.i2.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.7.i1.i )
+                       to label %endif.0.i.i unwind label %invoke_catch.0.i            ; <i32> [#uses=0]
+
+endif.0.i.i:           ; preds = %tmp.7.i.noexc.i
+       %tmp.38.i4.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.7.i1.i )
+                       to label %tmp.38.i.noexc.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
+
+tmp.38.i.noexc.i:              ; preds = %endif.0.i.i
+       br i1 false, label %invoke_cont.1.i, label %then.1.i.i
+
+then.1.i.i:            ; preds = %tmp.38.i.noexc.i
+       ret void
+
+invoke_cont.1.i:               ; preds = %tmp.38.i.noexc.i
+       %tmp.21.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.2.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
+
+invoke_cont.2.i:               ; preds = %invoke_cont.1.i
+       %tmp.28.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.21.i )
+                       to label %invoke_cont.3.i unwind label %invoke_catch.0.i                ; <i32> [#uses=0]
+
+invoke_cont.3.i:               ; preds = %invoke_cont.2.i
+       %tmp.36.i = invoke %"struct.llvm::TargetInstrInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.4.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetInstrInfo"*> [#uses=1]
+
+invoke_cont.4.i:               ; preds = %invoke_cont.3.i
+       %tmp.43.i = invoke i1 null( %"struct.llvm::TargetInstrInfo"* %tmp.36.i, i16 383, i64 0 )
+                       to label %invoke_cont.5.i unwind label %invoke_catch.0.i                ; <i1> [#uses=1]
+
+invoke_cont.5.i:               ; preds = %invoke_cont.4.i
+       br i1 %tmp.43.i, label %then.0.i, label %else.i
+
+then.0.i:              ; preds = %invoke_cont.5.i
+       invoke void @_Znwj( )
+                       to label %tmp.0.i.noexc.i unwind label %invoke_catch.0.i
+
+tmp.0.i.noexc.i:               ; preds = %then.0.i
+       invoke void @_ZN4llvm12MachineInstrC1Esjbb( )
+                       to label %invoke_cont.i.i unwind label %cond_true.i.i
+
+cond_true.i.i:         ; preds = %tmp.0.i.noexc.i
+       ret void
+
+invoke_cont.i.i:               ; preds = %tmp.0.i.noexc.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
+                       to label %invoke_cont.7.i unwind label %invoke_catch.0.i
+
+invoke_cont.7.i:               ; preds = %invoke_cont.i.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addSImmEi( )
+                       to label %invoke_cont.8.i unwind label %invoke_catch.0.i
+
+invoke_cont.8.i:               ; preds = %invoke_cont.7.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
+                       to label %invoke_cont.9.i unwind label %invoke_catch.0.i
+
+invoke_cont.9.i:               ; preds = %invoke_cont.8.i
+       invoke void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_( )
+                       to label %endif.0.i unwind label %invoke_catch.0.i
+
+else.i:                ; preds = %invoke_cont.5.i
+       ret void
+
+endif.0.i:             ; preds = %invoke_cont.9.i
+       invoke void @_ZNK4llvm8Function15getFunctionTypeEv( )
+                       to label %invoke_cont.33.i unwind label %invoke_catch.0.i
+
+invoke_cont.33.i:              ; preds = %endif.0.i
+       br i1 false, label %then.1.i, label %endif.1.i
+
+then.1.i:              ; preds = %invoke_cont.33.i
+       invoke void @_ZNK4llvm8Function15getFunctionTypeEv( )
+                       to label %invoke_cont.34.i unwind label %invoke_catch.0.i
+
+invoke_cont.34.i:              ; preds = %then.1.i
+       %tmp.121.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.35.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
+
+invoke_cont.35.i:              ; preds = %invoke_cont.34.i
+       %tmp.128.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.121.i )
+                       to label %invoke_cont.36.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
+
+invoke_cont.36.i:              ; preds = %invoke_cont.35.i
+       br i1 false, label %then.2.i, label %endif.1.i
+
+then.2.i:              ; preds = %invoke_cont.36.i
+       %tmp.140.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.37.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=0]
+
+invoke_cont.37.i:              ; preds = %then.2.i
+       %tmp.148.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.38.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
+
+invoke_cont.38.i:              ; preds = %invoke_cont.37.i
+       %tmp.155.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.148.i, %"struct.llvm::Type"* null, i1 false )
+                       to label %invoke_cont.39.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
+
+invoke_cont.39.i:              ; preds = %invoke_cont.38.i
+       %tmp.163.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.40.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
+
+invoke_cont.40.i:              ; preds = %invoke_cont.39.i
+       %tmp.170.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.163.i )
+                       to label %invoke_cont.41.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
+
+invoke_cont.41.i:              ; preds = %invoke_cont.40.i
+       %tmp.177.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.42.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
+
+invoke_cont.42.i:              ; preds = %invoke_cont.41.i
+       %tmp.184.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.177.i )
+                       to label %invoke_cont.43.i unwind label %invoke_catch.0.i               ; <i32> [#uses=1]
+
+invoke_cont.43.i:              ; preds = %invoke_cont.42.i
+       %tmp.191.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
+                       to label %invoke_cont.44.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
+
+invoke_cont.44.i:              ; preds = %invoke_cont.43.i
+       %tmp.198.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.191.i, %"struct.llvm::MachineFunction"* %F, i1* null )
+                       to label %invoke_cont.45.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
+
+invoke_cont.45.i:              ; preds = %invoke_cont.44.i
+       br i1 false, label %no_exit.i, label %endif.1.i
+
+no_exit.i:             ; preds = %invoke_cont.50.i, %invoke_cont.45.i
+       %nextArgOffset.0.i.1 = phi i32 [ %tmp.221.i, %invoke_cont.50.i ], [ 0, %invoke_cont.45.i ]              ; <i32> [#uses=1]
+       invoke void @_Znwj( )
+                       to label %tmp.0.i.noexc55.i unwind label %invoke_catch.0.i
+
+tmp.0.i.noexc55.i:             ; preds = %no_exit.i
+       invoke void @_ZN4llvm12MachineInstrC1Esjbb( )
+                       to label %invoke_cont.i53.i unwind label %cond_true.i52.i
+
+cond_true.i52.i:               ; preds = %tmp.0.i.noexc55.i
+       ret void
+
+invoke_cont.i53.i:             ; preds = %tmp.0.i.noexc55.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
+                       to label %invoke_cont.47.i unwind label %invoke_catch.0.i
+
+invoke_cont.47.i:              ; preds = %invoke_cont.i53.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
+                       to label %invoke_cont.48.i unwind label %invoke_catch.0.i
+
+invoke_cont.48.i:              ; preds = %invoke_cont.47.i
+       invoke void @_ZNK4llvm19MachineInstrBuilder7addSImmEi( )
+                       to label %invoke_cont.49.i unwind label %invoke_catch.0.i
+
+invoke_cont.49.i:              ; preds = %invoke_cont.48.i
+       invoke void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_( )
+                       to label %invoke_cont.50.i unwind label %invoke_catch.0.i
+
+invoke_cont.50.i:              ; preds = %invoke_cont.49.i
+       %tmp.221.i = add i32 %nextArgOffset.0.i.1, %tmp.184.i           ; <i32> [#uses=1]
+       br i1 false, label %no_exit.i, label %endif.1.i
+
+endif.1.i:             ; preds = %invoke_cont.50.i, %invoke_cont.45.i, %invoke_cont.36.i, %invoke_cont.33.i
+       ret void
+}
diff --git a/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.llx b/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
deleted file mode 100644 (file)
index 6933ee7..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-; RUN: llvm-as < %s | opt -indvars -disable-output
-; ModuleID = '2004-04-05-InvokeCastCrash.llx'
-       %struct.__false_type = type { i8 }
-       %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>" = type { %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"*, %"struct.llvm::Constant"* }
-       %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >" = type { %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"*, %"struct.std::pair<const llvm::Value* const,int>" }
-       %"struct.__gnu_cxx::hash_map<const llvm::Value*,int,__gnu_cxx::hash<const llvm::Value*>,std::equal_to<const llvm::Value*>,std::allocator<int> >" = type { %"struct.__gnu_cxx::hashtable<std::pair<const llvm::Value* const, int>,const llvm::Value*,__gnu_cxx::hash<const llvm::Value*>,std::_Select1st<std::pair<const llvm::Value* const, int> >,std::equal_to<const llvm::Value*>,std::allocator<int> >" }
-       %"struct.__gnu_cxx::hash_set<const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" = type { %"struct.__gnu_cxx::hashtable<const llvm::Constant*,const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::_Identity<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" }
-       %"struct.__gnu_cxx::hashtable<const llvm::Constant*,const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::_Identity<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >" = type { %struct.__false_type, %struct.__false_type, %struct.__false_type, %struct.__false_type, %"struct.std::vector<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >", i32 }
-       %"struct.__gnu_cxx::hashtable<std::pair<const llvm::Value* const, int>,const llvm::Value*,__gnu_cxx::hash<const llvm::Value*>,std::_Select1st<std::pair<const llvm::Value* const, int> >,std::equal_to<const llvm::Value*>,std::allocator<int> >" = type { %struct.__false_type, %struct.__false_type, %struct.__false_type, %struct.__false_type, %"struct.std::vector<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >", i32 }
-       %"struct.llvm::AbstractTypeUser" = type { i32 (...)** }
-       %"struct.llvm::Annotable" = type { i32 (...)**, %"struct.llvm::Annotation"* }
-       %"struct.llvm::Annotation" = type { i32 (...)**, %"struct.llvm::AnnotationID", %"struct.llvm::Annotation"* }
-       %"struct.llvm::AnnotationID" = type { i32 }
-       %"struct.llvm::Argument" = type { %"struct.llvm::Value", %"struct.llvm::Function"*, %"struct.llvm::Argument"*, %"struct.llvm::Argument"* }
-       %"struct.llvm::BasicBlock" = type { %"struct.llvm::Value", %"struct.llvm::iplist<llvm::Instruction,llvm::ilist_traits<llvm::Instruction> >", %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* }
-       %"struct.llvm::Constant" = type opaque
-       %"struct.llvm::DerivedType" = type { %"struct.llvm::Type", %"struct.llvm::AbstractTypeUser", %"struct.std::vector<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" }
-       %"struct.llvm::Function" = type { %"struct.llvm::GlobalValue", %"struct.llvm::Annotable", %"struct.llvm::iplist<llvm::BasicBlock,llvm::ilist_traits<llvm::BasicBlock> >", %"struct.llvm::iplist<llvm::Argument,llvm::ilist_traits<llvm::Argument> >", %"struct.llvm::SymbolTable"*, %"struct.llvm::Function"*, %"struct.llvm::Function"* }
-       %"struct.llvm::FunctionPass" = type { %"struct.llvm::Pass" }
-       %"struct.llvm::FunctionType" = type { %"struct.llvm::DerivedType", i1 }
-       %"struct.llvm::GlobalValue" = type { %"struct.llvm::User", i32, %"struct.llvm::Module"* }
-       %"struct.llvm::Instruction" = type { %"struct.llvm::User", %"struct.llvm::Annotable", %"struct.llvm::BasicBlock"*, %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"*, i32 }
-       %"struct.llvm::IntrinsicLowering" = type opaque
-       %"struct.llvm::MachineBasicBlock" = type { %"struct.llvm::ilist<llvm::MachineInstr>", %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::BasicBlock"* }
-       %"struct.llvm::MachineConstantPool" = type opaque
-       %"struct.llvm::MachineFrameInfo" = type opaque
-       %"struct.llvm::MachineFunction" = type { %"struct.llvm::Annotation", %"struct.llvm::Function"*, %"struct.llvm::TargetMachine"*, %"struct.llvm::iplist<llvm::MachineBasicBlock,llvm::ilist_traits<llvm::MachineBasicBlock> >", %"struct.llvm::SSARegMap"*, %"struct.llvm::MachineFunctionInfo"*, %"struct.llvm::MachineFrameInfo"*, %"struct.llvm::MachineConstantPool"* }
-       %"struct.llvm::MachineFunctionInfo" = type { %"struct.__gnu_cxx::hash_set<const llvm::Constant*,__gnu_cxx::hash<const llvm::Constant*>,std::equal_to<const llvm::Constant*>,std::allocator<const llvm::Constant*> >", %"struct.__gnu_cxx::hash_map<const llvm::Value*,int,__gnu_cxx::hash<const llvm::Value*>,std::equal_to<const llvm::Value*>,std::allocator<int> >", i32, i32, i32, i32, i32, i32, i32, i1, i1, i1, %"struct.llvm::MachineFunction"* }
-       %"struct.llvm::MachineFunctionPass" = type { %"struct.llvm::FunctionPass" }
-       %"struct.llvm::MachineInstr" = type { i16, i8, %"struct.std::vector<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >", %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineBasicBlock"* }
-       %"struct.llvm::MachineInstrBuilder" = type { %"struct.llvm::MachineInstr"* }
-       %"struct.llvm::MachineOperand" = type { %"union.llvm::MachineOperand::._65", i32, i32 }
-       %"struct.llvm::Module" = type opaque
-       %"struct.llvm::PATypeHandle" = type { %"struct.llvm::Type"*, %"struct.llvm::AbstractTypeUser"* }
-       %"struct.llvm::PATypeHolder" = type { %"struct.llvm::Type"* }
-       %"struct.llvm::Pass" = type { i32 (...)**, %"struct.llvm::AbstractTypeUser"*, %"struct.llvm::PassInfo"*, %"struct.std::vector<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" }
-       %"struct.llvm::PassInfo" = type { i8*, i8*, %"struct.std::type_info"*, i8, %"struct.std::vector<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >", %"struct.llvm::Pass"* ()*, %"struct.llvm::Pass"* (%"struct.llvm::TargetMachine"*)* }
-       %"struct.llvm::SSARegMap" = type opaque
-       %"struct.llvm::SymbolTable" = type opaque
-       %"struct.llvm::SymbolTableListTraits<llvm::Argument,llvm::Function,llvm::Function,llvm::ilist_traits<llvm::Argument> >" = type { %"struct.llvm::Function"*, %"struct.llvm::Function"* }
-       %"struct.llvm::SymbolTableListTraits<llvm::Instruction,llvm::BasicBlock,llvm::Function,llvm::ilist_traits<llvm::Instruction> >" = type { %"struct.llvm::Function"*, %"struct.llvm::BasicBlock"* }
-       %"struct.llvm::TargetData" = type { %"struct.llvm::FunctionPass", i1, i8, i8, i8, i8, i8, i8, i8, i8 }
-       %"struct.llvm::TargetFrameInfo" = type { i32 (...)**, i32, i32, i32 }
-       %"struct.llvm::TargetInstrDescriptor" = type { i8*, i32, i32, i32, i1, i32, i32, i32, i32, i32, i32*, i32* }
-       %"struct.llvm::TargetInstrInfo" = type { i32 (...)**, %"struct.llvm::TargetInstrDescriptor"*, i32, i32 }
-       %"struct.llvm::TargetMachine" = type { i32 (...)**, %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >", %"struct.llvm::TargetData", %"struct.llvm::IntrinsicLowering"* }
-       %"struct.llvm::TargetRegClassInfo" = type { i32 (...)**, i32, i32, i32 }
-       %"struct.llvm::TargetRegInfo" = type { i32 (...)**, %"struct.std::vector<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >", %"struct.llvm::TargetMachine"* }
-       %"struct.llvm::Type" = type { %"struct.llvm::Value", i32, i32, i1, i32, %"struct.llvm::Type"*, %"struct.std::vector<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" }
-       %"struct.llvm::Use" = type { %"struct.llvm::Value"*, %"struct.llvm::User"*, %"struct.llvm::Use"*, %"struct.llvm::Use"* }
-       %"struct.llvm::User" = type { %"struct.llvm::Value", %"struct.std::vector<llvm::Use,std::allocator<llvm::Use> >" }
-       %"struct.llvm::Value" = type { i32 (...)**, %"struct.llvm::iplist<llvm::Use,llvm::ilist_traits<llvm::Use> >", %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >", %"struct.llvm::PATypeHolder", i32 }
-       %"struct.llvm::_GLOBAL__N_::InsertPrologEpilogCode" = type { %"struct.llvm::MachineFunctionPass" }
-       %"struct.llvm::ilist<llvm::MachineInstr>" = type { %"struct.llvm::iplist<llvm::MachineInstr,llvm::ilist_traits<llvm::MachineInstr> >" }
-       %"struct.llvm::ilist_iterator<const llvm::MachineBasicBlock>" = type { %"struct.llvm::MachineBasicBlock"* }
-       %"struct.llvm::ilist_traits<llvm::Argument>" = type { %"struct.llvm::SymbolTableListTraits<llvm::Argument,llvm::Function,llvm::Function,llvm::ilist_traits<llvm::Argument> >" }
-       %"struct.llvm::ilist_traits<llvm::Instruction>" = type { %"struct.llvm::SymbolTableListTraits<llvm::Instruction,llvm::BasicBlock,llvm::Function,llvm::ilist_traits<llvm::Instruction> >" }
-       %"struct.llvm::iplist<llvm::Argument,llvm::ilist_traits<llvm::Argument> >" = type { %"struct.llvm::ilist_traits<llvm::Argument>", %"struct.llvm::Argument"*, %"struct.llvm::Argument"* }
-       %"struct.llvm::iplist<llvm::BasicBlock,llvm::ilist_traits<llvm::BasicBlock> >" = type { %"struct.llvm::ilist_traits<llvm::Argument>", %"struct.llvm::BasicBlock"*, %"struct.llvm::BasicBlock"* }
-       %"struct.llvm::iplist<llvm::Instruction,llvm::ilist_traits<llvm::Instruction> >" = type { %"struct.llvm::ilist_traits<llvm::Instruction>", %"struct.llvm::Instruction"*, %"struct.llvm::Instruction"* }
-       %"struct.llvm::iplist<llvm::MachineBasicBlock,llvm::ilist_traits<llvm::MachineBasicBlock> >" = type { %"struct.llvm::MachineBasicBlock"*, %"struct.llvm::MachineBasicBlock"* }
-       %"struct.llvm::iplist<llvm::MachineInstr,llvm::ilist_traits<llvm::MachineInstr> >" = type { %"struct.llvm::ilist_iterator<const llvm::MachineBasicBlock>", %"struct.llvm::MachineInstr"*, %"struct.llvm::MachineInstr"* }
-       %"struct.llvm::iplist<llvm::Use,llvm::ilist_traits<llvm::Use> >" = type { %"struct.llvm::Use"*, %"struct.llvm::Use"* }
-       %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*>, true>" = type { %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"**, %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"**, %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"** }
-       %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int>, true>" = type { %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"**, %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"**, %"struct.__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >"** }
-       %"struct.std::_Vector_alloc_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*>, true>" = type { %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"**, %"struct.llvm::PassInfo"** }
-       %"struct.std::_Vector_alloc_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*>, true>" = type { %"struct.llvm::TargetFrameInfo"**, %"struct.llvm::TargetFrameInfo"**, %"struct.llvm::TargetFrameInfo"** }
-       %"struct.std::_Vector_alloc_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*>, true>" = type { %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"**, %"struct.llvm::AbstractTypeUser"** }
-       %"struct.std::_Vector_alloc_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*>, true>" = type { %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"**, %"struct.llvm::MachineInstr"** }
-       %"struct.std::_Vector_alloc_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand>, true>" = type { %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"*, %"struct.llvm::MachineOperand"* }
-       %"struct.std::_Vector_alloc_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle>, true>" = type { %"struct.llvm::PATypeHandle"*, %"struct.llvm::PATypeHandle"*, %"struct.llvm::PATypeHandle"* }
-       %"struct.std::_Vector_alloc_base<llvm::Use,std::allocator<llvm::Use>, true>" = type { %"struct.llvm::Use"*, %"struct.llvm::Use"*, %"struct.llvm::Use"* }
-       %"struct.std::_Vector_alloc_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> >, true>" = type { %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"*, %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"*, %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>"* }
-       %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" = type { %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*>, true>" }
-       %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" = type { %"struct.std::_Vector_alloc_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int>, true>" }
-       %"struct.std::_Vector_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" = type { %"struct.std::_Vector_alloc_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*>, true>" }
-       %"struct.std::_Vector_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" = type { %"struct.std::_Vector_alloc_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*>, true>" }
-       %"struct.std::_Vector_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" = type { %"struct.std::_Vector_alloc_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*>, true>" }
-       %"struct.std::_Vector_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" = type { %"struct.std::_Vector_alloc_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*>, true>" }
-       %"struct.std::_Vector_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" = type { %"struct.std::_Vector_alloc_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand>, true>" }
-       %"struct.std::_Vector_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" = type { %"struct.std::_Vector_alloc_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle>, true>" }
-       %"struct.std::_Vector_base<llvm::Use,std::allocator<llvm::Use> >" = type { %"struct.std::_Vector_alloc_base<llvm::Use,std::allocator<llvm::Use>, true>" }
-       %"struct.std::_Vector_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" = type { %"struct.std::_Vector_alloc_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> >, true>" }
-       %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" }
-       %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Alloc_hider" = type { i8* }
-       %"struct.std::pair<const llvm::PassInfo*,llvm::Pass*>" = type { %"struct.llvm::PassInfo"*, %"struct.llvm::Pass"* }
-       %"struct.std::pair<const llvm::Value* const,int>" = type { %"struct.llvm::Value"*, i32 }
-       %"struct.std::type_info" = type { i32 (...)**, i8* }
-       %"struct.std::vector<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" = type { %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<const llvm::Constant*>*,std::allocator<const llvm::Constant*> >" }
-       %"struct.std::vector<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" = type { %"struct.std::_Vector_base<__gnu_cxx::_Hashtable_node<std::pair<const llvm::Value* const, int> >*,std::allocator<int> >" }
-       %"struct.std::vector<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" = type { %"struct.std::_Vector_base<const llvm::PassInfo*,std::allocator<const llvm::PassInfo*> >" }
-       %"struct.std::vector<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" = type { %"struct.std::_Vector_base<const llvm::TargetRegClassInfo*,std::allocator<const llvm::TargetRegClassInfo*> >" }
-       %"struct.std::vector<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" = type { %"struct.std::_Vector_base<llvm::AbstractTypeUser*,std::allocator<llvm::AbstractTypeUser*> >" }
-       %"struct.std::vector<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" = type { %"struct.std::_Vector_base<llvm::MachineInstr*,std::allocator<llvm::MachineInstr*> >" }
-       %"struct.std::vector<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" = type { %"struct.std::_Vector_base<llvm::MachineOperand,std::allocator<llvm::MachineOperand> >" }
-       %"struct.std::vector<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" = type { %"struct.std::_Vector_base<llvm::PATypeHandle,std::allocator<llvm::PATypeHandle> >" }
-       %"struct.std::vector<llvm::Use,std::allocator<llvm::Use> >" = type { %"struct.std::_Vector_base<llvm::Use,std::allocator<llvm::Use> >" }
-       %"struct.std::vector<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" = type { %"struct.std::_Vector_base<std::pair<const llvm::PassInfo*, llvm::Pass*>,std::allocator<std::pair<const llvm::PassInfo*, llvm::Pass*> > >" }
-       %"union.llvm::MachineOperand::._65" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >"* }
-
-declare void @_Znwj()
-
-declare void @_ZN4llvm12MachineInstrC1Esjbb()
-
-declare void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_()
-
-declare void @_ZNK4llvm8Function15getFunctionTypeEv()
-
-declare void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE()
-
-declare void @_ZNK4llvm19MachineInstrBuilder7addSImmEi()
-
-define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) {
-entry:
-       %tmp.8.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.0.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetFrameInfo"*> [#uses=0]
-
-invoke_catch.0.i:              ; preds = %invoke_cont.49.i, %invoke_cont.48.i, %invoke_cont.47.i, %invoke_cont.i53.i, %no_exit.i, %invoke_cont.44.i, %invoke_cont.43.i, %invoke_cont.42.i, %invoke_cont.41.i, %invoke_cont.40.i, %invoke_cont.39.i, %invoke_cont.38.i, %invoke_cont.37.i, %then.2.i, %invoke_cont.35.i, %invoke_cont.34.i, %then.1.i, %endif.0.i, %invoke_cont.9.i, %invoke_cont.8.i, %invoke_cont.7.i, %invoke_cont.i.i, %then.0.i, %invoke_cont.4.i, %invoke_cont.3.i, %invoke_cont.2.i, %invoke_cont.1.i, %endif.0.i.i, %tmp.7.i.noexc.i, %invoke_cont.0.i, %entry
-       ret void
-
-invoke_cont.0.i:               ; preds = %entry
-       %tmp.7.i1.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %tmp.7.i.noexc.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetFrameInfo"*> [#uses=2]
-
-tmp.7.i.noexc.i:               ; preds = %invoke_cont.0.i
-       %tmp.17.i2.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.7.i1.i )
-                       to label %endif.0.i.i unwind label %invoke_catch.0.i            ; <i32> [#uses=0]
-
-endif.0.i.i:           ; preds = %tmp.7.i.noexc.i
-       %tmp.38.i4.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.7.i1.i )
-                       to label %tmp.38.i.noexc.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
-
-tmp.38.i.noexc.i:              ; preds = %endif.0.i.i
-       br i1 false, label %invoke_cont.1.i, label %then.1.i.i
-
-then.1.i.i:            ; preds = %tmp.38.i.noexc.i
-       ret void
-
-invoke_cont.1.i:               ; preds = %tmp.38.i.noexc.i
-       %tmp.21.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.2.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
-
-invoke_cont.2.i:               ; preds = %invoke_cont.1.i
-       %tmp.28.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.21.i )
-                       to label %invoke_cont.3.i unwind label %invoke_catch.0.i                ; <i32> [#uses=0]
-
-invoke_cont.3.i:               ; preds = %invoke_cont.2.i
-       %tmp.36.i = invoke %"struct.llvm::TargetInstrInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.4.i unwind label %invoke_catch.0.i                ; <%"struct.llvm::TargetInstrInfo"*> [#uses=1]
-
-invoke_cont.4.i:               ; preds = %invoke_cont.3.i
-       %tmp.43.i = invoke i1 null( %"struct.llvm::TargetInstrInfo"* %tmp.36.i, i16 383, i64 0 )
-                       to label %invoke_cont.5.i unwind label %invoke_catch.0.i                ; <i1> [#uses=1]
-
-invoke_cont.5.i:               ; preds = %invoke_cont.4.i
-       br i1 %tmp.43.i, label %then.0.i, label %else.i
-
-then.0.i:              ; preds = %invoke_cont.5.i
-       invoke void @_Znwj( )
-                       to label %tmp.0.i.noexc.i unwind label %invoke_catch.0.i
-
-tmp.0.i.noexc.i:               ; preds = %then.0.i
-       invoke void @_ZN4llvm12MachineInstrC1Esjbb( )
-                       to label %invoke_cont.i.i unwind label %cond_true.i.i
-
-cond_true.i.i:         ; preds = %tmp.0.i.noexc.i
-       ret void
-
-invoke_cont.i.i:               ; preds = %tmp.0.i.noexc.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
-                       to label %invoke_cont.7.i unwind label %invoke_catch.0.i
-
-invoke_cont.7.i:               ; preds = %invoke_cont.i.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addSImmEi( )
-                       to label %invoke_cont.8.i unwind label %invoke_catch.0.i
-
-invoke_cont.8.i:               ; preds = %invoke_cont.7.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
-                       to label %invoke_cont.9.i unwind label %invoke_catch.0.i
-
-invoke_cont.9.i:               ; preds = %invoke_cont.8.i
-       invoke void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_( )
-                       to label %endif.0.i unwind label %invoke_catch.0.i
-
-else.i:                ; preds = %invoke_cont.5.i
-       ret void
-
-endif.0.i:             ; preds = %invoke_cont.9.i
-       invoke void @_ZNK4llvm8Function15getFunctionTypeEv( )
-                       to label %invoke_cont.33.i unwind label %invoke_catch.0.i
-
-invoke_cont.33.i:              ; preds = %endif.0.i
-       br i1 false, label %then.1.i, label %endif.1.i
-
-then.1.i:              ; preds = %invoke_cont.33.i
-       invoke void @_ZNK4llvm8Function15getFunctionTypeEv( )
-                       to label %invoke_cont.34.i unwind label %invoke_catch.0.i
-
-invoke_cont.34.i:              ; preds = %then.1.i
-       %tmp.121.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.35.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
-
-invoke_cont.35.i:              ; preds = %invoke_cont.34.i
-       %tmp.128.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.121.i )
-                       to label %invoke_cont.36.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
-
-invoke_cont.36.i:              ; preds = %invoke_cont.35.i
-       br i1 false, label %then.2.i, label %endif.1.i
-
-then.2.i:              ; preds = %invoke_cont.36.i
-       %tmp.140.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.37.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=0]
-
-invoke_cont.37.i:              ; preds = %then.2.i
-       %tmp.148.i = invoke %"struct.llvm::TargetRegInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.38.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetRegInfo"*> [#uses=1]
-
-invoke_cont.38.i:              ; preds = %invoke_cont.37.i
-       %tmp.155.i = invoke i32 null( %"struct.llvm::TargetRegInfo"* %tmp.148.i, %"struct.llvm::Type"* null, i1 false )
-                       to label %invoke_cont.39.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
-
-invoke_cont.39.i:              ; preds = %invoke_cont.38.i
-       %tmp.163.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.40.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
-
-invoke_cont.40.i:              ; preds = %invoke_cont.39.i
-       %tmp.170.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.163.i )
-                       to label %invoke_cont.41.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
-
-invoke_cont.41.i:              ; preds = %invoke_cont.40.i
-       %tmp.177.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.42.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
-
-invoke_cont.42.i:              ; preds = %invoke_cont.41.i
-       %tmp.184.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.177.i )
-                       to label %invoke_cont.43.i unwind label %invoke_catch.0.i               ; <i32> [#uses=1]
-
-invoke_cont.43.i:              ; preds = %invoke_cont.42.i
-       %tmp.191.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
-                       to label %invoke_cont.44.i unwind label %invoke_catch.0.i               ; <%"struct.llvm::TargetFrameInfo"*> [#uses=1]
-
-invoke_cont.44.i:              ; preds = %invoke_cont.43.i
-       %tmp.198.i = invoke i32 null( %"struct.llvm::TargetFrameInfo"* %tmp.191.i, %"struct.llvm::MachineFunction"* %F, i1* null )
-                       to label %invoke_cont.45.i unwind label %invoke_catch.0.i               ; <i32> [#uses=0]
-
-invoke_cont.45.i:              ; preds = %invoke_cont.44.i
-       br i1 false, label %no_exit.i, label %endif.1.i
-
-no_exit.i:             ; preds = %invoke_cont.50.i, %invoke_cont.45.i
-       %nextArgOffset.0.i.1 = phi i32 [ %tmp.221.i, %invoke_cont.50.i ], [ 0, %invoke_cont.45.i ]              ; <i32> [#uses=1]
-       invoke void @_Znwj( )
-                       to label %tmp.0.i.noexc55.i unwind label %invoke_catch.0.i
-
-tmp.0.i.noexc55.i:             ; preds = %no_exit.i
-       invoke void @_ZN4llvm12MachineInstrC1Esjbb( )
-                       to label %invoke_cont.i53.i unwind label %cond_true.i52.i
-
-cond_true.i52.i:               ; preds = %tmp.0.i.noexc55.i
-       ret void
-
-invoke_cont.i53.i:             ; preds = %tmp.0.i.noexc55.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
-                       to label %invoke_cont.47.i unwind label %invoke_catch.0.i
-
-invoke_cont.47.i:              ; preds = %invoke_cont.i53.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addMRegEiNS_14MachineOperand7UseTypeE( )
-                       to label %invoke_cont.48.i unwind label %invoke_catch.0.i
-
-invoke_cont.48.i:              ; preds = %invoke_cont.47.i
-       invoke void @_ZNK4llvm19MachineInstrBuilder7addSImmEi( )
-                       to label %invoke_cont.49.i unwind label %invoke_catch.0.i
-
-invoke_cont.49.i:              ; preds = %invoke_cont.48.i
-       invoke void @_ZNSt6vectorIPN4llvm12MachineInstrESaIS2_EE9push_backERKS2_( )
-                       to label %invoke_cont.50.i unwind label %invoke_catch.0.i
-
-invoke_cont.50.i:              ; preds = %invoke_cont.49.i
-       %tmp.221.i = add i32 %nextArgOffset.0.i.1, %tmp.184.i           ; <i32> [#uses=1]
-       br i1 false, label %no_exit.i, label %endif.1.i
-
-endif.1.i:             ; preds = %invoke_cont.50.i, %invoke_cont.45.i, %invoke_cont.36.i, %invoke_cont.33.i
-       ret void
-}
diff --git a/test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.ll b/test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.ll
new file mode 100644 (file)
index 0000000..b4eb3db
--- /dev/null
@@ -0,0 +1,27 @@
+; RUN: llvm-as < %s | opt -indvars -disable-output
+
+define void @.outPlank_21() {
+entry:
+        br i1 false, label %loopexit.0, label %no_exit.0
+
+no_exit.0:              ; preds = %entry
+        ret void
+
+loopexit.0:             ; preds = %entry
+        br i1 false, label %no_exit.1, label %loopexit.1
+
+no_exit.1:              ; preds = %loopexit.2, %loopexit.0
+        %i.0.0 = phi i32 [ %inc, %loopexit.2 ], [ 0, %loopexit.0 ]              ; <i32> [#uses=1]
+        br i1 false, label %loopexit.2, label %no_exit.2
+
+no_exit.2:              ; preds = %no_exit.1
+        ret void
+
+loopexit.2:             ; preds = %no_exit.1
+        %inc = add i32 %i.0.0, 1                ; <i32> [#uses=1]
+        br i1 false, label %no_exit.1, label %loopexit.1
+
+loopexit.1:             ; preds = %loopexit.2, %loopexit.0
+        ret void
+}
+
diff --git a/test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.llx b/test/Transforms/IndVarsSimplify/2004-04-07-ScalarEvolutionCrash.llx
deleted file mode 100644 (file)
index b4eb3db..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: llvm-as < %s | opt -indvars -disable-output
-
-define void @.outPlank_21() {
-entry:
-        br i1 false, label %loopexit.0, label %no_exit.0
-
-no_exit.0:              ; preds = %entry
-        ret void
-
-loopexit.0:             ; preds = %entry
-        br i1 false, label %no_exit.1, label %loopexit.1
-
-no_exit.1:              ; preds = %loopexit.2, %loopexit.0
-        %i.0.0 = phi i32 [ %inc, %loopexit.2 ], [ 0, %loopexit.0 ]              ; <i32> [#uses=1]
-        br i1 false, label %loopexit.2, label %no_exit.2
-
-no_exit.2:              ; preds = %no_exit.1
-        ret void
-
-loopexit.2:             ; preds = %no_exit.1
-        %inc = add i32 %i.0.0, 1                ; <i32> [#uses=1]
-        br i1 false, label %no_exit.1, label %loopexit.1
-
-loopexit.1:             ; preds = %loopexit.2, %loopexit.0
-        ret void
-}
-
diff --git a/test/Transforms/IndVarsSimplify/exit_value_tests.ll b/test/Transforms/IndVarsSimplify/exit_value_tests.ll
new file mode 100644 (file)
index 0000000..5e26ea2
--- /dev/null
@@ -0,0 +1,114 @@
+; Test that we can evaluate the exit values of various expression types.  Since
+; these loops all have predictable exit values we can replace the use outside
+; of the loop with a closed-form computation, making the loop dead.
+;
+; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | \
+; RUN:   llvm-dis | not grep br
+
+define i32 @polynomial_constant() {
+; <label>:0
+       br label %Loop
+
+Loop:          ; preds = %Loop, %0
+       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=3]
+       %B1 = phi i32 [ 0, %0 ], [ %B2, %Loop ]         ; <i32> [#uses=1]
+       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
+       %B2 = add i32 %B1, %A1          ; <i32> [#uses=2]
+       %C = icmp eq i32 %A1, 1000              ; <i1> [#uses=1]
+       br i1 %C, label %Out, label %Loop
+
+Out:           ; preds = %Loop
+       ret i32 %B2
+}
+
+define i32 @NSquare(i32 %N) {
+; <label>:0
+       br label %Loop
+
+Loop:          ; preds = %Loop, %0
+       %X = phi i32 [ 0, %0 ], [ %X2, %Loop ]          ; <i32> [#uses=4]
+       %X2 = add i32 %X, 1             ; <i32> [#uses=1]
+       %c = icmp eq i32 %X, %N         ; <i1> [#uses=1]
+       br i1 %c, label %Out, label %Loop
+
+Out:           ; preds = %Loop
+       %Y = mul i32 %X, %X             ; <i32> [#uses=1]
+       ret i32 %Y
+}
+
+define i32 @NSquareOver2(i32 %N) {
+; <label>:0
+       br label %Loop
+
+Loop:          ; preds = %Loop, %0
+       %X = phi i32 [ 0, %0 ], [ %X2, %Loop ]          ; <i32> [#uses=3]
+       %Y = phi i32 [ 15, %0 ], [ %Y2, %Loop ]         ; <i32> [#uses=1]
+       %Y2 = add i32 %Y, %X            ; <i32> [#uses=2]
+       %X2 = add i32 %X, 1             ; <i32> [#uses=1]
+       %c = icmp eq i32 %X, %N         ; <i1> [#uses=1]
+       br i1 %c, label %Out, label %Loop
+
+Out:           ; preds = %Loop
+       ret i32 %Y2
+}
+
+define i32 @strength_reduced() {
+; <label>:0
+       br label %Loop
+
+Loop:          ; preds = %Loop, %0
+       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=3]
+       %B1 = phi i32 [ 0, %0 ], [ %B2, %Loop ]         ; <i32> [#uses=1]
+       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
+       %B2 = add i32 %B1, %A1          ; <i32> [#uses=2]
+       %C = icmp eq i32 %A1, 1000              ; <i1> [#uses=1]
+       br i1 %C, label %Out, label %Loop
+
+Out:           ; preds = %Loop
+       ret i32 %B2
+}
+
+define i32 @chrec_equals() {
+entry:
+       br label %no_exit
+
+no_exit:               ; preds = %no_exit, %entry
+       %i0 = phi i32 [ 0, %entry ], [ %i1, %no_exit ]          ; <i32> [#uses=3]
+       %ISq = mul i32 %i0, %i0         ; <i32> [#uses=1]
+       %i1 = add i32 %i0, 1            ; <i32> [#uses=2]
+       %tmp.1 = icmp ne i32 %ISq, 10000                ; <i1> [#uses=1]
+       br i1 %tmp.1, label %no_exit, label %loopexit
+
+loopexit:              ; preds = %no_exit
+       ret i32 %i1
+}
+
+define i16 @cast_chrec_test() {
+; <label>:0
+       br label %Loop
+
+Loop:          ; preds = %Loop, %0
+       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=2]
+       %B1 = trunc i32 %A1 to i16              ; <i16> [#uses=2]
+       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
+       %C = icmp eq i16 %B1, 1000              ; <i1> [#uses=1]
+       br i1 %C, label %Out, label %Loop
+
+Out:           ; preds = %Loop
+       ret i16 %B1
+}
+
+define i32 @linear_div_fold() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 4, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+       %i.next = add i32 %i, 8         ; <i32> [#uses=1]
+       %RV = udiv i32 %i, 2            ; <i32> [#uses=1]
+       %c = icmp ne i32 %i, 68         ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %RV
+}
diff --git a/test/Transforms/IndVarsSimplify/exit_value_tests.llx b/test/Transforms/IndVarsSimplify/exit_value_tests.llx
deleted file mode 100644 (file)
index 5e26ea2..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-; Test that we can evaluate the exit values of various expression types.  Since
-; these loops all have predictable exit values we can replace the use outside
-; of the loop with a closed-form computation, making the loop dead.
-;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | \
-; RUN:   llvm-dis | not grep br
-
-define i32 @polynomial_constant() {
-; <label>:0
-       br label %Loop
-
-Loop:          ; preds = %Loop, %0
-       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=3]
-       %B1 = phi i32 [ 0, %0 ], [ %B2, %Loop ]         ; <i32> [#uses=1]
-       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
-       %B2 = add i32 %B1, %A1          ; <i32> [#uses=2]
-       %C = icmp eq i32 %A1, 1000              ; <i1> [#uses=1]
-       br i1 %C, label %Out, label %Loop
-
-Out:           ; preds = %Loop
-       ret i32 %B2
-}
-
-define i32 @NSquare(i32 %N) {
-; <label>:0
-       br label %Loop
-
-Loop:          ; preds = %Loop, %0
-       %X = phi i32 [ 0, %0 ], [ %X2, %Loop ]          ; <i32> [#uses=4]
-       %X2 = add i32 %X, 1             ; <i32> [#uses=1]
-       %c = icmp eq i32 %X, %N         ; <i1> [#uses=1]
-       br i1 %c, label %Out, label %Loop
-
-Out:           ; preds = %Loop
-       %Y = mul i32 %X, %X             ; <i32> [#uses=1]
-       ret i32 %Y
-}
-
-define i32 @NSquareOver2(i32 %N) {
-; <label>:0
-       br label %Loop
-
-Loop:          ; preds = %Loop, %0
-       %X = phi i32 [ 0, %0 ], [ %X2, %Loop ]          ; <i32> [#uses=3]
-       %Y = phi i32 [ 15, %0 ], [ %Y2, %Loop ]         ; <i32> [#uses=1]
-       %Y2 = add i32 %Y, %X            ; <i32> [#uses=2]
-       %X2 = add i32 %X, 1             ; <i32> [#uses=1]
-       %c = icmp eq i32 %X, %N         ; <i1> [#uses=1]
-       br i1 %c, label %Out, label %Loop
-
-Out:           ; preds = %Loop
-       ret i32 %Y2
-}
-
-define i32 @strength_reduced() {
-; <label>:0
-       br label %Loop
-
-Loop:          ; preds = %Loop, %0
-       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=3]
-       %B1 = phi i32 [ 0, %0 ], [ %B2, %Loop ]         ; <i32> [#uses=1]
-       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
-       %B2 = add i32 %B1, %A1          ; <i32> [#uses=2]
-       %C = icmp eq i32 %A1, 1000              ; <i1> [#uses=1]
-       br i1 %C, label %Out, label %Loop
-
-Out:           ; preds = %Loop
-       ret i32 %B2
-}
-
-define i32 @chrec_equals() {
-entry:
-       br label %no_exit
-
-no_exit:               ; preds = %no_exit, %entry
-       %i0 = phi i32 [ 0, %entry ], [ %i1, %no_exit ]          ; <i32> [#uses=3]
-       %ISq = mul i32 %i0, %i0         ; <i32> [#uses=1]
-       %i1 = add i32 %i0, 1            ; <i32> [#uses=2]
-       %tmp.1 = icmp ne i32 %ISq, 10000                ; <i1> [#uses=1]
-       br i1 %tmp.1, label %no_exit, label %loopexit
-
-loopexit:              ; preds = %no_exit
-       ret i32 %i1
-}
-
-define i16 @cast_chrec_test() {
-; <label>:0
-       br label %Loop
-
-Loop:          ; preds = %Loop, %0
-       %A1 = phi i32 [ 0, %0 ], [ %A2, %Loop ]         ; <i32> [#uses=2]
-       %B1 = trunc i32 %A1 to i16              ; <i16> [#uses=2]
-       %A2 = add i32 %A1, 1            ; <i32> [#uses=1]
-       %C = icmp eq i16 %B1, 1000              ; <i1> [#uses=1]
-       br i1 %C, label %Out, label %Loop
-
-Out:           ; preds = %Loop
-       ret i16 %B1
-}
-
-define i32 @linear_div_fold() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 4, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-       %i.next = add i32 %i, 8         ; <i32> [#uses=1]
-       %RV = udiv i32 %i, 2            ; <i32> [#uses=1]
-       %c = icmp ne i32 %i, 68         ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %RV
-}
diff --git a/test/Transforms/IndVarsSimplify/lftr_simple.ll b/test/Transforms/IndVarsSimplify/lftr_simple.ll
new file mode 100644 (file)
index 0000000..3f7c289
--- /dev/null
@@ -0,0 +1,22 @@
+; LFTR should eliminate the need for the computation of i*i completely.  It 
+; is only used to compute the exit value.
+; RUN: llvm-as < %s | opt -indvars -dce | llvm-dis | not grep mul
+
+@A = external global i32                ; <i32*> [#uses=1]
+
+define i32 @quadratic_setlt() {
+entry:
+        br label %loop
+
+loop:           ; preds = %loop, %entry
+        %i = phi i32 [ 7, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=5]
+        %i.next = add i32 %i, 1         ; <i32> [#uses=1]
+        store i32 %i, i32* @A
+        %i2 = mul i32 %i, %i            ; <i32> [#uses=1]
+        %c = icmp slt i32 %i2, 1000             ; <i1> [#uses=1]
+        br i1 %c, label %loop, label %loopexit
+
+loopexit:               ; preds = %loop
+        ret i32 %i
+}
+
diff --git a/test/Transforms/IndVarsSimplify/lftr_simple.llx b/test/Transforms/IndVarsSimplify/lftr_simple.llx
deleted file mode 100644 (file)
index 3f7c289..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-; LFTR should eliminate the need for the computation of i*i completely.  It 
-; is only used to compute the exit value.
-; RUN: llvm-as < %s | opt -indvars -dce | llvm-dis | not grep mul
-
-@A = external global i32                ; <i32*> [#uses=1]
-
-define i32 @quadratic_setlt() {
-entry:
-        br label %loop
-
-loop:           ; preds = %loop, %entry
-        %i = phi i32 [ 7, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=5]
-        %i.next = add i32 %i, 1         ; <i32> [#uses=1]
-        store i32 %i, i32* @A
-        %i2 = mul i32 %i, %i            ; <i32> [#uses=1]
-        %c = icmp slt i32 %i2, 1000             ; <i1> [#uses=1]
-        br i1 %c, label %loop, label %loopexit
-
-loopexit:               ; preds = %loop
-        ret i32 %i
-}
-
diff --git a/test/Transforms/IndVarsSimplify/tripcount_compute.ll b/test/Transforms/IndVarsSimplify/tripcount_compute.ll
new file mode 100644 (file)
index 0000000..1abc82d
--- /dev/null
@@ -0,0 +1,100 @@
+; These tests ensure that we can compute the trip count of various forms of
+; loops.  If the trip count of the loop is computable, then we will know what
+; the exit value of the loop will be for some value, allowing us to substitute
+; it directly into users outside of the loop, making the loop dead.
+;
+; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
+
+define i32 @linear_setne() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
+       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %i
+}
+
+define i32 @linear_setne_2() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+       %i.next = add i32 %i, 2         ; <i32> [#uses=1]
+       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %i
+}
+
+define i32 @linear_setne_overflow() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 1024, %entry ], [ %i.next, %loop ]               ; <i32> [#uses=3]
+       %i.next = add i32 %i, 1024              ; <i32> [#uses=1]
+       %c = icmp ne i32 %i, 0          ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %i
+}
+
+define i32 @linear_setlt() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
+       %c = icmp slt i32 %i, 100               ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %i
+}
+
+define i32 @quadratic_setlt() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 7, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=4]
+       %i.next = add i32 %i, 3         ; <i32> [#uses=1]
+       %i2 = mul i32 %i, %i            ; <i32> [#uses=1]
+       %c = icmp slt i32 %i2, 1000             ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       ret i32 %i
+}
+
+define i32 @chained() {
+entry:
+       br label %loop
+
+loop:          ; preds = %loop, %entry
+       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
+       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
+       br i1 %c, label %loop, label %loopexit
+
+loopexit:              ; preds = %loop
+       br label %loop2
+
+loop2:         ; preds = %loop2, %loopexit
+       %j = phi i32 [ %i, %loopexit ], [ %j.next, %loop2 ]             ; <i32> [#uses=3]
+       %j.next = add i32 %j, 1         ; <i32> [#uses=1]
+       %c2 = icmp ne i32 %j, 200               ; <i1> [#uses=1]
+       br i1 %c2, label %loop2, label %loopexit2
+
+loopexit2:             ; preds = %loop2
+       ret i32 %j
+}
diff --git a/test/Transforms/IndVarsSimplify/tripcount_compute.llx b/test/Transforms/IndVarsSimplify/tripcount_compute.llx
deleted file mode 100644 (file)
index 1abc82d..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-; These tests ensure that we can compute the trip count of various forms of
-; loops.  If the trip count of the loop is computable, then we will know what
-; the exit value of the loop will be for some value, allowing us to substitute
-; it directly into users outside of the loop, making the loop dead.
-;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | not grep br
-
-define i32 @linear_setne() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
-       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %i
-}
-
-define i32 @linear_setne_2() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-       %i.next = add i32 %i, 2         ; <i32> [#uses=1]
-       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %i
-}
-
-define i32 @linear_setne_overflow() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 1024, %entry ], [ %i.next, %loop ]               ; <i32> [#uses=3]
-       %i.next = add i32 %i, 1024              ; <i32> [#uses=1]
-       %c = icmp ne i32 %i, 0          ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %i
-}
-
-define i32 @linear_setlt() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
-       %c = icmp slt i32 %i, 100               ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %i
-}
-
-define i32 @quadratic_setlt() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 7, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=4]
-       %i.next = add i32 %i, 3         ; <i32> [#uses=1]
-       %i2 = mul i32 %i, %i            ; <i32> [#uses=1]
-       %c = icmp slt i32 %i2, 1000             ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       ret i32 %i
-}
-
-define i32 @chained() {
-entry:
-       br label %loop
-
-loop:          ; preds = %loop, %entry
-       %i = phi i32 [ 0, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-       %i.next = add i32 %i, 1         ; <i32> [#uses=1]
-       %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
-       br i1 %c, label %loop, label %loopexit
-
-loopexit:              ; preds = %loop
-       br label %loop2
-
-loop2:         ; preds = %loop2, %loopexit
-       %j = phi i32 [ %i, %loopexit ], [ %j.next, %loop2 ]             ; <i32> [#uses=3]
-       %j.next = add i32 %j, 1         ; <i32> [#uses=1]
-       %c2 = icmp ne i32 %j, 200               ; <i1> [#uses=1]
-       br i1 %c2, label %loop2, label %loopexit2
-
-loopexit2:             ; preds = %loop2
-       ret i32 %j
-}
diff --git a/test/Transforms/IndVarsSimplify/tripcount_infinite.ll b/test/Transforms/IndVarsSimplify/tripcount_infinite.ll
new file mode 100644 (file)
index 0000000..d5965f4
--- /dev/null
@@ -0,0 +1,38 @@
+; These tests have an infinite trip count.  We obviously shouldn't remove the 
+; loops!  :)
+;
+; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep icmp | wc -l > %t2
+; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1
+; RUN: diff %t1 %t2
+
+;; test for (i = 1; i != 100; i += 2)
+define i32 @infinite_linear() {
+entry:
+        br label %loop
+
+loop:           ; preds = %loop, %entry
+        %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
+        %i.next = add i32 %i, 2         ; <i32> [#uses=1]
+        %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
+        br i1 %c, label %loop, label %loopexit
+
+loopexit:               ; preds = %loop
+        ret i32 %i
+}
+
+;; test for (i = 1; i*i != 63; ++i)
+define i32 @infinite_quadratic() {
+entry:
+        br label %loop
+
+loop:           ; preds = %loop, %entry
+        %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=4]
+        %isquare = mul i32 %i, %i               ; <i32> [#uses=1]
+        %i.next = add i32 %i, 1         ; <i32> [#uses=1]
+        %c = icmp ne i32 %isquare, 63           ; <i1> [#uses=1]
+        br i1 %c, label %loop, label %loopexit
+
+loopexit:               ; preds = %loop
+        ret i32 %i
+}
+
diff --git a/test/Transforms/IndVarsSimplify/tripcount_infinite.llx b/test/Transforms/IndVarsSimplify/tripcount_infinite.llx
deleted file mode 100644 (file)
index d5965f4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-; These tests have an infinite trip count.  We obviously shouldn't remove the 
-; loops!  :)
-;
-; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep icmp | wc -l > %t2
-; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1
-; RUN: diff %t1 %t2
-
-;; test for (i = 1; i != 100; i += 2)
-define i32 @infinite_linear() {
-entry:
-        br label %loop
-
-loop:           ; preds = %loop, %entry
-        %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=3]
-        %i.next = add i32 %i, 2         ; <i32> [#uses=1]
-        %c = icmp ne i32 %i, 100                ; <i1> [#uses=1]
-        br i1 %c, label %loop, label %loopexit
-
-loopexit:               ; preds = %loop
-        ret i32 %i
-}
-
-;; test for (i = 1; i*i != 63; ++i)
-define i32 @infinite_quadratic() {
-entry:
-        br label %loop
-
-loop:           ; preds = %loop, %entry
-        %i = phi i32 [ 1, %entry ], [ %i.next, %loop ]          ; <i32> [#uses=4]
-        %isquare = mul i32 %i, %i               ; <i32> [#uses=1]
-        %i.next = add i32 %i, 1         ; <i32> [#uses=1]
-        %c = icmp ne i32 %isquare, 63           ; <i1> [#uses=1]
-        br i1 %c, label %loop, label %loopexit
-
-loopexit:               ; preds = %loop
-        ret i32 %i
-}
-
diff --git a/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll b/test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll
new file mode 100644 (file)
index 0000000..d9f09a0
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
+
+define linkonce void @caller() {
+        call void @callee( )
+        ret void
+}
+
+define linkonce void @callee() {
+        ret void
+}
+
diff --git a/test/Transforms/Inline/2004-04-20-InlineLinkOnce.llx b/test/Transforms/Inline/2004-04-20-InlineLinkOnce.llx
deleted file mode 100644 (file)
index d9f09a0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output
-
-define linkonce void @caller() {
-        call void @callee( )
-        ret void
-}
-
-define linkonce void @callee() {
-        ret void
-}
-
diff --git a/test/Transforms/InstCombine/2004-08-09-RemInfLoop.ll b/test/Transforms/InstCombine/2004-08-09-RemInfLoop.ll
new file mode 100644 (file)
index 0000000..9fc48de
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -instcombine
+
+; This testcase should not send the instcombiner into an infinite loop!
+
+define i32 @test(i32 %X) {
+        %Y = srem i32 %X, 0             ; <i32> [#uses=1]
+        ret i32 %Y
+}
+
diff --git a/test/Transforms/InstCombine/2004-08-09-RemInfLoop.llx b/test/Transforms/InstCombine/2004-08-09-RemInfLoop.llx
deleted file mode 100644 (file)
index 9fc48de..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -instcombine
-
-; This testcase should not send the instcombiner into an infinite loop!
-
-define i32 @test(i32 %X) {
-        %Y = srem i32 %X, 0             ; <i32> [#uses=1]
-        ret i32 %Y
-}
-
diff --git a/test/Transforms/InstCombine/2004-09-20-BadLoadCombine.ll b/test/Transforms/InstCombine/2004-09-20-BadLoadCombine.ll
new file mode 100644 (file)
index 0000000..e56c390
--- /dev/null
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | \
+; RUN:   not grep {i32 1}
+
+; When propagating the load through the select, make sure that the load is
+; inserted where the original load was, not where the select is.  Not doing
+; so could produce incorrect results!
+
+define i32 @test(i1 %C) {
+        %X = alloca i32         ; <i32*> [#uses=3]
+        %X2 = alloca i32                ; <i32*> [#uses=2]
+        store i32 1, i32* %X
+        store i32 2, i32* %X2
+        %Y = select i1 %C, i32* %X, i32* %X2            ; <i32*> [#uses=1]
+        store i32 3, i32* %X
+        %Z = load i32* %Y               ; <i32> [#uses=1]
+        ret i32 %Z
+}
+
diff --git a/test/Transforms/InstCombine/2004-09-20-BadLoadCombine.llx b/test/Transforms/InstCombine/2004-09-20-BadLoadCombine.llx
deleted file mode 100644 (file)
index e56c390..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | \
-; RUN:   not grep {i32 1}
-
-; When propagating the load through the select, make sure that the load is
-; inserted where the original load was, not where the select is.  Not doing
-; so could produce incorrect results!
-
-define i32 @test(i1 %C) {
-        %X = alloca i32         ; <i32*> [#uses=3]
-        %X2 = alloca i32                ; <i32*> [#uses=2]
-        store i32 1, i32* %X
-        store i32 2, i32* %X2
-        %Y = select i1 %C, i32* %X, i32* %X2            ; <i32*> [#uses=1]
-        store i32 3, i32* %X
-        %Z = load i32* %Y               ; <i32> [#uses=1]
-        ret i32 %Z
-}
-
diff --git a/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll b/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll
new file mode 100644 (file)
index 0000000..3585659
--- /dev/null
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | opt -instcombine -mem2reg -simplifycfg | \
+; RUN:   llvm-dis | grep -v store | not grep {int 1}
+
+; Test to make sure that instcombine does not accidentally propagate the load
+; into the PHI, which would break the program.
+
+define i32 @test(i1 %C) {
+entry:
+        %X = alloca i32         ; <i32*> [#uses=3]
+        %X2 = alloca i32                ; <i32*> [#uses=2]
+        store i32 1, i32* %X
+        store i32 2, i32* %X2
+        br i1 %C, label %cond_true.i, label %cond_continue.i
+
+cond_true.i:            ; preds = %entry
+        br label %cond_continue.i
+
+cond_continue.i:                ; preds = %cond_true.i, %entry
+        %mem_tmp.i.0 = phi i32* [ %X, %cond_true.i ], [ %X2, %entry ]           ; <i32*> [#uses=1]
+        store i32 3, i32* %X
+        %tmp.3 = load i32* %mem_tmp.i.0         ; <i32> [#uses=1]
+        ret i32 %tmp.3
+}
+
+
diff --git a/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.llx b/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.llx
deleted file mode 100644 (file)
index 3585659..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-; RUN: llvm-as < %s | opt -instcombine -mem2reg -simplifycfg | \
-; RUN:   llvm-dis | grep -v store | not grep {int 1}
-
-; Test to make sure that instcombine does not accidentally propagate the load
-; into the PHI, which would break the program.
-
-define i32 @test(i1 %C) {
-entry:
-        %X = alloca i32         ; <i32*> [#uses=3]
-        %X2 = alloca i32                ; <i32*> [#uses=2]
-        store i32 1, i32* %X
-        store i32 2, i32* %X2
-        br i1 %C, label %cond_true.i, label %cond_continue.i
-
-cond_true.i:            ; preds = %entry
-        br label %cond_continue.i
-
-cond_continue.i:                ; preds = %cond_true.i, %entry
-        %mem_tmp.i.0 = phi i32* [ %X, %cond_true.i ], [ %X2, %entry ]           ; <i32*> [#uses=1]
-        store i32 3, i32* %X
-        %tmp.3 = load i32* %mem_tmp.i.0         ; <i32> [#uses=1]
-        ret i32 %tmp.3
-}
-
-
diff --git a/test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.ll b/test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.ll
new file mode 100644 (file)
index 0000000..ee4f62c
--- /dev/null
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep -- -65536
+
+define i1 @test(i32 %tmp.124) {
+        %tmp.125 = shl i32 %tmp.124, 8          ; <i32> [#uses=1]
+        %tmp.126.mask = and i32 %tmp.125, -16777216             ; <i32> [#uses=1]
+        %tmp.128 = icmp eq i32 %tmp.126.mask, 167772160         ; <i1> [#uses=1]
+        ret i1 %tmp.128
+}
+
diff --git a/test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.llx b/test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.llx
deleted file mode 100644 (file)
index ee4f62c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep -- -65536
-
-define i1 @test(i32 %tmp.124) {
-        %tmp.125 = shl i32 %tmp.124, 8          ; <i32> [#uses=1]
-        %tmp.126.mask = and i32 %tmp.125, -16777216             ; <i32> [#uses=1]
-        %tmp.128 = icmp eq i32 %tmp.126.mask, 167772160         ; <i1> [#uses=1]
-        ret i1 %tmp.128
-}
-
diff --git a/test/Transforms/InstCombine/CPP_min_max.ll b/test/Transforms/InstCombine/CPP_min_max.ll
new file mode 100644 (file)
index 0000000..785b91e
--- /dev/null
@@ -0,0 +1,34 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
+; RUN:   grep select | not grep {i32\\*}
+
+; This testcase corresponds to PR362, which notices that this horrible code
+; is generated by the C++ front-end and LLVM optimizers, which has lots of
+; loads and other stuff that are unneeded.
+;
+; Instcombine should propagate the load through the select instructions to
+; allow elimination of the extra stuff by the mem2reg pass.
+
+define void @_Z5test1RiS_(i32* %x, i32* %y) {
+entry:
+        %tmp.1.i = load i32* %y         ; <i32> [#uses=1]
+        %tmp.3.i = load i32* %x         ; <i32> [#uses=1]
+        %tmp.4.i = icmp slt i32 %tmp.1.i, %tmp.3.i              ; <i1> [#uses=1]
+        %retval.i = select i1 %tmp.4.i, i32* %y, i32* %x                ; <i32*> [#uses=1]
+        %tmp.4 = load i32* %retval.i            ; <i32> [#uses=1]
+        store i32 %tmp.4, i32* %x
+        ret void
+}
+
+define void @_Z5test2RiS_(i32* %x, i32* %y) {
+entry:
+        %tmp.0 = alloca i32             ; <i32*> [#uses=2]
+        %tmp.2 = load i32* %x           ; <i32> [#uses=2]
+        store i32 %tmp.2, i32* %tmp.0
+        %tmp.3.i = load i32* %y         ; <i32> [#uses=1]
+        %tmp.4.i = icmp slt i32 %tmp.2, %tmp.3.i                ; <i1> [#uses=1]
+        %retval.i = select i1 %tmp.4.i, i32* %y, i32* %tmp.0            ; <i32*> [#uses=1]
+        %tmp.6 = load i32* %retval.i            ; <i32> [#uses=1]
+        store i32 %tmp.6, i32* %y
+        ret void
+}
+
diff --git a/test/Transforms/InstCombine/CPP_min_max.llx b/test/Transforms/InstCombine/CPP_min_max.llx
deleted file mode 100644 (file)
index 785b91e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
-; RUN:   grep select | not grep {i32\\*}
-
-; This testcase corresponds to PR362, which notices that this horrible code
-; is generated by the C++ front-end and LLVM optimizers, which has lots of
-; loads and other stuff that are unneeded.
-;
-; Instcombine should propagate the load through the select instructions to
-; allow elimination of the extra stuff by the mem2reg pass.
-
-define void @_Z5test1RiS_(i32* %x, i32* %y) {
-entry:
-        %tmp.1.i = load i32* %y         ; <i32> [#uses=1]
-        %tmp.3.i = load i32* %x         ; <i32> [#uses=1]
-        %tmp.4.i = icmp slt i32 %tmp.1.i, %tmp.3.i              ; <i1> [#uses=1]
-        %retval.i = select i1 %tmp.4.i, i32* %y, i32* %x                ; <i32*> [#uses=1]
-        %tmp.4 = load i32* %retval.i            ; <i32> [#uses=1]
-        store i32 %tmp.4, i32* %x
-        ret void
-}
-
-define void @_Z5test2RiS_(i32* %x, i32* %y) {
-entry:
-        %tmp.0 = alloca i32             ; <i32*> [#uses=2]
-        %tmp.2 = load i32* %x           ; <i32> [#uses=2]
-        store i32 %tmp.2, i32* %tmp.0
-        %tmp.3.i = load i32* %y         ; <i32> [#uses=1]
-        %tmp.4.i = icmp slt i32 %tmp.2, %tmp.3.i                ; <i1> [#uses=1]
-        %retval.i = select i1 %tmp.4.i, i32* %y, i32* %tmp.0            ; <i32*> [#uses=1]
-        %tmp.6 = load i32* %retval.i            ; <i32> [#uses=1]
-        store i32 %tmp.6, i32* %y
-        ret void
-}
-
diff --git a/test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.ll b/test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.ll
new file mode 100644 (file)
index 0000000..b9c9eb3
--- /dev/null
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | opt -globalsmodref-aa -licm -disable-output
+
+@PL_regcomp_parse = internal global i8* null           ; <i8**> [#uses=2]
+
+define void @test() {
+       br label %Outer
+Outer:         ; preds = %Next, %0
+       br label %Inner
+Inner:         ; preds = %Inner, %Outer
+       %tmp.114.i.i.i = load i8** @PL_regcomp_parse            ; <i8*> [#uses=1]
+       %tmp.115.i.i.i = load i8* %tmp.114.i.i.i                ; <i8> [#uses=0]
+       store i8* null, i8** @PL_regcomp_parse
+       br i1 false, label %Inner, label %Next
+Next:          ; preds = %Inner
+       br i1 false, label %Outer, label %Exit
+Exit:          ; preds = %Next
+       ret void
+}
+
diff --git a/test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx b/test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx
deleted file mode 100644 (file)
index b9c9eb3..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-as < %s | opt -globalsmodref-aa -licm -disable-output
-
-@PL_regcomp_parse = internal global i8* null           ; <i8**> [#uses=2]
-
-define void @test() {
-       br label %Outer
-Outer:         ; preds = %Next, %0
-       br label %Inner
-Inner:         ; preds = %Inner, %Outer
-       %tmp.114.i.i.i = load i8** @PL_regcomp_parse            ; <i8*> [#uses=1]
-       %tmp.115.i.i.i = load i8* %tmp.114.i.i.i                ; <i8> [#uses=0]
-       store i8* null, i8** @PL_regcomp_parse
-       br i1 false, label %Inner, label %Next
-Next:          ; preds = %Inner
-       br i1 false, label %Outer, label %Exit
-Exit:          ; preds = %Next
-       ret void
-}
-
diff --git a/test/Transforms/LowerInvoke/2003-12-10-Crash.ll b/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
new file mode 100644 (file)
index 0000000..1e8b880
--- /dev/null
@@ -0,0 +1,22 @@
+; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
+
+; RUN: llvm-as < %s | opt -lowerinvoke -disable-output
+
+declare void @baz()
+
+declare void @bar()
+
+define void @foo() {
+then:
+       invoke void @baz( )
+                       to label %invoke_cont.0 unwind label %try_catch
+invoke_cont.0:         ; preds = %then
+       invoke void @bar( )
+                       to label %try_exit unwind label %try_catch
+try_catch:             ; preds = %invoke_cont.0, %then
+       %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ]           ; <i32*> [#uses=0]
+       ret void
+try_exit:              ; preds = %invoke_cont.0
+       ret void
+}
+
diff --git a/test/Transforms/LowerInvoke/2003-12-10-Crash.llx b/test/Transforms/LowerInvoke/2003-12-10-Crash.llx
deleted file mode 100644 (file)
index 1e8b880..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
-
-; RUN: llvm-as < %s | opt -lowerinvoke -disable-output
-
-declare void @baz()
-
-declare void @bar()
-
-define void @foo() {
-then:
-       invoke void @baz( )
-                       to label %invoke_cont.0 unwind label %try_catch
-invoke_cont.0:         ; preds = %then
-       invoke void @bar( )
-                       to label %try_exit unwind label %try_catch
-try_catch:             ; preds = %invoke_cont.0, %then
-       %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ]           ; <i32*> [#uses=0]
-       ret void
-try_exit:              ; preds = %invoke_cont.0
-       ret void
-}
-
diff --git a/test/Transforms/LowerInvoke/2004-02-29-PHICrash.ll b/test/Transforms/LowerInvoke/2004-02-29-PHICrash.ll
new file mode 100644 (file)
index 0000000..0777013
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
+
+define void @_ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale() {
+entry:
+       br i1 false, label %then, label %UnifiedReturnBlock
+then:          ; preds = %entry
+       invoke void @_Znwj( )
+                       to label %UnifiedReturnBlock unwind label %UnifiedReturnBlock
+UnifiedReturnBlock:            ; preds = %then, %then, %entry
+       %UnifiedRetVal = phi i32* [ null, %entry ], [ null, %then ], [ null, %then ] ; <i32*> [#uses=0]
+       ret void
+}
+
+declare void @_Znwj()
+
diff --git a/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx b/test/Transforms/LowerInvoke/2004-02-29-PHICrash.llx
deleted file mode 100644 (file)
index 0777013..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llvm-as < %s | opt -lowerinvoke -enable-correct-eh-support -disable-output
-
-define void @_ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale() {
-entry:
-       br i1 false, label %then, label %UnifiedReturnBlock
-then:          ; preds = %entry
-       invoke void @_Znwj( )
-                       to label %UnifiedReturnBlock unwind label %UnifiedReturnBlock
-UnifiedReturnBlock:            ; preds = %then, %then, %entry
-       %UnifiedRetVal = phi i32* [ null, %entry ], [ null, %then ], [ null, %then ] ; <i32*> [#uses=0]
-       ret void
-}
-
-declare void @_Znwj()
-
diff --git a/test/Transforms/PruneEH/2003-09-14-ExternalCall.ll b/test/Transforms/PruneEH/2003-09-14-ExternalCall.ll
new file mode 100644 (file)
index 0000000..7fc9125
--- /dev/null
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | grep invoke
+
+declare void @External()
+
+define void @foo() {
+       invoke void @External( )
+                       to label %Cont unwind label %Cont
+Cont:          ; preds = %0, %0
+       ret void
+}
+
diff --git a/test/Transforms/PruneEH/2003-09-14-ExternalCall.llx b/test/Transforms/PruneEH/2003-09-14-ExternalCall.llx
deleted file mode 100644 (file)
index 7fc9125..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | grep invoke
-
-declare void @External()
-
-define void @foo() {
-       invoke void @External( )
-                       to label %Cont unwind label %Cont
-Cont:          ; preds = %0, %0
-       ret void
-}
-
diff --git a/test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll b/test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll
new file mode 100644 (file)
index 0000000..8333cd8
--- /dev/null
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -prune-eh -disable-output
+
+define internal void @callee() {
+       ret void
+}
+
+define i32 @caller() {
+; <label>:0
+       invoke void @callee( )
+                       to label %E unwind label %E
+E:             ; preds = %0, %0
+       %X = phi i32 [ 0, %0 ], [ 0, %0 ]               ; <i32> [#uses=1]
+       ret i32 %X
+}
+
diff --git a/test/Transforms/PruneEH/2003-11-21-PHIUpdate.llx b/test/Transforms/PruneEH/2003-11-21-PHIUpdate.llx
deleted file mode 100644 (file)
index 8333cd8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-; RUN: llvm-as < %s | opt -prune-eh -disable-output
-
-define internal void @callee() {
-       ret void
-}
-
-define i32 @caller() {
-; <label>:0
-       invoke void @callee( )
-                       to label %E unwind label %E
-E:             ; preds = %0, %0
-       %X = phi i32 [ 0, %0 ], [ 0, %0 ]               ; <i32> [#uses=1]
-       ret i32 %X
-}
-
diff --git a/test/Transforms/PruneEH/recursivetest.ll b/test/Transforms/PruneEH/recursivetest.ll
new file mode 100644 (file)
index 0000000..231c7b3
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
+
+define internal i32 @foo() {
+       invoke i32 @foo( )
+                       to label %Normal unwind label %Except           ; <i32>:1 [#uses=0]
+Normal:                ; preds = %0
+       ret i32 12
+Except:                ; preds = %0
+       ret i32 123
+}
+
+define i32 @caller() {
+       invoke i32 @foo( )
+                       to label %Normal unwind label %Except           ; <i32>:1 [#uses=0]
+Normal:                ; preds = %0
+       ret i32 0
+Except:                ; preds = %0
+       ret i32 1
+}
+
diff --git a/test/Transforms/PruneEH/recursivetest.llx b/test/Transforms/PruneEH/recursivetest.llx
deleted file mode 100644 (file)
index 231c7b3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
-
-define internal i32 @foo() {
-       invoke i32 @foo( )
-                       to label %Normal unwind label %Except           ; <i32>:1 [#uses=0]
-Normal:                ; preds = %0
-       ret i32 12
-Except:                ; preds = %0
-       ret i32 123
-}
-
-define i32 @caller() {
-       invoke i32 @foo( )
-                       to label %Normal unwind label %Except           ; <i32>:1 [#uses=0]
-Normal:                ; preds = %0
-       ret i32 0
-Except:                ; preds = %0
-       ret i32 1
-}
-
diff --git a/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.ll b/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.ll
new file mode 100644 (file)
index 0000000..81624ff
--- /dev/null
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
+
+define void @interpret() {
+entry:
+       br label %retry
+retry:         ; preds = %endif.4, %entry
+       %tmp.8 = call i32 @interp( )            ; <i32> [#uses=3]
+       switch i32 0, label %endif.4 [
+                i32 -25, label %return
+                i32 -16, label %return
+       ]
+endif.4:               ; preds = %retry
+       br i1 false, label %return, label %retry
+return:                ; preds = %endif.4, %retry, %retry
+       %result.0 = phi i32 [ %tmp.8, %retry ], [ %tmp.8, %retry ], [ %tmp.8, %endif.4 ]                ; <i32> [#uses=0]
+       ret void
+}
+
+declare i32 @interp()
+
diff --git a/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx b/test/Transforms/TailDup/2004-04-01-DemoteRegToStack.llx
deleted file mode 100644 (file)
index 81624ff..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: llvm-as < %s | opt -tailduplicate -disable-output
-
-define void @interpret() {
-entry:
-       br label %retry
-retry:         ; preds = %endif.4, %entry
-       %tmp.8 = call i32 @interp( )            ; <i32> [#uses=3]
-       switch i32 0, label %endif.4 [
-                i32 -25, label %return
-                i32 -16, label %return
-       ]
-endif.4:               ; preds = %retry
-       br i1 false, label %return, label %retry
-return:                ; preds = %endif.4, %retry, %retry
-       %result.0 = phi i32 [ %tmp.8, %retry ], [ %tmp.8, %retry ], [ %tmp.8, %endif.4 ]                ; <i32> [#uses=0]
-       ret void
-}
-
-declare i32 @interp()
-