From 90008f4bee2341de3df6aa1d7b639a91f0793ef5 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 15 Apr 2007 10:07:55 +0000 Subject: [PATCH] For PR1319: Upgrade to new Tcl exec based test framework. This exposes three regressions in llvm-upgrade: test/Assembler/2002-08-19-BytecodeReader.llx test/Assembler/2003-08-21-ConstantExprCast-Fold.llx test/Assembler/2004-01-11-getelementptrfolding.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36067 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Assembler/2002-04-07-HexFloatConstants.llx | 5 +++-- test/Assembler/2002-04-29-NameBinding.llx | 5 +++-- test/Assembler/2002-07-08-HugePerformanceProblem.llx | 3 ++- test/Assembler/2003-11-12-ConstantExprCast.llx | 2 +- test/Assembler/2004-01-11-getelementptrfolding.llx | 3 ++- test/Assembler/2004-11-28-InvalidTypeCrash.ll | 5 +++-- .../2004-12-05-LocalGlobalSymtabConflict.ll | 3 ++- test/Assembler/2004-12-06-ConstantFloatRange.ll | 3 ++- test/Assembler/2005-01-03-FPConstantDisassembly.ll | 2 +- .../Assembler/2005-01-31-CallingAggregateFunction.ll | 2 +- test/Assembler/2006-05-26-VarargsCallEncode.ll | 2 +- test/Assembler/2007-01-01-Cast-To-Bool.ll | 2 +- test/Assembler/2007-01-12-Varargs-Upgrade.ll | 3 ++- test/Assembler/2007-01-16-CrashOnBadCast.ll | 3 +-- test/Assembler/2007-01-16-CrashOnBadCast2.ll | 3 +-- test/Assembler/2007-01-27-UpgradePointers.ll | 5 ++--- test/Assembler/2007-02-01-UpgradeShift.ll | 12 ++++++------ test/Assembler/2007-03-14-UpgradeLocalSignless.ll | 4 ++-- test/Assembler/2007-03-19-NegValue.ll | 2 +- test/Assembler/dg.exp | 4 ++-- 20 files changed, 39 insertions(+), 34 deletions(-) diff --git a/test/Assembler/2002-04-07-HexFloatConstants.llx b/test/Assembler/2002-04-07-HexFloatConstants.llx index d0f413ae9e9..543c869ba0f 100644 --- a/test/Assembler/2002-04-07-HexFloatConstants.llx +++ b/test/Assembler/2002-04-07-HexFloatConstants.llx @@ -5,8 +5,9 @@ ; of the bug that was causing the Olden Health benchmark to output incorrect ; results! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 && \ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \ +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | \ +; RUN: llvm-dis > %t.2 ; RUN: diff %t.1 %t.2 implementation diff --git a/test/Assembler/2002-04-29-NameBinding.llx b/test/Assembler/2002-04-29-NameBinding.llx index ad994f0386c..c65616c9036 100644 --- a/test/Assembler/2002-04-29-NameBinding.llx +++ b/test/Assembler/2002-04-29-NameBinding.llx @@ -4,14 +4,15 @@ ; Check by running globaldce, which will remove the constant if there are ; no references to it! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep constant +; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | \ +; RUN: not grep constant ; %v1 = internal constant int 5 implementation -int "createtask"() +int "createtask"() begin %v1 = alloca int ;; Alloca should have one use! %reg112 = load int* %v1 ;; This load should not use the global! ret int %reg112 diff --git a/test/Assembler/2002-07-08-HugePerformanceProblem.llx b/test/Assembler/2002-07-08-HugePerformanceProblem.llx index 02a05f8edd3..2ec4e82844a 100644 --- a/test/Assembler/2002-07-08-HugePerformanceProblem.llx +++ b/test/Assembler/2002-07-08-HugePerformanceProblem.llx @@ -1,6 +1,7 @@ ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too ; long. The type resolution code needs to be sped up a lot. -; RUN: ulimit -t 20; llvm-upgrade < %s | llvm-as +; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f +; END. %ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)* %BBOX = type { %BBOX_VECT, %BBOX_VECT } diff --git a/test/Assembler/2003-11-12-ConstantExprCast.llx b/test/Assembler/2003-11-12-ConstantExprCast.llx index ce48c20f536..284831183d0 100644 --- a/test/Assembler/2003-11-12-ConstantExprCast.llx +++ b/test/Assembler/2003-11-12-ConstantExprCast.llx @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep ' bitcast (' +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep { bitcast (} %.Base64_1 = external constant [4 x sbyte] diff --git a/test/Assembler/2004-01-11-getelementptrfolding.llx b/test/Assembler/2004-01-11-getelementptrfolding.llx index 6ab1a5577b0..36d983e18b3 100644 --- a/test/Assembler/2004-01-11-getelementptrfolding.llx +++ b/test/Assembler/2004-01-11-getelementptrfolding.llx @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep 'getelementptr.*getelementptr' +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \ +; RUN: not grep {getelementptr.*getelementptr} %struct.TUVVertex = type { short, short, short, short } %struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] } diff --git a/test/Assembler/2004-11-28-InvalidTypeCrash.ll b/test/Assembler/2004-11-28-InvalidTypeCrash.ll index ea16cc45252..5b43b730621 100644 --- a/test/Assembler/2004-11-28-InvalidTypeCrash.ll +++ b/test/Assembler/2004-11-28-InvalidTypeCrash.ll @@ -1,4 +1,5 @@ -; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \ -; RUN: grep 'Cannot create a null initialized value of this type' ; Test for PR463. This program is erroneous, but should not crash llvm-as. +; RUN: ignore llvm-as < %s -o /dev/null -f |& \ +; RUN: grep {Cannot create a null initialized value of this type} + @.FOO = internal global %struct.none zeroinitializer diff --git a/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll b/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll index 5743e42f9d2..d558d0bd618 100644 --- a/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll +++ b/test/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep '%G = alloca int' +; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \ +; RUN: not grep {%G = alloca int} ; In this testcase, %bar stores to the global G. Make sure that inlining does ; not cause it to store to the G in main instead. diff --git a/test/Assembler/2004-12-06-ConstantFloatRange.ll b/test/Assembler/2004-12-06-ConstantFloatRange.ll index 8718a8d5aad..cc74392ff95 100644 --- a/test/Assembler/2004-12-06-ConstantFloatRange.ll +++ b/test/Assembler/2004-12-06-ConstantFloatRange.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f 2>&1 | grep "constant invalid for type" +; RUN: llvm-upgrade %s | llvm-as -o /dev/null -f |& \ +; RUN: grep {constant invalid for type} ; XFAIL: * ;; This is a testcase for PR409 diff --git a/test/Assembler/2005-01-03-FPConstantDisassembly.ll b/test/Assembler/2005-01-03-FPConstantDisassembly.ll index 7dfa0e54043..c3a66b42e27 100644 --- a/test/Assembler/2005-01-03-FPConstantDisassembly.ll +++ b/test/Assembler/2005-01-03-FPConstantDisassembly.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep '1.0' +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 1.0 double %test() { ret double 1.0 ;; This should not require hex notation diff --git a/test/Assembler/2005-01-31-CallingAggregateFunction.ll b/test/Assembler/2005-01-31-CallingAggregateFunction.ll index 7eff6343f28..c9252147fb3 100644 --- a/test/Assembler/2005-01-31-CallingAggregateFunction.ll +++ b/test/Assembler/2005-01-31-CallingAggregateFunction.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as 2>&1 < %s -o /dev/null -f | \ +; RUN: ignore llvm-as < %s -o /dev/null -f |& \ ; RUN: grep "LLVM functions cannot return aggregate types" define void @test() { diff --git a/test/Assembler/2006-05-26-VarargsCallEncode.ll b/test/Assembler/2006-05-26-VarargsCallEncode.ll index e5de6de5f8b..c87b19d3d30 100644 --- a/test/Assembler/2006-05-26-VarargsCallEncode.ll +++ b/test/Assembler/2006-05-26-VarargsCallEncode.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \ -; RUN: grep 'tail call void ({ }\* sret' +; RUN: grep {tail call void (\{ \}\\* sret} declare csretcc void %foo({}*, ...) diff --git a/test/Assembler/2007-01-01-Cast-To-Bool.ll b/test/Assembler/2007-01-01-Cast-To-Bool.ll index 1dfc5d55987..263515152d9 100644 --- a/test/Assembler/2007-01-01-Cast-To-Bool.ll +++ b/test/Assembler/2007-01-01-Cast-To-Bool.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 'icmp ne' +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep {icmp ne} bool %main(int %X) { %res = cast bool true to bool ret bool %res diff --git a/test/Assembler/2007-01-12-Varargs-Upgrade.ll b/test/Assembler/2007-01-12-Varargs-Upgrade.ll index 3c1f5bbe277..e5f0ab27846 100644 --- a/test/Assembler/2007-01-12-Varargs-Upgrade.ll +++ b/test/Assembler/2007-01-12-Varargs-Upgrade.ll @@ -1,7 +1,8 @@ ; For PR1093: This test checks that llvm-upgrade correctly translates ; the llvm.va_* intrinsics to their cannonical argument form (i8*). ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \ -; RUN: grep ' bitcast' | wc -l | grep 5 +; RUN: grep { bitcast} | wc -l | grep 5 + %str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1] implementation ; Functions: diff --git a/test/Assembler/2007-01-16-CrashOnBadCast.ll b/test/Assembler/2007-01-16-CrashOnBadCast.ll index 859e83721aa..96d0f4f4a9e 100644 --- a/test/Assembler/2007-01-16-CrashOnBadCast.ll +++ b/test/Assembler/2007-01-16-CrashOnBadCast.ll @@ -1,6 +1,5 @@ ; PR1117 -; RUN: llvm-as < %s 2>&1 > /dev/null | \ -; RUN: grep "invalid cast opcode for cast from" +; RUN: 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* diff --git a/test/Assembler/2007-01-16-CrashOnBadCast2.ll b/test/Assembler/2007-01-16-CrashOnBadCast2.ll index bcc6f0e1200..c7716241c1b 100644 --- a/test/Assembler/2007-01-16-CrashOnBadCast2.ll +++ b/test/Assembler/2007-01-16-CrashOnBadCast2.ll @@ -1,5 +1,4 @@ ; PR1117 -; RUN: llvm-as < %s 2>&1 > /dev/null | \ -; RUN: grep "invalid cast opcode for cast from" +; RUN: llvm-as < %s -o /dev/null -f |& grep "invalid cast opcode for cast from" @X = constant i8* trunc (i64 0 to i8*) diff --git a/test/Assembler/2007-01-27-UpgradePointers.ll b/test/Assembler/2007-01-27-UpgradePointers.ll index 37825a20563..41ce1a6a22c 100644 --- a/test/Assembler/2007-01-27-UpgradePointers.ll +++ b/test/Assembler/2007-01-27-UpgradePointers.ll @@ -1,7 +1,6 @@ ; PR1137 -; RUN: llvm-upgrade < %s && -; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f && -; RUN: llvm-upgrade < %s | grep 'tmp = alloca' | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as -o /dev/null -f +; RUN: llvm-upgrade < %s | grep {tmp = alloca} | wc -l | grep 1 ; target datalayout = "e-p:32:32" target endian = little diff --git a/test/Assembler/2007-02-01-UpgradeShift.ll b/test/Assembler/2007-02-01-UpgradeShift.ll index 393124788f9..0a9e3a90d0e 100644 --- a/test/Assembler/2007-02-01-UpgradeShift.ll +++ b/test/Assembler/2007-02-01-UpgradeShift.ll @@ -1,11 +1,11 @@ ; Test that upgrading shift instructions and constant expressions works ; correctly. -; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 2' && -; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 2' && -; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 2' && -; RUN: llvm-upgrade < %s | grep 'ashr i32 .X, 6' && -; RUN: llvm-upgrade < %s | grep 'lshr i32 .X, 1' && -; RUN: llvm-upgrade < %s | grep 'shl i32 .X, 1' +; RUN: llvm-upgrade < %s | grep {ashr i32 .X, 2} +; RUN: llvm-upgrade < %s | grep {lshr i32 .X, 2} +; RUN: llvm-upgrade < %s | grep {shl i32 .X, 2} +; RUN: llvm-upgrade < %s | grep {ashr i32 .X, 6} +; RUN: llvm-upgrade < %s | grep {lshr i32 .X, 1} +; RUN: llvm-upgrade < %s | grep {shl i32 .X, 1} void %test(int %X) { %A = ashr int %X, ubyte 2 diff --git a/test/Assembler/2007-03-14-UpgradeLocalSignless.ll b/test/Assembler/2007-03-14-UpgradeLocalSignless.ll index 5a1eaa2d4ce..88078bbc720 100644 --- a/test/Assembler/2007-03-14-UpgradeLocalSignless.ll +++ b/test/Assembler/2007-03-14-UpgradeLocalSignless.ll @@ -1,6 +1,6 @@ ; PR1256 -; RUN: llvm-upgrade < %s | grep 'call void @f( i32 .tmp )' -; RUN: llvm-upgrade < %s | grep 'call void @g( i8 .tmp\.upgrd\.2 )' +; RUN: llvm-upgrade < %s | grep {call void @f( i32 .tmp )} +; RUN: llvm-upgrade < %s | grep {call void @g( i8 .tmp\.upgrd\.2 )} target datalayout = "e-p:32:32" target endian = little diff --git a/test/Assembler/2007-03-19-NegValue.ll b/test/Assembler/2007-03-19-NegValue.ll index 364bec1c3ec..e90cf351e1d 100644 --- a/test/Assembler/2007-03-19-NegValue.ll +++ b/test/Assembler/2007-03-19-NegValue.ll @@ -1,5 +1,5 @@ ; Test whether negative values > 64 bits retain their negativeness. -; RUN: llvm-as < %s | llvm-dis | grep 'add i65.*, -1' +; RUN: llvm-as < %s | llvm-dis | grep {add i65.*, -1} define i65 @testConsts(i65 %N) { %a = add i65 %N, -1 diff --git a/test/Assembler/dg.exp b/test/Assembler/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Assembler/dg.exp +++ b/test/Assembler/dg.exp @@ -1,3 +1,3 @@ -load_lib llvm-dg.exp +load_lib llvm.exp -llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] -- 2.34.1