From 9aafdcf20dee238d0e7f14d6723f5a401431fe91 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 15 Apr 2007 09:21:47 +0000 Subject: [PATCH] For PR1319: Upgrade to use new Tcl exec based test harness. This exposes 3 bugs that were previously not being reported: test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll test/Transforms/GlobalOpt/memset.ll test/Transforms/IndVarsSimplify/exit_value_tests.llx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36065 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/Mem2Reg/DifferingTypes.ll | 3 ++- test/Transforms/Mem2Reg/dg.exp | 4 ++-- test/Transforms/PredicateSimplifier/dg.exp | 4 ++-- test/Transforms/PruneEH/dg.exp | 4 ++-- test/Transforms/PruneEH/simplenoreturntest.ll | 3 ++- test/Transforms/RaiseAllocations/dg.exp | 4 ++-- .../Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll | 3 ++- test/Transforms/Reassociate/dg.exp | 4 ++-- test/Transforms/Reassociate/mul-neg-add.ll | 3 ++- test/Transforms/Reassociate/shifttest.ll | 3 ++- test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll | 3 ++- test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll | 2 +- test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll | 3 ++- test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll | 2 +- test/Transforms/SCCP/2006-12-04-PackedType.ll | 1 + test/Transforms/SCCP/2006-12-19-UndefBug.ll | 2 +- test/Transforms/SCCP/apint-array.ll | 2 +- test/Transforms/SCCP/apint-basictest.ll | 1 - test/Transforms/SCCP/apint-basictest2.ll | 1 - test/Transforms/SCCP/apint-basictest3.ll | 3 +-- test/Transforms/SCCP/apint-basictest4.ll | 3 +-- test/Transforms/SCCP/apint-bigarray.ll | 3 +-- test/Transforms/SCCP/apint-bigint.ll | 1 - test/Transforms/SCCP/apint-bigint2.ll | 1 - test/Transforms/SCCP/apint-ipsccp1.ll | 3 ++- test/Transforms/SCCP/apint-ipsccp2.ll | 6 ++---- test/Transforms/SCCP/apint-ipsccp3.ll | 1 - test/Transforms/SCCP/apint-ipsccp4.ll | 2 -- test/Transforms/SCCP/apint-load.ll | 2 -- test/Transforms/SCCP/apint-phi.ll | 1 - test/Transforms/SCCP/apint-select.ll | 1 - test/Transforms/SCCP/calltest.ll | 3 ++- test/Transforms/SCCP/dg.exp | 4 ++-- test/Transforms/SCCP/ipsccp-basic.ll | 3 ++- test/Transforms/SCCP/ipsccp-conditional.ll | 3 ++- test/Transforms/SCCP/logical-nuke.ll | 2 +- test/Transforms/SCCP/phitest.ll | 3 ++- test/Transforms/SCCP/sccptest.ll | 3 ++- test/Transforms/SCCP/select.ll | 1 - test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll | 3 ++- test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll | 3 ++- test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll | 3 ++- .../ScalarRepl/2006-11-07-InvalidArrayPromote.ll | 4 ++-- test/Transforms/ScalarRepl/dg.exp | 4 ++-- .../Transforms/ScalarRepl/memset-aggregate-byte-leader.ll | 7 +++++-- test/Transforms/ScalarRepl/memset-aggregate.ll | 4 ++-- test/Transforms/ScalarRepl/union-fp-int.ll | 8 ++++++-- test/Transforms/ScalarRepl/union-packed.ll | 6 ++++-- test/Transforms/ScalarRepl/union-pointer.ll | 6 +++--- test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll | 3 ++- test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll | 3 ++- .../SimplifyCFG/2003-08-17-BranchFoldOrdering.ll | 3 ++- test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll | 3 ++- test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll | 1 + .../Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll | 4 +++- test/Transforms/SimplifyCFG/2006-08-03-Crash.ll | 3 ++- test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll | 5 ++--- test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll | 1 + test/Transforms/SimplifyCFG/BrUnwind.ll | 4 +++- test/Transforms/SimplifyCFG/DeadSetCC.ll | 3 ++- test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll | 2 +- test/Transforms/SimplifyCFG/InvokeEliminate.ll | 3 ++- test/Transforms/SimplifyCFG/PhiBlockMerge.ll | 2 +- test/Transforms/SimplifyCFG/PhiBlockMerge2.ll | 2 +- test/Transforms/SimplifyCFG/PhiEliminate.ll | 3 ++- test/Transforms/SimplifyCFG/PhiNoEliminate.ll | 3 ++- test/Transforms/SimplifyCFG/UncondBranchToReturn.ll | 3 ++- test/Transforms/SimplifyCFG/branch-cond-merge.ll | 3 ++- test/Transforms/SimplifyCFG/branch-fold.ll | 2 +- test/Transforms/SimplifyCFG/branch-phi-thread.ll | 6 ++++-- test/Transforms/SimplifyCFG/dg.exp | 4 ++-- test/Transforms/SimplifyCFG/hoist-common-code.ll | 2 +- test/Transforms/SimplifyCFG/switch_formation.ll | 3 ++- test/Transforms/SimplifyCFG/switch_switch_fold.ll | 3 ++- test/Transforms/SimplifyCFG/switch_thread.ll | 3 ++- 75 files changed, 128 insertions(+), 98 deletions(-) diff --git a/test/Transforms/Mem2Reg/DifferingTypes.ll b/test/Transforms/Mem2Reg/DifferingTypes.ll index f859808c2fb..9c862e29b19 100644 --- a/test/Transforms/Mem2Reg/DifferingTypes.ll +++ b/test/Transforms/Mem2Reg/DifferingTypes.ll @@ -2,7 +2,8 @@ ; generated code should perform the appropriate masking operations required ; depending on the endianness of the target... ; XFAIL: * -; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca' +; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | \ +; RUN: not grep alloca implementation diff --git a/test/Transforms/Mem2Reg/dg.exp b/test/Transforms/Mem2Reg/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/Mem2Reg/dg.exp +++ b/test/Transforms/Mem2Reg/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}]] diff --git a/test/Transforms/PredicateSimplifier/dg.exp b/test/Transforms/PredicateSimplifier/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/PredicateSimplifier/dg.exp +++ b/test/Transforms/PredicateSimplifier/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}]] diff --git a/test/Transforms/PruneEH/dg.exp b/test/Transforms/PruneEH/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/PruneEH/dg.exp +++ b/test/Transforms/PruneEH/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}]] diff --git a/test/Transforms/PruneEH/simplenoreturntest.ll b/test/Transforms/PruneEH/simplenoreturntest.ll index cc3a86d985c..4a998b1cc36 100644 --- a/test/Transforms/PruneEH/simplenoreturntest.ll +++ b/test/Transforms/PruneEH/simplenoreturntest.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | not grep 'ret int' +; RUN: llvm-upgrade < %s | llvm-as | opt -prune-eh | llvm-dis | \ +; RUN: not grep {ret i32} void %noreturn() { unwind diff --git a/test/Transforms/RaiseAllocations/dg.exp b/test/Transforms/RaiseAllocations/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/RaiseAllocations/dg.exp +++ b/test/Transforms/RaiseAllocations/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}]] diff --git a/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll b/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll index 4583769a84c..7ddad0bd0aa 100644 --- a/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll +++ b/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'ret i32 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\ +; RUN: grep {ret i32 0} int %f(int %a0, int %a1, int %a2, int %a3, int %a4) { %tmp.2 = add int %a4, %a3 ; [#uses=1] diff --git a/test/Transforms/Reassociate/dg.exp b/test/Transforms/Reassociate/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/Reassociate/dg.exp +++ b/test/Transforms/Reassociate/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}]] diff --git a/test/Transforms/Reassociate/mul-neg-add.ll b/test/Transforms/Reassociate/mul-neg-add.ll index d7c39a5808e..4219044dc7a 100644 --- a/test/Transforms/Reassociate/mul-neg-add.ll +++ b/test/Transforms/Reassociate/mul-neg-add.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | not grep 'sub int 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\ +; RUN: not grep {sub i32 0} int %test(int %X, int %Y, int %Z) { %A = sub int 0, %X diff --git a/test/Transforms/Reassociate/shifttest.ll b/test/Transforms/Reassociate/shifttest.ll index 18c6e4e3205..3603604caab 100644 --- a/test/Transforms/Reassociate/shifttest.ll +++ b/test/Transforms/Reassociate/shifttest.ll @@ -1,6 +1,7 @@ ; With shl->mul reassociation, we can see that this is (shl A, 9) * A ; -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, 9' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -instcombine | llvm-dis |\ +; RUN: grep {shl .*, 9} int %test(int %A, int %B) { %X = shl int %A, ubyte 5 diff --git a/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll index c31a421d0e5..231bdb95cd7 100644 --- a/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll +++ b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll @@ -2,7 +2,8 @@ ; this is in fact NOT the case, so the return should still be alive in the code ; after sccp and CFG simplification have been performed. ; -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | grep ret +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \ +; RUN: grep ret void "old_main"() { diff --git a/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll b/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll index dad9c7e70d6..1577685717b 100644 --- a/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll +++ b/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep '%X' +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep %X %G = uninitialized global [40x int] diff --git a/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll b/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll index bf33950e34d..fd4713a31ed 100644 --- a/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll +++ b/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | not grep then: +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -simplifycfg | llvm-dis | \ +; RUN: not grep then: void %cprop_test11(int* %data.1) { entry: ; No predecessors! diff --git a/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll b/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll index 52cda01e165..c662e0f711b 100644 --- a/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll +++ b/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 1' +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep {ret i32 1} ; This function definitely returns 1, even if we don't know the direction ; of the branch. diff --git a/test/Transforms/SCCP/2006-12-04-PackedType.ll b/test/Transforms/SCCP/2006-12-04-PackedType.ll index 579276cbd65..4868c30783e 100644 --- a/test/Transforms/SCCP/2006-12-04-PackedType.ll +++ b/test/Transforms/SCCP/2006-12-04-PackedType.ll @@ -2,6 +2,7 @@ ; SCCP ignores VectorTypes until PR 1034 is fixed ; ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp +; END. target datalayout = "E-p:32:32" target endian = big target pointersize = 32 diff --git a/test/Transforms/SCCP/2006-12-19-UndefBug.ll b/test/Transforms/SCCP/2006-12-19-UndefBug.ll index e991818b6c9..3cc61f716b4 100644 --- a/test/Transforms/SCCP/2006-12-19-UndefBug.ll +++ b/test/Transforms/SCCP/2006-12-19-UndefBug.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | \ -; RUN: grep 'ret i1 false' +; RUN: grep {ret i1 false} bool %foo() { %X = and bool false, undef diff --git a/test/Transforms/SCCP/apint-array.ll b/test/Transforms/SCCP/apint-array.ll index b9fe68cb6e8..ead3f6ab9a6 100644 --- a/test/Transforms/SCCP/apint-array.ll +++ b/test/Transforms/SCCP/apint-array.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep 'ret i101 12' +; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep {ret i101 12} @Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,i101 -123456789000000, i101 0,i101 9123456789000000] diff --git a/test/Transforms/SCCP/apint-basictest.ll b/test/Transforms/SCCP/apint-basictest.ll index eaffc1daa3b..12f8326a737 100644 --- a/test/Transforms/SCCP/apint-basictest.ll +++ b/test/Transforms/SCCP/apint-basictest.ll @@ -1,7 +1,6 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add define i128 @test(i1 %B) { diff --git a/test/Transforms/SCCP/apint-basictest2.ll b/test/Transforms/SCCP/apint-basictest2.ll index 7b6890b90ba..7db4e362eb4 100644 --- a/test/Transforms/SCCP/apint-basictest2.ll +++ b/test/Transforms/SCCP/apint-basictest2.ll @@ -1,7 +1,6 @@ ; This is a basic sanity check for constant propogation. The add instruction ; and phi instruction should be eliminated. -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep phi ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add diff --git a/test/Transforms/SCCP/apint-basictest3.ll b/test/Transforms/SCCP/apint-basictest3.ll index 144f646fe08..6e86764bf2c 100644 --- a/test/Transforms/SCCP/apint-basictest3.ll +++ b/test/Transforms/SCCP/apint-basictest3.ll @@ -2,7 +2,6 @@ ; arithmatic operations. -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep mul ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep umod @@ -16,7 +15,7 @@ BB1: BB2: %f1 = udiv i128 -1, 1 %f2 = add i128 %f1, 1 - %f3 = umod i128 %f2, 2121 + %f3 = urem i128 %f2, 2121 br label %BB3 BB3: %Ret = phi i128 [%t3, %BB1], [%f3, %BB2] diff --git a/test/Transforms/SCCP/apint-basictest4.ll b/test/Transforms/SCCP/apint-basictest4.ll index e6139c5e094..a90bd7d7315 100644 --- a/test/Transforms/SCCP/apint-basictest4.ll +++ b/test/Transforms/SCCP/apint-basictest4.ll @@ -2,10 +2,9 @@ ; logic operations. -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep and ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep trunc -; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep "ret i100 -1" +; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep {ret i100 -1} define i100 @test(i133 %A) { %B = and i133 0, %A diff --git a/test/Transforms/SCCP/apint-bigarray.ll b/test/Transforms/SCCP/apint-bigarray.ll index b7c6d995860..5cd1107a7a4 100644 --- a/test/Transforms/SCCP/apint-bigarray.ll +++ b/test/Transforms/SCCP/apint-bigarray.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && -; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep '%X' +; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep %X @G = global [1000000 x i10000] zeroinitializer diff --git a/test/Transforms/SCCP/apint-bigint.ll b/test/Transforms/SCCP/apint-bigint.ll index 163138c6c1b..ebb0d0760f2 100644 --- a/test/Transforms/SCCP/apint-bigint.ll +++ b/test/Transforms/SCCP/apint-bigint.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep xor define i11129 @test1() { diff --git a/test/Transforms/SCCP/apint-bigint2.ll b/test/Transforms/SCCP/apint-bigint2.ll index 73d3b546ffb..e95e9d0abb1 100644 --- a/test/Transforms/SCCP/apint-bigint2.ll +++ b/test/Transforms/SCCP/apint-bigint2.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep load @Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12, diff --git a/test/Transforms/SCCP/apint-ipsccp1.ll b/test/Transforms/SCCP/apint-ipsccp1.ll index 348725e9058..59cfa3f7a2f 100644 --- a/test/Transforms/SCCP/apint-ipsccp1.ll +++ b/test/Transforms/SCCP/apint-ipsccp1.ll @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret i512 undef' | grep 'ret i8 2' +; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v {ret i512 undef} | \ +; RUN: grep {ret i8 2} define internal i512 @test(i1 %B) { br i1 %B, label %BB1, label %BB2 diff --git a/test/Transforms/SCCP/apint-ipsccp2.ll b/test/Transforms/SCCP/apint-ipsccp2.ll index 77fb6968258..65e5ee7e89e 100644 --- a/test/Transforms/SCCP/apint-ipsccp2.ll +++ b/test/Transforms/SCCP/apint-ipsccp2.ll @@ -1,7 +1,5 @@ -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f && -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v 'ret i101 0' | \ -; RUN: grep -v 'ret i101 undef' | not grep ret - +; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | grep -v {ret i101 0} | \ +; RUN: grep -v {ret i101 undef} | not grep ret define internal i101 @bar(i101 %A) { diff --git a/test/Transforms/SCCP/apint-ipsccp3.ll b/test/Transforms/SCCP/apint-ipsccp3.ll index eef5fa83c96..c07a54f8f6f 100644 --- a/test/Transforms/SCCP/apint-ipsccp3.ll +++ b/test/Transforms/SCCP/apint-ipsccp3.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep global @G = internal global i66 undef diff --git a/test/Transforms/SCCP/apint-ipsccp4.ll b/test/Transforms/SCCP/apint-ipsccp4.ll index 67d99e4c34d..de355d1d50e 100644 --- a/test/Transforms/SCCP/apint-ipsccp4.ll +++ b/test/Transforms/SCCP/apint-ipsccp4.ll @@ -1,7 +1,5 @@ ; This test makes sure that these instructions are properly constant propagated. -; -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep load ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep add ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep phi diff --git a/test/Transforms/SCCP/apint-load.ll b/test/Transforms/SCCP/apint-load.ll index b9432362056..b353a0b09ab 100644 --- a/test/Transforms/SCCP/apint-load.ll +++ b/test/Transforms/SCCP/apint-load.ll @@ -1,7 +1,5 @@ ; This test makes sure that these instructions are properly constant propagated. -; -; RUN: llvm-as < %s | opt -ipsccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep load ; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep fdiv diff --git a/test/Transforms/SCCP/apint-phi.ll b/test/Transforms/SCCP/apint-phi.ll index 899d8a92bae..77f6bc86926 100644 --- a/test/Transforms/SCCP/apint-phi.ll +++ b/test/Transforms/SCCP/apint-phi.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep phi define i999 @test(i999%A, i1 %c) { diff --git a/test/Transforms/SCCP/apint-select.ll b/test/Transforms/SCCP/apint-select.ll index 25c39ceeab3..c856896be9f 100644 --- a/test/Transforms/SCCP/apint-select.ll +++ b/test/Transforms/SCCP/apint-select.ll @@ -1,4 +1,3 @@ -; RUN: llvm-as < %s | opt -sccp | llvm-dis -o /dev/null -f && ; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep select @A = constant i32 10 diff --git a/test/Transforms/SCCP/calltest.ll b/test/Transforms/SCCP/calltest.ll index 2e46b691832..43df00c6940 100644 --- a/test/Transforms/SCCP/calltest.ll +++ b/test/Transforms/SCCP/calltest.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | not grep br +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | \ +; RUN: not grep br ; No matter how hard you try, sqrt(1.0) is always 1.0. This allows the ; optimizer to delete this loop. diff --git a/test/Transforms/SCCP/dg.exp b/test/Transforms/SCCP/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/SCCP/dg.exp +++ b/test/Transforms/SCCP/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}]] diff --git a/test/Transforms/SCCP/ipsccp-basic.ll b/test/Transforms/SCCP/ipsccp-basic.ll index 2c42dface54..2390d619ae6 100644 --- a/test/Transforms/SCCP/ipsccp-basic.ll +++ b/test/Transforms/SCCP/ipsccp-basic.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 17' | grep -v 'ret i32 undef' | not grep ret +; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | \ +; RUN: grep -v {ret i32 17} | grep -v {ret i32 undef} | not grep ret implementation diff --git a/test/Transforms/SCCP/ipsccp-conditional.ll b/test/Transforms/SCCP/ipsccp-conditional.ll index 5f06df3e8e1..db36228e9cd 100644 --- a/test/Transforms/SCCP/ipsccp-conditional.ll +++ b/test/Transforms/SCCP/ipsccp-conditional.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | grep -v 'ret i32 0' | grep -v 'ret i32 undef' | not grep ret +; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | \ +; RUN: grep -v {ret i32 0} | grep -v {ret i32 undef} | not grep ret implementation diff --git a/test/Transforms/SCCP/logical-nuke.ll b/test/Transforms/SCCP/logical-nuke.ll index c0a555a3002..02c3ac0e36f 100644 --- a/test/Transforms/SCCP/logical-nuke.ll +++ b/test/Transforms/SCCP/logical-nuke.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep 'ret i32 0' +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | grep {ret i32 0} ; Test that SCCP has basic knowledge of when and/or nuke overdefined values. diff --git a/test/Transforms/SCCP/phitest.ll b/test/Transforms/SCCP/phitest.ll index cdbdb2ce08a..b44a3189fe1 100644 --- a/test/Transforms/SCCP/phitest.ll +++ b/test/Transforms/SCCP/phitest.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | not grep br +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -dce -simplifycfg | llvm-dis | \ +; RUN: not grep br int %test(int %param) { entry: diff --git a/test/Transforms/SCCP/sccptest.ll b/test/Transforms/SCCP/sccptest.ll index 6fae7ce957d..f0a8244ecfa 100644 --- a/test/Transforms/SCCP/sccptest.ll +++ b/test/Transforms/SCCP/sccptest.ll @@ -1,7 +1,8 @@ ; This is the test case taken from appel's book that illustrates a hard case ; that SCCP gets right. BB3 should be completely eliminated. ; -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -constprop -dce -cfgsimplify | llvm-dis | not grep BB3 +; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -constprop -dce -simplifycfg | \ +; RUN: llvm-dis | not grep BB3 int %testfunction(int %i0, int %j0) { BB1: diff --git a/test/Transforms/SCCP/select.ll b/test/Transforms/SCCP/select.ll index 0209681c787..cd488e3f02c 100644 --- a/test/Transforms/SCCP/select.ll +++ b/test/Transforms/SCCP/select.ll @@ -1,4 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -disable-output && ; RUN: llvm-upgrade < %s | llvm-as | opt -sccp | llvm-dis | not grep select int %test1(bool %C) { diff --git a/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll b/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll index fb6b1dad4ef..c20411d8e7a 100644 --- a/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll +++ b/test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: grep alloca | grep {4 x} ; Test that an array is not incorrectly deconstructed... diff --git a/test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll b/test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll index 5bf1c5358b6..c3f3b8b2221 100644 --- a/test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll +++ b/test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll @@ -1,6 +1,7 @@ ; Scalar replacement was incorrectly promoting this alloca!! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | sed 's/;.*//g' | grep '\[' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: sed {s/;.*//g} | grep \[ sbyte *%test() { %A = alloca [30 x sbyte] diff --git a/test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll b/test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll index 742db46f298..d945aeb9485 100644 --- a/test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll +++ b/test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '{' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: grep alloca | grep \{ implementation ; Functions: declare int %.callback_1(sbyte*) diff --git a/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll b/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll index 82bb1edd7f1..7e00a61075f 100644 --- a/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll +++ b/test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll @@ -1,5 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep -F 'alloca [2 x <4 x i32>]' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: grep -F {alloca \[2 x <4 x i32>\]} int %func(<4 x float> %v0, <4 x float> %v1) { %vsiidx = alloca [2 x <4 x int>], align 16 ; <[2 x <4 x int>]*> [#uses=3] diff --git a/test/Transforms/ScalarRepl/dg.exp b/test/Transforms/ScalarRepl/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/ScalarRepl/dg.exp +++ b/test/Transforms/ScalarRepl/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}]] diff --git a/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll b/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll index 932e7130a6d..91d8ea90071 100644 --- a/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll +++ b/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll @@ -1,6 +1,9 @@ -; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep 'call void @llvm.memcpy.i32' && -; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'getelementptr' ; PR1226 +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | \ +; RUN: not grep {call void @llvm.memcpy.i32} +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep getelementptr +; END. + target datalayout = "E-p:32:32" target triple = "powerpc-apple-darwin8.8.0" %struct.foo = type { i8, i8 } diff --git a/test/Transforms/ScalarRepl/memset-aggregate.ll b/test/Transforms/ScalarRepl/memset-aggregate.ll index 883e41c1a18..4febda5b9a7 100644 --- a/test/Transforms/ScalarRepl/memset-aggregate.ll +++ b/test/Transforms/ScalarRepl/memset-aggregate.ll @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret i32 16843009' && -; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca ; PR1226 +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep {ret i32 16843009} +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" target triple = "i686-apple-darwin8" diff --git a/test/Transforms/ScalarRepl/union-fp-int.ll b/test/Transforms/ScalarRepl/union-fp-int.ll index 681636b07b4..c8eaeeab24b 100644 --- a/test/Transforms/ScalarRepl/union-fp-int.ll +++ b/test/Transforms/ScalarRepl/union-fp-int.ll @@ -1,5 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast.*float.*i32' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: not grep alloca +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: grep {bitcast.*float.*i32} + +implementation int %test(float %X) { %X_addr = alloca float diff --git a/test/Transforms/ScalarRepl/union-packed.ll b/test/Transforms/ScalarRepl/union-packed.ll index 0df6e3957f7..0985f0cd3b4 100644 --- a/test/Transforms/ScalarRepl/union-packed.ll +++ b/test/Transforms/ScalarRepl/union-packed.ll @@ -1,5 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast' +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: not grep alloca +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: grep bitcast target endian = little diff --git a/test/Transforms/ScalarRepl/union-pointer.ll b/test/Transforms/ScalarRepl/union-pointer.ll index be4c4604f9c..a9666d2bf46 100644 --- a/test/Transforms/ScalarRepl/union-pointer.ll +++ b/test/Transforms/ScalarRepl/union-pointer.ll @@ -1,7 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca && -; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret i8' - ; PR892 +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ +; RUN: not grep alloca +; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep {ret i8} target endian = little target pointersize = 32 diff --git a/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll b/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll index 9d2fe54cbaf..7f0a57c689b 100644 --- a/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll +++ b/test/Transforms/SimplifyCFG/2002-05-05-EmptyBlockMerge.ll @@ -1,6 +1,7 @@ ; Basic block #2 should not be merged into BB #3! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br label' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: grep {br label} ; declare void %foo() implementation diff --git a/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll b/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll index 523205b8b93..fcefac1409a 100644 --- a/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll +++ b/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll @@ -1,7 +1,8 @@ ; This test checks to make sure that 'br X, Dest, Dest' is folded into ; 'br Dest' -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {br bool %c2} declare void %noop() diff --git a/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll index 1fafe77ed26..08ff2905db5 100644 --- a/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll +++ b/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll @@ -3,7 +3,8 @@ ; due to the fact that the SimplifyCFG function does not use ; the ConstantFoldTerminator function. -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br bool %c2' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {br bool %c2} declare void %noop() diff --git a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll index 91cb68b77e3..ac9ba1825e8 100644 --- a/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll +++ b/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep switch +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep switch int %test1() { ; Test normal folding switch uint 5, label %Default [ diff --git a/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll b/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll index 3f3951ac7c5..4ac692ed5d9 100644 --- a/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll +++ b/test/Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll @@ -1,4 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output +; END. %arraytype.1.Char = type { int, [0 x sbyte] } %arraytype.4.Signed = type { int, [0 x int] } diff --git a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll index eabedf97937..ca699705c3e 100644 --- a/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll +++ b/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll @@ -1,6 +1,8 @@ ; Make sure this doesn't turn into an infinite loop -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -constprop -simplifycfg | llvm-dis | grep bb86 +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -constprop -simplifycfg |\ +; RUN: llvm-dis | grep bb86 +; END. %struct.anon = type { uint, int, int, int, [1024 x sbyte] } %_zero_ = external global %struct.anon* ; <%struct.anon**> [#uses=2] diff --git a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll index b796dee8034..a224a2f6ab3 100644 --- a/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll +++ b/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -simplifycfg -disable-output +; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -simplifycfg \ +; RUN: -disable-output ; PR867 target endian = big diff --git a/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll b/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll index 8e583e880d7..26fce457038 100644 --- a/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll +++ b/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll @@ -1,7 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select - ; PR957 +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep select uint %test(uint %tmp) { cond_false179: ; preds = %cond_true diff --git a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll index 2063d9f4ae1..3756fcb82e4 100644 --- a/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll +++ b/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll @@ -1,4 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis +; END. ; ModuleID = 'bugpoint-tooptimize.bc' target datalayout = "e-p:32:32" target endian = little diff --git a/test/Transforms/SimplifyCFG/BrUnwind.ll b/test/Transforms/SimplifyCFG/BrUnwind.ll index 94008b0d0f3..73bd9756c1f 100644 --- a/test/Transforms/SimplifyCFG/BrUnwind.ll +++ b/test/Transforms/SimplifyCFG/BrUnwind.ll @@ -1,4 +1,6 @@ -;RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {br label} + void %test(bool %C) { br bool %C, label %A, label %B A: diff --git a/test/Transforms/SimplifyCFG/DeadSetCC.ll b/test/Transforms/SimplifyCFG/DeadSetCC.ll index 96337f7c3ca..ea215e39e94 100644 --- a/test/Transforms/SimplifyCFG/DeadSetCC.ll +++ b/test/Transforms/SimplifyCFG/DeadSetCC.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'icmp eq' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {icmp eq} ; Check that simplifycfg deletes a dead 'seteq' instruction when it ; folds a conditional branch into a switch instruction. diff --git a/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll b/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll index 4b643c6a175..3c1f14185c2 100644 --- a/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll +++ b/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll @@ -1,6 +1,6 @@ ; Test merging of blocks with phi nodes. ; -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N: ; int %test(bool %a) { diff --git a/test/Transforms/SimplifyCFG/InvokeEliminate.ll b/test/Transforms/SimplifyCFG/InvokeEliminate.ll index cbce416d66f..89d76a8492f 100644 --- a/test/Transforms/SimplifyCFG/InvokeEliminate.ll +++ b/test/Transforms/SimplifyCFG/InvokeEliminate.ll @@ -3,7 +3,8 @@ ; If this test is successful, the function should be reduced to 'call; ret' -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not egrep 'invoke|br' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not egrep {\\(invoke\\)|\\(br\\)} declare void %bar() diff --git a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll index 881944fd9d0..7b244269591 100644 --- a/test/Transforms/SimplifyCFG/PhiBlockMerge.ll +++ b/test/Transforms/SimplifyCFG/PhiBlockMerge.ll @@ -1,6 +1,6 @@ ; Test merging of blocks that only have PHI nodes in them ; -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N: ; int %test(bool %a, bool %b) { diff --git a/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll b/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll index 7e80677bc79..01060ed4ca8 100644 --- a/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll +++ b/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll @@ -2,7 +2,7 @@ ; where the mergedinto block doesn't have any PHI nodes, and is in fact ; dominated by the block-to-be-eliminated ; -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'N:' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep N: ; int %test(bool %a, bool %b) { diff --git a/test/Transforms/SimplifyCFG/PhiEliminate.ll b/test/Transforms/SimplifyCFG/PhiEliminate.ll index 9411b33f7b3..ef2433c11bf 100644 --- a/test/Transforms/SimplifyCFG/PhiEliminate.ll +++ b/test/Transforms/SimplifyCFG/PhiEliminate.ll @@ -4,7 +4,8 @@ ; 'if conversion'. ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis > %t.xform -; RUN: not grep phi %t.xform && grep ret %t.xform +; RUN: not grep phi %t.xform +; RUN: grep ret %t.xform declare void %use(bool) declare void %use(int) diff --git a/test/Transforms/SimplifyCFG/PhiNoEliminate.ll b/test/Transforms/SimplifyCFG/PhiNoEliminate.ll index 1eb07b32f16..45355413835 100644 --- a/test/Transforms/SimplifyCFG/PhiNoEliminate.ll +++ b/test/Transforms/SimplifyCFG/PhiNoEliminate.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep select +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep select ;; The PHI node in this example should not be turned into a select, as we are ;; not able to ifcvt the entire block. As such, converting to a select just diff --git a/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll b/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll index a3ed678c1be..6ab16218f33 100644 --- a/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll +++ b/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll @@ -2,7 +2,8 @@ ; a PHI node and a return. Make sure the simplify cfg can straighten out this ; important case. This is basically the most trivial form of tail-duplication. -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br label' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {br label} int %test(bool %B, int %A, int %B) { br bool %B, label %T, label %F diff --git a/test/Transforms/SimplifyCFG/branch-cond-merge.ll b/test/Transforms/SimplifyCFG/branch-cond-merge.ll index ca5f3e4ab44..2a930579592 100644 --- a/test/Transforms/SimplifyCFG/branch-cond-merge.ll +++ b/test/Transforms/SimplifyCFG/branch-cond-merge.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine -simplifycfg | llvm-dis | not grep call +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -instcombine \ +; RUN: -simplifycfg | llvm-dis | not grep call declare void %bar() diff --git a/test/Transforms/SimplifyCFG/branch-fold.ll b/test/Transforms/SimplifyCFG/branch-fold.ll index b22337cfcc1..f13f82676b3 100644 --- a/test/Transforms/SimplifyCFG/branch-fold.ll +++ b/test/Transforms/SimplifyCFG/branch-fold.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep 'br i1' | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep {br i1} | wc -l | grep 1 void %test(int* %P, int* %Q, bool %A, bool %B) { br bool %A, label %a, label %b ;; fold the two branches into one diff --git a/test/Transforms/SimplifyCFG/branch-phi-thread.ll b/test/Transforms/SimplifyCFG/branch-phi-thread.ll index 3b8d1885443..e370978a5d7 100644 --- a/test/Transforms/SimplifyCFG/branch-phi-thread.ll +++ b/test/Transforms/SimplifyCFG/branch-phi-thread.ll @@ -1,5 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | not grep 'call void %f1' && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce -disable-output +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -adce | llvm-dis | \ +; RUN: not grep {call void %f1} +; END. + declare void %f1() declare void %f2() declare void %f3() diff --git a/test/Transforms/SimplifyCFG/dg.exp b/test/Transforms/SimplifyCFG/dg.exp index ff34508c3c6..879685ca879 100644 --- a/test/Transforms/SimplifyCFG/dg.exp +++ b/test/Transforms/SimplifyCFG/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}]] diff --git a/test/Transforms/SimplifyCFG/hoist-common-code.ll b/test/Transforms/SimplifyCFG/hoist-common-code.ll index b19eac98d6d..482c5aa0cc7 100644 --- a/test/Transforms/SimplifyCFG/hoist-common-code.ll +++ b/test/Transforms/SimplifyCFG/hoist-common-code.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br declare void %bar(int) void %test(bool %P, int* %Q) { diff --git a/test/Transforms/SimplifyCFG/switch_formation.ll b/test/Transforms/SimplifyCFG/switch_formation.ll index e13f2399e83..b372ca4bf68 100644 --- a/test/Transforms/SimplifyCFG/switch_formation.ll +++ b/test/Transforms/SimplifyCFG/switch_formation.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'br' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep br +; END. bool %_ZN4llvm11SetCondInst7classofEPKNS_11InstructionE({uint, uint}* %I) { entry: diff --git a/test/Transforms/SimplifyCFG/switch_switch_fold.ll b/test/Transforms/SimplifyCFG/switch_switch_fold.ll index 8bc5b8d2e65..5403955da47 100644 --- a/test/Transforms/SimplifyCFG/switch_switch_fold.ll +++ b/test/Transforms/SimplifyCFG/switch_switch_fold.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | grep switch | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: grep switch | wc -l | grep 1 ; Test that a switch going to a switch on the same value can be merged. All ; three switches in this example can be merged into one big one. diff --git a/test/Transforms/SimplifyCFG/switch_thread.ll b/test/Transforms/SimplifyCFG/switch_thread.ll index 60b045ff89a..f1208517268 100644 --- a/test/Transforms/SimplifyCFG/switch_thread.ll +++ b/test/Transforms/SimplifyCFG/switch_thread.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | not grep 'call void %DEAD' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg | llvm-dis | \ +; RUN: not grep {call void %DEAD} ; Test that we can thread a simple known condition through switch statements.