aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2006-12-13 18:05:30 +0000
committerJohn Criswell <criswell@uiuc.edu>2006-12-13 18:05:30 +0000
commit308fce15ec5078541bea5a6988cb33f8b313171d (patch)
tree5bfb564b41f16f0a8042d7145b1ffb1a5c7e4065 /test
parent5fed164d7002f93fbe46c9e4b6d5c055a4635cb4 (diff)
Remove DSA tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/DSAnalysis/arraymerge.ll20
-rw-r--r--test/Transforms/DSAnalysis/arraytest.ll39
-rw-r--r--test/Transforms/DSAnalysis/badcases.ll22
-rw-r--r--test/Transforms/DSAnalysis/basictest.ll23
-rw-r--r--test/Transforms/DSAnalysis/dg.exp3
-rw-r--r--test/Transforms/DSAnalysis/fieldmerge.ll20
-rw-r--r--test/Transforms/DSAnalysis/goodcases.ll23
-rw-r--r--test/Transforms/DSAnalysis/indcalltest.ll35
-rw-r--r--test/Transforms/DSAnalysis/misctests.ll67
-rw-r--r--test/Transforms/DSAnalysis/physicalsubtype.ll16
-rw-r--r--test/Transforms/DSAnalysis/recursion.ll26
-rw-r--r--test/Transforms/DSAnalysis/simplest-test.ll6
-rw-r--r--test/Transforms/DSAnalysis/simpletest.ll12
-rw-r--r--test/Transforms/DSAnalysis/structpadding.ll19
14 files changed, 0 insertions, 331 deletions
diff --git a/test/Transforms/DSAnalysis/arraymerge.ll b/test/Transforms/DSAnalysis/arraymerge.ll
deleted file mode 100644
index f1f251e443..0000000000
--- a/test/Transforms/DSAnalysis/arraymerge.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-; This testcase is used to make sure that the outer element of arrays are
-; folded completely away if possible. This is a very common case, so it should
-; be efficient.
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-;
-implementation
-
-sbyte* %merge1([100 x sbyte] *%A, long %N) {
- %P = getelementptr [100 x sbyte] *%A, long 0, long %N
- ret sbyte* %P
-}
-
-sbyte* %merge2([100 x sbyte] *%A, long %N) {
- ; The graph for this example should end up exactly the same as for merge1
- %P1 = getelementptr [100 x sbyte] *%A, long 0, long 0
- %P2 = getelementptr sbyte* %P1, long %N
- ret sbyte* %P2
-}
-
diff --git a/test/Transforms/DSAnalysis/arraytest.ll b/test/Transforms/DSAnalysis/arraytest.ll
deleted file mode 100644
index a7a3b4d7d0..0000000000
--- a/test/Transforms/DSAnalysis/arraytest.ll
+++ /dev/null
@@ -1,39 +0,0 @@
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-%crazy = type [2 x { [2 x sbyte], short } ]
-
-implementation
-
-sbyte *%test1(%crazy* %P1) { ; No merging, constant indexing
- %P = getelementptr %crazy* %P1, long 0, long 0, uint 0, long 1
- ret sbyte *%P
-}
-
-sbyte *%test2(%crazy* %P1) { ; No merging, constant indexing
- %P = getelementptr %crazy* %P1, long 0, long 1, uint 0, long 0
- ret sbyte *%P
-}
-
-sbyte *%test3(%crazy* %P1) { ; No merging, constant indexing, must handle outter index
- %P = getelementptr %crazy* %P1, long -1, long 0, uint 0, long 0
- ret sbyte *%P
-}
-
-sbyte *%mtest1(%crazy* %P1, long %idx) { ; Merging deepest array
- %P = getelementptr %crazy* %P1, long 0, long 0, uint 0, long %idx
- ret sbyte *%P
-}
-sbyte *%mtest2(%crazy* %P1, long %idx) { ; Merge top array
- %P = getelementptr %crazy* %P1, long 0, long %idx, uint 0, long 1
- ret sbyte *%P
-}
-sbyte *%mtest3(%crazy* %P1, long %idx) { ; Merge array %crazy is in
- %P = getelementptr %crazy* %P1, long %idx, long 0, uint 0, long 1
- ret sbyte *%P
-}
-
-sbyte *%m2test1(%crazy* %P1, long %idx) { ; Merge two arrays
- %P = getelementptr %crazy* %P1, long 0, long %idx, uint 0, long %idx
- ret sbyte *%P
-}
-
diff --git a/test/Transforms/DSAnalysis/badcases.ll b/test/Transforms/DSAnalysis/badcases.ll
deleted file mode 100644
index 571107bf5d..0000000000
--- a/test/Transforms/DSAnalysis/badcases.ll
+++ /dev/null
@@ -1,22 +0,0 @@
-; This file contains a list of situations where node folding should happen...
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-implementation
-
-void %test1({int, int} * %X) {
- getelementptr {int, int} * %X, long 0
- %Y = cast {int, int} * %X to sbyte*
- %Z = getelementptr sbyte* %Y, long 7
- store sbyte 6, sbyte *%Z
- ret void
-}
-
-void %test2({int, int} * %X) {
- getelementptr {int, int} * %X, long 0
- %Y = cast {int, int} * %X to {sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte} *
- %Z = getelementptr {sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte,sbyte}* %Y, long 0, uint 7
- store sbyte 6, sbyte *%Z
- ret void
-}
-
diff --git a/test/Transforms/DSAnalysis/basictest.ll b/test/Transforms/DSAnalysis/basictest.ll
deleted file mode 100644
index d2a02a8a7f..0000000000
--- a/test/Transforms/DSAnalysis/basictest.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; very simple test
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-implementation
-
-int *%foo(ulong %A, double %B, long %C) {
- %X = malloc int*
- %D = cast int** %X to ulong
- %E = cast ulong %D to int*
- store int* %E, int** %X
-
- %F = malloc {int}
- %G = getelementptr {int}* %F, long 0, uint 0
- store int* %G, int** %X
-
- %K = malloc int **
- store int** %X, int***%K
-
- %H = cast long %C to int*
- ret int* null ; %H
-}
-
diff --git a/test/Transforms/DSAnalysis/dg.exp b/test/Transforms/DSAnalysis/dg.exp
deleted file mode 100644
index 142de8a6c8..0000000000
--- a/test/Transforms/DSAnalysis/dg.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-load_lib llvm-dg.exp
-
-llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext $llvmgcc_version
diff --git a/test/Transforms/DSAnalysis/fieldmerge.ll b/test/Transforms/DSAnalysis/fieldmerge.ll
deleted file mode 100644
index dc0c3bc94c..0000000000
--- a/test/Transforms/DSAnalysis/fieldmerge.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-%str = type { int*, int* }
-
-implementation
-
-void %bar(%str* %S, bool %C) {
- br bool %C, label %T, label %F
-T:
- %A = getelementptr %str* %S, long 0, uint 0
- br label %Out
-F:
- %B = getelementptr %str* %S, long 0, uint 1
- br label %Out
-Out:
- %P = phi int** [%A, %T], [%B, %F]
- store int* null, int** %P
- ret void
-}
diff --git a/test/Transforms/DSAnalysis/goodcases.ll b/test/Transforms/DSAnalysis/goodcases.ll
deleted file mode 100644
index c7e3a246af..0000000000
--- a/test/Transforms/DSAnalysis/goodcases.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; This file contains a list of cases where node folding should NOT happen
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-;
-
-implementation
-
-void %test1({int, int}* %X) {
- getelementptr {int, int} * %X, long 0
- %Y = cast {int, int}* %X to uint*
- store uint 5, uint* %Y
- ret void
-}
-
-; Test that "structural" equality works. Pointers can land in pointers n
-; stuff.
-void %test2({int*, int*}* %X) {
- getelementptr {int*, int*}* %X, long 0
- %Y = cast {int*, int*}* %X to {uint*, long*}*
- getelementptr {uint*, long*}* %Y, long 0
- ret void
-}
-
diff --git a/test/Transforms/DSAnalysis/indcalltest.ll b/test/Transforms/DSAnalysis/indcalltest.ll
deleted file mode 100644
index 79ed1ae773..0000000000
--- a/test/Transforms/DSAnalysis/indcalltest.ll
+++ /dev/null
@@ -1,35 +0,0 @@
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-%G = global int 2 ; <int*> [#uses=1]
-%H = global int* null
-
-%I = global int** null
-%J = global int** null
-
-implementation ; Functions:
-
-void %foo1() {
- store int* %G, int** %H
- store int** %H, int ***%I
- ret void
-}
-
-void %foo2() { ; No predecessors!
- store int 7, int* %G
- store int** %H, int ***%J
- ret void
-}
-
-void %test(bool %cond) {
-; <label>:0 ; No predecessors!
- br bool %cond, label %call, label %F
-
-F: ; preds = %0
- br label %call
-
-call: ; preds = %F, %0
- %Fn = phi void ()* [ %foo2, %F ], [ %foo1, %0 ] ; <void ()*> [#uses=1]
- call void %Fn()
- ret void
-}
diff --git a/test/Transforms/DSAnalysis/misctests.ll b/test/Transforms/DSAnalysis/misctests.ll
deleted file mode 100644
index 0ed847096c..0000000000
--- a/test/Transforms/DSAnalysis/misctests.ll
+++ /dev/null
@@ -1,67 +0,0 @@
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-int* %test1(int *%A) {
- %R = getelementptr int* %A, long 1
- ret int* %R
-}
-
-int* %test2(uint %Num) {
- %A = malloc sbyte, uint %Num
- %B = cast sbyte* %A to int*
- ret int* %B
-}
-
-int* %test3(uint %Num) {
- %A = malloc sbyte, uint %Num
- %B = cast sbyte* %A to int*
- %C = getelementptr int* %B, long 5
- ret int* %C
-}
-
-int* %test4(bool %C, uint %Num) {
- br bool %C, label %L1, label %L2
-L1:
- %A = malloc sbyte, uint %Num
- %B = cast sbyte* %A to int*
- br label %L3
-L2:
- %C = malloc int, uint %Num
- br label %L3
-L3:
- %D = phi int* [%B, %L1], [%C, %L2]
- %E = getelementptr int* %D, long 5
- ret int* %E
-}
-
-int* %test5(bool %C, uint %Num) {
- br bool %C, label %L1, label %L2
-L1:
- %C = malloc int, uint %Num
- br label %L3
-L2:
- %A = malloc sbyte, uint %Num
- %B = cast sbyte* %A to int*
- br label %L3
-L3:
- %D = phi int* [%C, %L1], [%B, %L2]
- %E = getelementptr int* %D, long 5
- ret int* %E
-}
-
-int %test6({int, int}* %A) {
- %B = getelementptr {int, int}* %A, long 0, uint 0
- %b = load int* %B
- %C = getelementptr {int, int}* %A, long 0, uint 1
- %c = load int* %C
- %d = add int %b, %c
- ret int %d
-}
-
-sbyte* %test7(uint %Num) {
- %X = malloc sbyte, uint %Num
- %Y = getelementptr sbyte* %X, long 1
- store sbyte 0, sbyte* %Y
- ret sbyte* %X
-}
-
diff --git a/test/Transforms/DSAnalysis/physicalsubtype.ll b/test/Transforms/DSAnalysis/physicalsubtype.ll
deleted file mode 100644
index d16943024a..0000000000
--- a/test/Transforms/DSAnalysis/physicalsubtype.ll
+++ /dev/null
@@ -1,16 +0,0 @@
-; A test for "physical subtyping" used in some C programs...
-;
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-;
-%ST = type { int, int* } ; "Subtype"
-%DT = type { int, int*, int } ; "derived type"
-
-int %test(%DT* %DT) {
- %DTp = getelementptr %DT* %DT, long 0, uint 0
- %A = load int* %DTp
- %ST = cast %DT* %DT to %ST*
- %STp = getelementptr %ST* %ST, long 0, uint 0
- %B = load int* %STp
- %C = sub int %A, %B ; A & B are equal, %C = 0
- ret int %C
-}
diff --git a/test/Transforms/DSAnalysis/recursion.ll b/test/Transforms/DSAnalysis/recursion.ll
deleted file mode 100644
index c79183f3b0..0000000000
--- a/test/Transforms/DSAnalysis/recursion.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-implementation ; Functions:
-
-declare void %__main()
-
-void %A(int* %L) {
-bb0: ; No predecessors!
- call void %B( int* %L )
- call void %A( int* %L )
- ret void
-}
-
-void %B(int* %L) {
-bb0: ; No predecessors!
- call void %A( int* %L )
- ret void
-}
-
-void %main() {
-bb0: ; No predecessors!
- call void %__main( )
- call void %A( int* null )
- ret void
-}
-
diff --git a/test/Transforms/DSAnalysis/simplest-test.ll b/test/Transforms/DSAnalysis/simplest-test.ll
deleted file mode 100644
index f28ffe92b2..0000000000
--- a/test/Transforms/DSAnalysis/simplest-test.ll
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-void %foo(int* %X) {
- store int 4, int* %X
- ret void
-}
diff --git a/test/Transforms/DSAnalysis/simpletest.ll b/test/Transforms/DSAnalysis/simpletest.ll
deleted file mode 100644
index c82b38bbe9..0000000000
--- a/test/Transforms/DSAnalysis/simpletest.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-implementation
-
-int *%foo(int *%A, int **%B, int *%C, int **%D, int* %E) {
- %a = load int* %A
- %b = load int** %B
-
- store int* %C, int** %D
-
- ret int* %E
-}
diff --git a/test/Transforms/DSAnalysis/structpadding.ll b/test/Transforms/DSAnalysis/structpadding.ll
deleted file mode 100644
index 8b5cc37d9a..0000000000
--- a/test/Transforms/DSAnalysis/structpadding.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
-
-%str = type { int, int* }
-
-implementation
-
-void %bar(%str* %S, %str* %T) {
- %A1 = getelementptr %str* %S, long 0, uint 0
- %B1 = getelementptr %str* %S, long 0, uint 1
- %A2 = getelementptr %str* %S, long 0, uint 0
- %B2 = getelementptr %str* %S, long 0, uint 1
- %a1 = cast int* %A1 to long*
- %a2 = cast int* %A2 to long*
- %V = load long* %a1
- ;store long %V, long* %a2
- %V2 = load int** %B1
- store int* %V2, int** %B2
- ret void
-}