Remove DSA tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32547 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John Criswell 2006-12-13 18:05:30 +00:00
parent 5fed164d70
commit 308fce15ec
14 changed files with 0 additions and 331 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -1,6 +0,0 @@
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure
void %foo(int* %X) {
store int 4, int* %X
ret void
}

View File

@ -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
}

View File

@ -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
}