Switch tests over to use the 'not' script, instead of explicit control flow

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-06-28 23:02:20 +00:00
parent 9272228189
commit 5944ba6336
15 changed files with 19 additions and 70 deletions

View File

@ -2,10 +2,7 @@
; successful, all cast instructions should be eliminated from this testcase. ; successful, all cast instructions should be eliminated from this testcase.
; ;
; RUN: if as < %s | opt -raise | dis | grep cast ; RUN: as < %s | opt -raise | dis | grep-not cast
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } %hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }

View File

@ -3,10 +3,7 @@
; prevented reg115 from being able to change. ; prevented reg115 from being able to change.
; ;
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \* ; RUN: as < %s | opt -raise | dis | grep '= cast' | grep-not \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } * %HashEntry = type { uint, sbyte *, \2 } *

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \* ; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } * %HashEntry = type { uint, sbyte *, \2 } *
@ -9,9 +6,7 @@
%hash_entry = type { uint, sbyte *, \2 * } %hash_entry = type { uint, sbyte *, \2 * }
implementation implementation
%Hash "MakeHash"(int %size, int (uint) * %map) %Hash "MakeHash"(int %size, int (uint) * %map) {
begin
bb0: ;[#uses=1]
%reg112 = malloc sbyte * *, uint 3 ; <sbyte * * *> [#uses=5] %reg112 = malloc sbyte * *, uint 3 ; <sbyte * * *> [#uses=5]
%reg107-uint = cast int %size to uint ; <uint> [#uses=1] %reg107-uint = cast int %size to uint ; <uint> [#uses=1]
%reg115 = malloc sbyte *, uint %reg107-uint ; <sbyte * *> [#uses=1] %reg115 = malloc sbyte *, uint %reg107-uint ; <sbyte * *> [#uses=1]
@ -19,5 +14,5 @@ bb0: ;[#uses=1]
%cast246 = cast sbyte * * * %reg112 to %Hash ; <%Hash> [#uses=1] %cast246 = cast sbyte * * * %reg112 to %Hash ; <%Hash> [#uses=1]
ret %Hash %cast246 ret %Hash %cast246
end }

View File

@ -8,10 +8,7 @@
; x[j*i-12] = j; ; x[j*i-12] = j;
; } ; }
; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*' ; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
implementation implementation

View File

@ -5,18 +5,11 @@
; return (int*)malloc(i+j); ; return (int*)malloc(i+j);
; } ; }
; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*' ; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
implementation implementation
declare sbyte* "malloc"(uint) int* %test(uint %N, uint %M) {
int* "test"(uint %N, uint %M)
begin
bb0: ;[#uses=0]
%reg111 = shl uint %N, ubyte 2 ; <uint> [#uses=1] %reg111 = shl uint %N, ubyte 2 ; <uint> [#uses=1]
%reg109 = add uint %reg111, 4 ; <uint> [#uses=1] %reg109 = add uint %reg111, 4 ; <uint> [#uses=1]
%reg114 = shl uint %M, ubyte 2 ; <uint> [#uses=1] %reg114 = shl uint %M, ubyte 2 ; <uint> [#uses=1]
@ -25,4 +18,4 @@ bb0: ;[#uses=0]
%reg117 = malloc sbyte, uint %reg116 ; <sbyte*> [#uses=1] %reg117 = malloc sbyte, uint %reg116 ; <sbyte*> [#uses=1]
%cast221 = cast sbyte* %reg117 to int* ; <int*> [#uses=1] %cast221 = cast sbyte* %reg117 to int* ; <int*> [#uses=1]
ret int* %cast221 ret int* %cast221
end }

View File

@ -1,9 +1,6 @@
; This testcase is not level raised properly... ; This testcase is not level raised properly...
; ;
; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*' ; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%List = type { int, %List* } %List = type { int, %List* }

View File

@ -1,10 +1,7 @@
; This testcase should have the cast propogated through the load ; This testcase should have the cast propogated through the load
; just like a store does... ; just like a store does...
; ;
; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*' ; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
int "test"(uint * %Ptr) { int "test"(uint * %Ptr) {
%P2 = cast uint *%Ptr to int * %P2 = cast uint *%Ptr to int *

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \* ; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } %FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }

View File

@ -5,10 +5,7 @@
; This could be fixed by making all stores add themselves to a list, and check ; This could be fixed by making all stores add themselves to a list, and check
; their arguments are consistent AFTER all other values are propogated. ; their arguments are consistent AFTER all other values are propogated.
; RUN: if as < %s | opt -raise | dis | grep '= cast' ; RUN: as < %s | opt -raise | dis | not grep '= cast'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%Tree = type %struct.tree* %Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree } %struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }

View File

@ -1,9 +1,6 @@
; Looks like we don't raise alloca's like we do mallocs ; Looks like we don't raise alloca's like we do mallocs
; ;
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \* ; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
implementation ; Functions: implementation ; Functions:

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep 4294967295 ; RUN: as < %s | opt -raise | dis | grep -v uint | not grep 4294967295
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
%length_code = uninitialized global [256 x ubyte] %length_code = uninitialized global [256 x ubyte]

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep call | grep \.\.\. ; RUN: as < %s | opt -raise | dis | grep call | not grep '\.\.\.'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
implementation implementation

View File

@ -1,9 +1,6 @@
; This testcase should be able to eliminate at least one of the casts. ; This testcase should be able to eliminate at least one of the casts.
; ;
; RUN: if as < %s | opt -raise | dis | grep 'REMOVE' ; RUN: as < %s | opt -raise | dis | not grep 'REMOVE'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
int %foo(sbyte * %PF) { int %foo(sbyte * %PF) {
%UPF = cast sbyte* %PF to uint()* %UPF = cast sbyte* %PF to uint()*

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep cast ; RUN: as < %s | opt -raise | dis | not grep cast
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
void %test(...) { ret void } void %test(...) { ret void }

View File

@ -1,9 +1,6 @@
; The expr analysis routines were being too aggressive across cast instructions! ; The expr analysis routines were being too aggressive across cast instructions!
; RUN: if as < %s | opt -raise | dis | grep 4294967295 ; RUN: as < %s | opt -raise | dis | not grep 4294967295
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
target endian = big target endian = big
target pointersize = 64 target pointersize = 64