Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.

XFAILed 3 arm regressions (will file bugs)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44389 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tanya Lattner 2007-11-28 04:57:00 +00:00
parent cada245d06
commit 727842e9d7
30 changed files with 60 additions and 63 deletions

View File

@ -1,4 +1,4 @@
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output &| grep 'MayAlias: i32* %y, i32* %x'
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {MayAlias:.*i32\\* %y, i32\\* %x}
declare i32* @unclear(i32* %a)

View File

@ -1,15 +1,15 @@
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output &| grep '9 no alias'
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output &| grep '6 may alias'
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output &| grep 'MayAlias: i32* %pj, i32* %pi'
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {9 no alias}
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {6 may alias}
; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {MayAlias:.*i32\\* %Jpointer, i32\\* %Ipointer}
define void @foo(i32* noalias %p, i32* noalias %q, i32 %i, i32 %j) {
%pi = getelementptr i32* %p, i32 %i
%Ipointer = getelementptr i32* %p, i32 %i
%qi = getelementptr i32* %q, i32 %i
%pj = getelementptr i32* %p, i32 %j
%Jpointer = getelementptr i32* %p, i32 %j
%qj = getelementptr i32* %q, i32 %j
store i32 0, i32* %p
store i32 0, i32* %pi
store i32 0, i32* %pj
store i32 0, i32* %Ipointer
store i32 0, i32* %Jpointer
store i32 0, i32* %q
store i32 0, i32* %qi
store i32 0, i32* %qj

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s | opt -scalar-evolution -analyze |& grep "Loop bb: ( -1 + ( -1 * %x) + %y) iterations!"
; RUN: llvm-as < %s | opt -scalar-evolution -analyze |& grep {Loop bb: ( -1 + ( -1 \\* %x) + %y) iterations!}
; PR1597
define i32 @f(i32 %x, i32 %y) {

View File

@ -1,6 +1,6 @@
; Make sure we don't get an assertion failure, even though this is a parse
; error
; RUN: llvm-as < %s -o /dev/null -f |& grep {No arguments}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {No arguments}
%ty = type void (i32)

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s >/dev/null |& grep {Expected type 'i32' for element #0}
; RUN: not llvm-as < %s >/dev/null |& grep {Expected type 'i32' for element #0}
; Test the case of a misformed constant initializer
; This should cause an assembler error, not an assertion failure!
constant { i32 } { float 1.0 }

View File

@ -1,4 +1,4 @@
; Found by inspection of the code
; RUN: llvm-as < %s > /dev/null |& grep {Logical operator requires integral}
; RUN: not llvm-as < %s > /dev/null |& grep {Logical operator requires integral}
global i32 ashr (float 1.0, float 2.0)

View File

@ -1,4 +1,4 @@
; Found by inspection of the code
; RUN: llvm-as < %s > /dev/null |& grep {Illegal number of init}
; RUN: not llvm-as < %s > /dev/null |& grep {Illegal number of init}
global {} { i32 7, float 1.0, i32 7, i32 8 }

View File

@ -1,5 +1,5 @@
; RUN: llvm-as < %s |& not grep Asserti
; RUN: llvm-as < %s |& grep Redefinition
; RUN: not llvm-as < %s |& not grep Asserti
; RUN: not llvm-as < %s |& grep Redefinition
define void @test() {
%tmp.1 = add i32 0, 1

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s -o /dev/null -f |& grep {Undefined type remains}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {Undefined type remains}
; END.
@d_reduction_0_dparser_gram = global {

View File

@ -1,3 +1,3 @@
; RUN: llvm-as %s |& grep error
; RUN: not llvm-as %s |& grep error
void %foo() {

View File

@ -1,9 +1,8 @@
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
; RUN: grep {tail call void.*sret null}
; RUN: llvm-as < %s | llvm-dis | grep {tail call void.*sret null}
declare csretcc void %foo({}*, ...)
declare void @foo({ }* sret , ...)
void %bar() {
tail call csretcc void({}*, ...)* %foo({}* null, int 0)
ret void
define void @bar() {
tail call void ({ }* sret , ...)* @foo( { }* null sret , i32 0 )
ret void
}

View File

@ -1,6 +1,6 @@
; Test for PR902. This program is erroneous, but should not crash llvm-as.
; This tests that a simple error is caught and processed correctly.
; RUN: llvm-as < %s >/dev/null |& grep {FP constant invalid for type}
; RUN: not llvm-as < %s >/dev/null |& grep {FP constant invalid for type}
define void @test() {
add i32 1, 2.0

View File

@ -1,5 +1,5 @@
; The assembler should catch an undefined argument type .
; RUN: llvm-as < %s -o /dev/null -f |& grep {Reference to abstract argument}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {Reference to abstract argument}
; %typedef.bc_struct = type opaque

View File

@ -1,5 +1,5 @@
; PR1117
; RUN: llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
define i8* @nada(i64 %X) {
%result = trunc i64 %X to i8*

View File

@ -1,4 +1,4 @@
; PR1117
; RUN: llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from}
@X = constant i8* trunc (i64 0 to i8*)

View File

@ -1,6 +1,6 @@
; Make sure we don't get an assertion failure, even though this is a parse
; error
; RUN: llvm-upgrade < %s > /dev/null |& grep {No arguments passed to a }
; RUN: not llvm-upgrade < %s > /dev/null |& grep {No arguments passed to a }
%ty = type void (int)

View File

@ -1,4 +1,4 @@
; Found by inspection of the code
; RUN: llvm-upgrade < %s > /dev/null |& grep {Shift constant expression}
; RUN: not llvm-upgrade < %s > /dev/null |& grep {Shift constant expression}
global int shr (float 1.0, ubyte 2)

View File

@ -1,4 +1,4 @@
; Found by inspection of the code
; RUN: llvm-upgrade < %s > /dev/null |& grep {Illegal number of init}
; RUN: not llvm-upgrade < %s > /dev/null |& grep {Illegal number of init}
global {} { int 7, float 1.0, int 7, int 8 }

View File

@ -1,4 +1,4 @@
; RUN: llvm-upgrade < %s -o /dev/null -f |& grep {Reference to an undef}
; RUN: not llvm-upgrade < %s -o /dev/null -f |& grep {Reference to an undef}
; END.
%d_reduction_0_dparser_gram = global { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)*, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** } { int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)* null, int (sbyte*, sbyte**, int, int, { %struct.Grammar*, void (\4, %struct.d_loc_t*, sbyte**)*, %struct.D_Scope*, void (\4)*, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }* (\4, int, { int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\9, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }**)*, void ({ int, %struct.d_loc_t, sbyte*, sbyte*, %struct.D_Scope*, void (\8, %struct.d_loc_t*, sbyte**)*, %struct.Grammar*, %struct.ParseNode_User }*)*, %struct.d_loc_t, int, int, int, int, int, int, int, int, int, int, int, int }*)** null }

View File

@ -1,5 +1,5 @@
; PR 1258
; RUN: llvm-as < %s >/dev/null -f |& grep {Numbered.*does not match}
; RUN: not llvm-as < %s >/dev/null -f |& grep {Numbered.*does not match}
define i32 @test1(i32 %a, i32 %b) {
entry:

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic}
; RUN: not llvm-as < %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic}
declare i32 @llvm.foobar(i32 %foo)

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s |& llvm-dis | grep 'align 1024'
; RUN: llvm-as < %s |& llvm-dis | grep {align 1024}
define void @test(i32* %arg) {
entry:

View File

@ -1,4 +1,4 @@
; RUN: llvm-as < %s > /dev/null |& grep {Invalid type for reference to global}
; RUN: not llvm-as < %s > /dev/null |& grep {Invalid type for reference to global}
; PR1577
@anInt = global i32 1 alias i32 @anAlias

View File

@ -1,3 +1,3 @@
// RUN: %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
// RUN: not %llvmgcc %s -S -o /dev/null |& not grep {internal compiler error}
struct A X[(927 - 37) / sizeof(struct A)];

View File

@ -1,4 +1,4 @@
// RUN: %llvmgcc -S %s -o /dev/null |& grep "error: assignment of read-only location"
// RUN: not %llvmgcc -S %s -o /dev/null |& grep "error: assignment of read-only location"
// PR 1603
int func()
{

View File

@ -1,5 +1,6 @@
; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -relocation-model=pic \
; RUN: -mattr=+v6 -stats |& grep asm-printer | grep 41
; XFAIL: *
define void @test(i32 %tmp56222, i32 %tmp36224, i32 %tmp46223, i32 %i.0196.0.ph, i32 %tmp8, i32* %tmp1011, i32** %tmp1, i32* %d2.1.out, i32* %d3.1.out, i32* %d0.1.out, i32* %d1.1.out) {
newFuncRoot:

View File

@ -9,6 +9,7 @@
; RUN: grep fuitod %t
; RUN: grep fuitos %t
; RUN: grep 1065353216 %t
; XFAIL: *
float %f(int %a) {
entry:

View File

@ -7,7 +7,7 @@
; add r8, r0, r6
; str r10, [r8, #+4]
;
; XFAIL: *
target triple = "arm-apple-darwin8"
define void @foo(i32* %mc, i32* %mpp, i32* %ip, i32* %dpp, i32* %tpmm, i32 %M, i32* %tpim, i32* %tpdm, i32* %bp, i32* %ms, i32 %xmb) {

View File

@ -1,33 +1,29 @@
; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
; RUN: lli -debug-only=jit %t.bc |& not grep {Finished CodeGen of .*Function: F}
; RUN: llvm-as < %s -f -o %t.bc
; RUN: not lli -debug-only=jit %t.bc |& not grep {Finished CodeGen of .*Function: F}
@.str_1 = internal constant [7 x i8] c"IN F!\0A\00" ; <[7 x i8]*> [#uses=1]
@.str_2 = internal constant [7 x i8] c"IN G!\0A\00" ; <[7 x i8]*> [#uses=1]
@Ptrs = internal constant [2 x void (...)*] [ void (...)* bitcast (void ()* @F to void (...)*), void (...)* bitcast (void ()* @G to void (...)*) ] ; <[2 x void (...)*]*> [#uses=1]
%.str_1 = internal constant [7 x sbyte] c"IN F!\0A\00" ; <[7 x sbyte]*> [#uses=1]
%.str_2 = internal constant [7 x sbyte] c"IN G!\0A\00" ; <[7 x sbyte]*> [#uses=1]
%Ptrs = internal constant [2 x void (...)*] [ void (...)* cast (void ()* %F to void (...)*), void (...)* cast (void ()* %G to void (...)*) ] ; <[2 x void (...)*]*> [#uses=1]
declare i32 @printf(i8*, ...)
implementation ; Functions:
declare int %printf(sbyte*, ...)
internal void %F() {
define internal void @F() {
entry:
%tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_1, int 0, int 0) ) ; <int> [#uses=0]
ret void
%tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @.str_1, i32 0, i32 0) ) ; <i32> [#uses=0]
ret void
}
internal void %G() {
define internal void @G() {
entry:
%tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_2, int 0, int 0) ) ; <int> [#uses=0]
ret void
%tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([7 x i8]* @.str_2, i32 0, i32 0) ) ; <i32> [#uses=0]
ret void
}
int %main(int %argc, sbyte** %argv) {
define i32 @main(i32 %argc, i8** %argv) {
entry:
%tmp.3 = and int %argc, 1 ; <int> [#uses=1]
%tmp.4 = getelementptr [2 x void (...)*]* %Ptrs, int 0, int %tmp.3 ; <void (...)**> [#uses=1]
%tmp.5 = load void (...)** %tmp.4 ; <void (...)*> [#uses=1]
%tmp.5_c = cast void (...)* %tmp.5 to void ()* ; <void ()*> [#uses=1]
call void %tmp.5_c( )
ret int undef
%tmp.3 = and i32 %argc, 1 ; <i32> [#uses=1]
%tmp.4 = getelementptr [2 x void (...)*]* @Ptrs, i32 0, i32 %tmp.3 ; <void (...)**> [#uses=1]
%tmp.5 = load void (...)** %tmp.4 ; <void (...)*> [#uses=1]
%tmp.5_c = bitcast void (...)* %tmp.5 to void ()* ; <void ()*> [#uses=1]
call void %tmp.5_c( )
ret i32 undef
}

View File

@ -126,8 +126,8 @@ proc RunLLVMTests { test_source_files } {
set runline "$runline$oneline "
# if its a terminating RUN: line then do substitution on the whole line
# and then save the line.
} elseif {[regexp {RUN: *([^&]+)(&&)?} $line match oneline suffix]} {
# and then save the line.
} elseif {[regexp {RUN: *(.+)$} $line match oneline suffix]} {
set runline "$runline$oneline"
set runline [ substitute $runline $test $tmpFile ]
set lines($numLines) $runline