diff options
75 files changed, 128 insertions, 98 deletions
diff --git a/test/Transforms/Mem2Reg/DifferingTypes.ll b/test/Transforms/Mem2Reg/DifferingTypes.ll index f859808c2f..9c862e29b1 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 ff34508c3c..879685ca87 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 ff34508c3c..879685ca87 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 ff34508c3c..879685ca87 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 cc3a86d985..4a998b1cc3 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 ff34508c3c..879685ca87 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 4583769a84..7ddad0bd0a 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 ; <int> [#uses=1] diff --git a/test/Transforms/Reassociate/dg.exp b/test/Transforms/Reassociate/dg.exp index ff34508c3c..879685ca87 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 d7c39a5808..4219044dc7 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 18c6e4e320..3603604caa 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 c31a421d0e..231bdb95cd 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 dad9c7e70d..1577685717 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 bf33950e34..fd4713a31e 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 52cda01e16..c662e0f711 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 579276cbd6..4868c30783 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 e991818b6c..3cc61f716b 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 b9fe68cb6e..ead3f6ab9a 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 eaffc1daa3..12f8326a73 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 7b6890b90b..7db4e362eb 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 144f646fe0..6e86764bf2 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 e6139c5e09..a90bd7d731 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 b7c6d99586..5cd1107a7a 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 163138c6c1..ebb0d0760f 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 73d3b546ff..e95e9d0abb 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 348725e905..59cfa3f7a2 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 77fb696825..65e5ee7e89 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 eef5fa83c9..c07a54f8f6 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 67d99e4c34..de355d1d50 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 b943236205..b353a0b09a 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 899d8a92ba..77f6bc8692 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 25c39ceeab..c856896be9 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 2e46b69183..43df00c694 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 ff34508c3c..879685ca87 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 2c42dface5..2390d619ae 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 5f06df3e8e..db36228e9c 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 c0a555a300..02c3ac0e36 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 cdbdb2ce08..b44a3189fe 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 6fae7ce957..f0a8244ecf 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 0209681c78..cd488e3f02 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 fb6b1dad4e..c20411d8e7 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 5bf1c5358b..c3f3b8b222 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 742db46f29..d945aeb948 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 82bb1edd7f..7e00a61075 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 ff34508c3c..879685ca87 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 932e7130a6..91d8ea9007 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 883e41c1a1..4febda5b9a 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 681636b07b..c8eaeeab24 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 0df6e3957f..0985f0cd3b 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 be4c4604f9..a9666d2bf4 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 9d2fe54cba..7f0a57c689 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 523205b8b9..fcefac1409 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 1fafe77ed2..08ff2905db 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 91cb68b77e..ac9ba1825e 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 3f3951ac7c..4ac692ed5d 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 eabedf9793..ca699705c3 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 b796dee803..a224a2f6ab 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 8e583e880d..26fce45703 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 2063d9f4ae..3756fcb82e 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 94008b0d0f..73bd9756c1 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 96337f7c3c..ea215e39e9 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 4b643c6a17..3c1f14185c 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 cbce416d66..89d76a8492 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 881944fd9d..7b24426959 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 7e80677bc7..01060ed4ca 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 9411b33f7b..ef2433c11b 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 1eb07b32f1..4535541383 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 a3ed678c1b..6ab16218f3 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 ca5f3e4ab4..2a93057959 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 b22337cfcc..f13f82676b 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 3b8d188544..e370978a5d 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 ff34508c3c..879685ca87 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 b19eac98d6..482c5aa0cc 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 e13f2399e8..b372ca4bf6 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 8bc5b8d2e6..5403955da4 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 60b045ff89..f120851726 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. |