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.
;
; RUN: if as < %s | opt -raise | dis | grep cast
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
; RUN: as < %s | opt -raise | dis | grep-not cast
%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.
;
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
; RUN: as < %s | opt -raise | dis | grep '= cast' | grep-not \*
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,4 @@
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
%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
; their arguments are consistent AFTER all other values are propogated.
; RUN: if as < %s | opt -raise | dis | grep '= cast'
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
; RUN: as < %s | opt -raise | dis | not grep '= cast'
%Tree = type %struct.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
;
; RUN: if as < %s | opt -raise | dis | grep '= cast' | grep \*
; RUN: then exit 1
; RUN: else exit 0
; RUN: fi
; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
implementation ; Functions:

View File

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

View File

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

View File

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

View File

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

View File

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