From a6fee9d6d580094e91b40abfb5f37a1a0007e1d3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Jun 2003 23:23:34 +0000 Subject: [PATCH] Remove explicit control flow through the use of the 'not' script llvm-svn: 6965 --- llvm/test/Regression/Analysis/DSGraph/gcsetest.ll | 5 +---- .../Assembler/2002-04-29-NameBinding.llx | 6 +----- .../Regression/Assembler/ConstantExprFoldCast.llx | 5 +---- .../Regression/Linker/2003-05-31-LinkerRename.ll | 5 +---- .../ADCE/2003-06-24-BasicFunctionality.ll | 5 +---- llvm/test/Regression/Transforms/ADCE/adcetest.ll | 5 +---- .../Regression/Transforms/BasicAA/featuretest.ll | 5 +---- .../Regression/Transforms/BasicAA/gcsetest.ll | 5 +---- .../Regression/Transforms/BasicAA/licmtest.ll | 5 +---- .../ConstProp/2002-05-03-NotOperator.ll | 5 +---- .../ConstProp/2002-09-03-SetCC-Bools.ll | 5 +---- .../Regression/Transforms/ConstProp/basictest.ll | 10 +++------- .../Transforms/ConstProp/logicaltest.ll | 5 +---- .../Regression/Transforms/ConstProp/nottest.ll | 5 +---- llvm/test/Regression/Transforms/ConstProp/phi.ll | 10 +++------- .../Regression/Transforms/ConstProp/remtest.ll | 15 ++++++--------- .../CorrelatedExprs/2002-10-03-PHIPropogate.ll | 5 +---- .../Transforms/CorrelatedExprs/basictest.ll | 5 +---- .../Transforms/CorrelatedExprs/branchtest.ll | 5 +---- .../Transforms/CorrelatedExprs/looptest.ll | 5 +---- .../Transforms/CorrelatedExprs/nullpointer.ll | 5 +---- .../Regression/Transforms/CorrelatedExprs/whet.ll | 5 +---- .../Transforms/DeadArgElim/basictest.ll | 5 +---- .../2002-08-19-ResolveGlobalVars.ll | 11 +---------- .../2002-08-19-ResolveGlobalVarsEasier.ll | 5 +---- .../FunctionResolve/2002-11-07-RetMismatch.ll | 5 +---- .../FunctionResolve/2002-11-09-ExternFn.ll | 9 +-------- .../2003-04-18-ForwardDeclGlobal.ll | 6 ++---- .../2003-05-31-AllInternalDecls.ll | 5 +---- .../2003-05-31-FuncPointerResolve.ll | 6 ++---- .../FunctionResolve/2003-05-31-InternalDecl.ll | 5 +---- .../Transforms/FunctionResolve/basictest.ll | 5 +---- .../Transforms/FunctionResolve/retmismatch1.ll | 10 +--------- .../Transforms/FunctionResolve/retmismatch2.ll | 10 +--------- .../Transforms/GCSE/2002-05-14-OperandSwap.ll | 5 +---- .../GCSE/2003-06-13-LoadStoreEliminate.ll | 5 +---- .../Regression/Transforms/GCSE/RLE-Eliminate.ll | 5 +---- .../GlobalDCE/2002-08-17-FunctionDGE.ll | 5 +---- .../GlobalDCE/2002-08-17-WorkListTest.ll | 5 +---- .../Transforms/GlobalDCE/basicvariabletest.ll | 6 +----- .../LICM/2003-02-27-PreheaderProblem.ll | 5 +---- .../Mem2Reg/2003-06-26-IterativePromote.ll | 5 +---- .../Transforms/Mem2Reg/DifferingTypes.ll | 5 +---- .../Transforms/Mem2Reg/PromoteMemToRegister.ll | 5 +---- .../Transforms/PiNodeInserter/substitutetest.ll | 5 +---- .../Reassociate/2002-05-15-AgressiveSubMove.ll | 7 ++----- .../Reassociate/2002-05-15-MissedTree.ll | 7 ++----- .../Reassociate/2002-05-15-SubReassociate.ll | 7 ++----- .../Reassociate/2002-05-15-SubReassociate2.ll | 5 +---- .../Transforms/Reassociate/basictest.ll | 7 ++----- .../Transforms/Reassociate/basictest2.ll | 5 +---- .../Regression/Transforms/Reassociate/looptest.ll | 5 +---- .../Regression/Transforms/Reassociate/otherops.ll | 5 +---- .../Regression/Transforms/Reassociate/subtest.ll | 5 +---- .../Transforms/SCCP/2002-05-02-EdgeFailure.ll | 11 +++-------- .../Transforms/SCCP/2002-05-02-MissSecondInst.ll | 11 +++-------- .../SCCP/2002-08-30-GetElementPtrTest.ll | 5 +---- .../SCCP/2003-06-24-OverdefinedPHIValue.ll | 5 +---- llvm/test/Regression/Transforms/SCCP/basictest.ll | 10 +++------- llvm/test/Regression/Transforms/SCCP/sccptest.ll | 11 +++-------- .../Regression/Transforms/ScalarRepl/arraytest.ll | 5 +---- .../Regression/Transforms/ScalarRepl/basictest.ll | 5 +---- 62 files changed, 85 insertions(+), 300 deletions(-) diff --git a/llvm/test/Regression/Analysis/DSGraph/gcsetest.ll b/llvm/test/Regression/Analysis/DSGraph/gcsetest.ll index 14a07bf87b03..bf0cc354bde9 100644 --- a/llvm/test/Regression/Analysis/DSGraph/gcsetest.ll +++ b/llvm/test/Regression/Analysis/DSGraph/gcsetest.ll @@ -1,10 +1,7 @@ ; Test that GCSE uses ds-aa to do alias analysis, which is capable of ; disambiguating some cases. -; RUN: if as < %s | opt -ds-aa -load-vn -gcse -instcombine -dce | dis | grep ELIM -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -ds-aa -load-vn -gcse -instcombine -dce | dis | not grep ELIM %intpair = type {int*, int*} implementation diff --git a/llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx b/llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx index 4550832453ce..c1e6aba5e05e 100644 --- a/llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx +++ b/llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx @@ -4,10 +4,7 @@ ; Check by running globaldce, which will remove the constant if there are ; no references to it! ; -; RUN: if as < %s | opt -globaldce | dis | grep constant -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -globaldce | dis | grep-not constant ; %v1 = internal constant int 5 @@ -15,7 +12,6 @@ implementation 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/llvm/test/Regression/Assembler/ConstantExprFoldCast.llx b/llvm/test/Regression/Assembler/ConstantExprFoldCast.llx index 38763a7306fb..34e5654b8589 100644 --- a/llvm/test/Regression/Assembler/ConstantExprFoldCast.llx +++ b/llvm/test/Regression/Assembler/ConstantExprFoldCast.llx @@ -1,9 +1,6 @@ ; This test checks to make sure that constant exprs fold in some simple situations -; RUN: if as < %s | dis | grep cast -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | dis | grep-not cast %A = global int* cast (sbyte* null to int*) ; Cast null -> fold %B = global int** cast (int** %A to int**) ; Cast to same type -> fold diff --git a/llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll b/llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll index b1ba4b0b907b..b3e4b8ef3fcb 100644 --- a/llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll +++ b/llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll @@ -5,10 +5,7 @@ ; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc ; RUN: as < %s > Output/%s.2.bc -; RUN: if link Output/%s.[12].bc | dis | grep 'internal' | grep '%foo(' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: link Output/%s.[12].bc | dis | grep 'internal' | grep-not '%foo(' implementation declare int %foo() diff --git a/llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll b/llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll index 453723b1258e..7e4bf080907c 100644 --- a/llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll +++ b/llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -adce -simplifycfg | dis | grep then: -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -adce -simplifycfg | dis | not grep then: void %dead_test8(int* %data.1, int %idx.1) { entry: ; No predecessors! diff --git a/llvm/test/Regression/Transforms/ADCE/adcetest.ll b/llvm/test/Regression/Transforms/ADCE/adcetest.ll index 4a06cd9f396f..2e9cd6c6c380 100644 --- a/llvm/test/Regression/Transforms/ADCE/adcetest.ll +++ b/llvm/test/Regression/Transforms/ADCE/adcetest.ll @@ -1,10 +1,7 @@ ; This is the test case taken from Appel's book that illustrates a hard case ; that SCCP gets right, and when followed by ADCE, is completely eliminated ; -; RUN: if as < %s | opt -sccp -adce -simplifycfg | dis | grep br -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp -adce -simplifycfg | dis | not grep br int "test function"(int %i0, int %j0) { BB1: diff --git a/llvm/test/Regression/Transforms/BasicAA/featuretest.ll b/llvm/test/Regression/Transforms/BasicAA/featuretest.ll index 803dafb67686..0b798e2b635e 100644 --- a/llvm/test/Regression/Transforms/BasicAA/featuretest.ll +++ b/llvm/test/Regression/Transforms/BasicAA/featuretest.ll @@ -1,10 +1,7 @@ ; This testcase tests for various features the basicaa test should be able to ; determine, as noted in the comments. -; RUN: if as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | grep REMOVE -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep REMOVE %Global = external global { int } diff --git a/llvm/test/Regression/Transforms/BasicAA/gcsetest.ll b/llvm/test/Regression/Transforms/BasicAA/gcsetest.ll index 67556639470c..4287e7d27820 100644 --- a/llvm/test/Regression/Transforms/BasicAA/gcsetest.ll +++ b/llvm/test/Regression/Transforms/BasicAA/gcsetest.ll @@ -2,10 +2,7 @@ ; disambiguating some obvious cases. All loads should be removable in ; this testcase. -; RUN: if as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | grep load -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep load %A = global int 7 %B = global int 8 diff --git a/llvm/test/Regression/Transforms/BasicAA/licmtest.ll b/llvm/test/Regression/Transforms/BasicAA/licmtest.ll index 585ac17ae92d..414a53808533 100644 --- a/llvm/test/Regression/Transforms/BasicAA/licmtest.ll +++ b/llvm/test/Regression/Transforms/BasicAA/licmtest.ll @@ -3,10 +3,7 @@ ; two pointers, then the load should be hoisted, and the store sunk. Thus ; the loop becomes empty and can be deleted by ADCE. -; RUN: if as < %s | opt -basicaa -licm --adce | dis | grep Loop -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -basicaa -licm --adce | dis | not grep Loop %A = global int 7 %B = global int 8 diff --git a/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll b/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll index cbc1b6c6c8bf..d184c08c073d 100644 --- a/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll +++ b/llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll @@ -4,10 +4,7 @@ ; Fix #2: The unary not instruction now no longer exists. Change to xor. -; RUN: if as < %s | opt -constprop | dis | grep 'int 0' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop | dis | not grep 'int 0' int "test1"() { %R = xor int 123, -1 diff --git a/llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll b/llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll index 9ac493537736..ec73c057f06c 100644 --- a/llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll +++ b/llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll @@ -1,9 +1,6 @@ ; SetCC on boolean values was not implemented! -; RUN: if as < %s | opt -constprop -die | dis | grep 'set' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not grep 'set' bool "test1"() { %A = setle bool true, false diff --git a/llvm/test/Regression/Transforms/ConstProp/basictest.ll b/llvm/test/Regression/Transforms/ConstProp/basictest.ll index 65cfd35889ea..8fe5ebb7c5e8 100644 --- a/llvm/test/Regression/Transforms/ConstProp/basictest.ll +++ b/llvm/test/Regression/Transforms/ConstProp/basictest.ll @@ -1,13 +1,9 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: if as < %s | opt -constprop -die | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not grep add -int "test"(bool %B) -begin +int %test(bool %B) { br bool %B, label %BB1, label %BB2 BB1: %Val = add int 0, 0 @@ -17,4 +13,4 @@ BB2: BB3: %Ret = phi int [%Val, %BB1], [1, %BB2] ret int %Ret -end +} diff --git a/llvm/test/Regression/Transforms/ConstProp/logicaltest.ll b/llvm/test/Regression/Transforms/ConstProp/logicaltest.ll index f5af80eb0fcd..8e9d41609006 100644 --- a/llvm/test/Regression/Transforms/ConstProp/logicaltest.ll +++ b/llvm/test/Regression/Transforms/ConstProp/logicaltest.ll @@ -1,9 +1,6 @@ ; Ensure constant propogation of logical instructions is working correctly. -; RUN: if as < %s | opt -constprop -die | dis | ggrep -E 'and|or|xor' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not ggrep -E 'and|or|xor' int "test1"() { %R = and int 4,1234 ret int %R } diff --git a/llvm/test/Regression/Transforms/ConstProp/nottest.ll b/llvm/test/Regression/Transforms/ConstProp/nottest.ll index a74d51489948..11dc63ecd076 100644 --- a/llvm/test/Regression/Transforms/ConstProp/nottest.ll +++ b/llvm/test/Regression/Transforms/ConstProp/nottest.ll @@ -1,9 +1,6 @@ ; Ensure constant propogation of 'not' instructions is working correctly. -; RUN: if as < %s | opt -constprop -die | dis | grep xor -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not grep xor int "test1"() { %R = xor int 4, -1 diff --git a/llvm/test/Regression/Transforms/ConstProp/phi.ll b/llvm/test/Regression/Transforms/ConstProp/phi.ll index 064b681c5cf3..c80c5e4bb5fa 100644 --- a/llvm/test/Regression/Transforms/ConstProp/phi.ll +++ b/llvm/test/Regression/Transforms/ConstProp/phi.ll @@ -1,13 +1,9 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: if as < %s | opt -constprop -die | dis | grep phi -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not grep phi -int "test"(bool %B) -begin +int %test(bool %B) { BB0: br bool %B, label %BB1, label %BB3 BB1: @@ -15,4 +11,4 @@ BB1: BB3: %Ret = phi int [1, %BB0], [1, %BB1] ret int %Ret -end +} diff --git a/llvm/test/Regression/Transforms/ConstProp/remtest.ll b/llvm/test/Regression/Transforms/ConstProp/remtest.ll index d3be9350edc0..7ff310898c8a 100644 --- a/llvm/test/Regression/Transforms/ConstProp/remtest.ll +++ b/llvm/test/Regression/Transforms/ConstProp/remtest.ll @@ -1,26 +1,23 @@ -; Ensure constant propogation of remainder instructions is working correctly. +; Ensure constant propagation of remainder instructions is working correctly. -; RUN: if as < %s | opt -constprop -die | dis | grep rem -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -constprop -die | dis | not grep rem -int "test1"() { +int %test1() { %R = rem int 4, 3 ret int %R } -int "test2"() { +int %test2() { %R = rem int 123, -23 ret int %R } -float "test3"() { +float %test3() { %R = rem float 12.45, 123.213 ret float %R } -double "test4"() { +double %test4() { %R = rem double 312.20213123, 12.3333412 ret double %R } diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/2002-10-03-PHIPropogate.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/2002-10-03-PHIPropogate.ll index 73f439988e55..d1bb4303f990 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/2002-10-03-PHIPropogate.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/2002-10-03-PHIPropogate.ll @@ -12,10 +12,7 @@ ; } ; } ; -; RUN: if as < %s | opt -cee -simplifycfg | dis | grep bb3 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -simplifycfg | dis | not grep bb3 implementation declare void %bar() diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/basictest.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/basictest.ll index c8eb546b5e7f..d5b260984e06 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/basictest.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/basictest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -cee -constprop -instcombine -dce | dis | grep 'REMOVE' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -constprop -instcombine -dce | dis | not grep 'REMOVE' int %test1(int %A) { %cond = seteq int %A, 40 diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll index eeed1fd5a205..c431cb4c03ab 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -cee -simplifycfg | dis | grep 'REMOVE' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -simplifycfg | dis | not grep 'REMOVE' implementation diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/looptest.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/looptest.ll index 3af0814eea61..6763443291ba 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/looptest.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/looptest.ll @@ -11,10 +11,7 @@ ; ; Note that this is a "feature" test, not a correctness test. ; -; RUN: if as < %s | opt -cee -simplifycfg | dis | grep cond213 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -simplifycfg | dis | not grep cond213 ; implementation ; Functions: diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/nullpointer.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/nullpointer.ll index cf2245d09cb3..ff4a3bd658f8 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/nullpointer.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/nullpointer.ll @@ -1,10 +1,7 @@ ; a load or store of a pointer indicates that the pointer is not null. ; Any succeeding uses of the pointer should get this info -; RUN: if as < %s | opt -cee -instcombine -simplifycfg | dis | grep br -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -instcombine -simplifycfg | dis | not grep br implementation ; Functions: diff --git a/llvm/test/Regression/Transforms/CorrelatedExprs/whet.ll b/llvm/test/Regression/Transforms/CorrelatedExprs/whet.ll index c1e92f8e6f13..b2ce0915680c 100644 --- a/llvm/test/Regression/Transforms/CorrelatedExprs/whet.ll +++ b/llvm/test/Regression/Transforms/CorrelatedExprs/whet.ll @@ -11,10 +11,7 @@ ; ; This should eliminate all BB's except BB0, BB9, BB10 ; -; RUN: if as < %s | opt -cee -instcombine -simplifycfg | dis | grep 'bb[2-8]' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -cee -instcombine -simplifycfg | dis | not grep 'bb[2-8]' implementation ; Functions: diff --git a/llvm/test/Regression/Transforms/DeadArgElim/basictest.ll b/llvm/test/Regression/Transforms/DeadArgElim/basictest.ll index 77701f7361b1..d43d577305bd 100644 --- a/llvm/test/Regression/Transforms/DeadArgElim/basictest.ll +++ b/llvm/test/Regression/Transforms/DeadArgElim/basictest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -deadargelim | dis | grep DEADARG -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -deadargelim | dis | not grep DEADARG implementation diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll b/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll index 3eb61d41a41a..54bc68812f32 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVars.ll @@ -1,16 +1,7 @@ ; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved ; correctly. ; -; RUN: if as < %s | opt -funcresolve > /dev/null -; RUN: then echo "opt ok" -; RUN: else exit 1 # Make sure opt doesn't abort! -; RUN: fi -; -; RUN: if as < %s | opt -funcresolve | dis | grep external -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi -; +; RUN: as < %s | opt -funcresolve | dis | not grep external %X = external global [0 x int] %X = global [4 x int] [ int 1, int 2, int 3, int 4 ] diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll b/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll index 39c9a3dec7d0..993fd88516ca 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2002-08-19-ResolveGlobalVarsEasier.ll @@ -1,10 +1,7 @@ ; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved ; correctly. This doesn't have constantexprs ; -; RUN: if as < %s | opt -funcresolve | dis | grep external -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve | dis | not grep external ; %X = external global [0 x int] diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2002-11-07-RetMismatch.ll b/llvm/test/Regression/Transforms/FunctionResolve/2002-11-07-RetMismatch.ll index 468b6874d7cd..15a09ab0fb18 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2002-11-07-RetMismatch.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2002-11-07-RetMismatch.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -funcresolve -funcresolve | dis | grep declare -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -funcresolve | dis | not grep declare declare void %qsortg(sbyte*, int, int) diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2002-11-09-ExternFn.ll b/llvm/test/Regression/Transforms/FunctionResolve/2002-11-09-ExternFn.ll index a0dab65b4e4f..69092194a82e 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2002-11-09-ExternFn.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2002-11-09-ExternFn.ll @@ -1,12 +1,5 @@ -; RUN: if as < %s | opt -funcresolve > /dev/null -; RUN: then echo "opt ok" -; RUN: else exit 1 # Make sure opt doesn't abort! -; RUN: fi ; -; RUN: if as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -instcombine | dis | not grep '\.\.\.' declare int %foo(...) declare int %foo(int) diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2003-04-18-ForwardDeclGlobal.ll b/llvm/test/Regression/Transforms/FunctionResolve/2003-04-18-ForwardDeclGlobal.ll index fd25eae90380..a9c4117cee51 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2003-04-18-ForwardDeclGlobal.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2003-04-18-ForwardDeclGlobal.ll @@ -1,7 +1,5 @@ -; RUN: if as < %s | opt -funcresolve -disable-output 2>&1 | grep WARNING -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING + %__popcount_tab = external constant [0 x ubyte] %__popcount_tab = constant [4 x ubyte] c"\00\01\01\02" diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-AllInternalDecls.ll b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-AllInternalDecls.ll index 88d6775b999c..7abf0c2ce49f 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-AllInternalDecls.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-AllInternalDecls.ll @@ -1,9 +1,6 @@ ; This testcase should not cause a warning! -; RUN: if (as < %s | opt -funcresolve -disable-output) 2>&1 | grep 'WARNING' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: (as < %s | opt -funcresolve -disable-output) 2>&1 | not grep 'WARNING' %X = internal global float 1.0 %X = internal global int 1 diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-FuncPointerResolve.ll b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-FuncPointerResolve.ll index c171b184e73b..01da6dc9a63b 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-FuncPointerResolve.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-FuncPointerResolve.ll @@ -1,7 +1,5 @@ -; RUN: if as < %s | opt -funcresolve | dis | grep declare -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve | dis | not grep declare + %Table = constant int(...)* %foo %Table2 = constant [1 x int(...)* ] [ int(...)* %foo ] diff --git a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-InternalDecl.ll b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-InternalDecl.ll index ab41e2ec8218..41cad05a2da3 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-InternalDecl.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/2003-05-31-InternalDecl.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -funcresolve | dis | grep declare -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve | dis | not grep declare declare void %test(...) diff --git a/llvm/test/Regression/Transforms/FunctionResolve/basictest.ll b/llvm/test/Regression/Transforms/FunctionResolve/basictest.ll index 422b655420b0..fa53724dc83f 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/basictest.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/basictest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | grep call -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call declare int %foo(...) diff --git a/llvm/test/Regression/Transforms/FunctionResolve/retmismatch1.ll b/llvm/test/Regression/Transforms/FunctionResolve/retmismatch1.ll index fe684d1235b4..adbce7304871 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/retmismatch1.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/retmismatch1.ll @@ -1,14 +1,6 @@ ; This shows where the function is called with the prototype indicating a ; return type exists, but it really doesn't. -; RUN: if as < %s | opt -funcresolve > /dev/null -; RUN: then echo "opt ok" -; RUN: else exit 1 # Make sure opt doesn't abort! -; RUN: fi -; -; RUN: if as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | grep call -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call declare int %foo(...) diff --git a/llvm/test/Regression/Transforms/FunctionResolve/retmismatch2.ll b/llvm/test/Regression/Transforms/FunctionResolve/retmismatch2.ll index cffe1a4c9e7d..36a062eb28b0 100644 --- a/llvm/test/Regression/Transforms/FunctionResolve/retmismatch2.ll +++ b/llvm/test/Regression/Transforms/FunctionResolve/retmismatch2.ll @@ -1,15 +1,7 @@ ; This shows where the function is called with the prototype indicating a ; return type doesn't exists, but it really does. ; -; RUN: if as < %s | opt -funcresolve > /dev/null -; RUN: then echo "opt ok" -; RUN: else exit 1 # Make sure opt doesn't abort! -; RUN: fi -; -; RUN: if as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | grep call -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call declare void %foo(...) diff --git a/llvm/test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll b/llvm/test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll index 22296e344e73..57ac53817295 100644 --- a/llvm/test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll +++ b/llvm/test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll @@ -1,10 +1,7 @@ ; This entire chain of computation should be optimized away, but ; wasn't because the two multiplies were not detected as being identical. ; -; RUN: if as < %s | opt -gcse -instcombine -dce | dis | grep sub -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -gcse -instcombine -dce | dis | not grep sub implementation ; Functions: diff --git a/llvm/test/Regression/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll b/llvm/test/Regression/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll index 77a087a591c5..fa83e2d5de9f 100644 --- a/llvm/test/Regression/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll +++ b/llvm/test/Regression/Transforms/GCSE/2003-06-13-LoadStoreEliminate.ll @@ -1,10 +1,7 @@ ; This testcase shows a bug where an common subexpression exists, but there ; is no shared dominator block that the expression can be hoisted out to. ; -; RUN: if as < %s | opt -load-vn -gcse | dis | grep load -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -load-vn -gcse | dis | not grep load int %test(int* %P) { store int 5, int* %P diff --git a/llvm/test/Regression/Transforms/GCSE/RLE-Eliminate.ll b/llvm/test/Regression/Transforms/GCSE/RLE-Eliminate.ll index 3abfc19b8534..fb79cfa7fd71 100644 --- a/llvm/test/Regression/Transforms/GCSE/RLE-Eliminate.ll +++ b/llvm/test/Regression/Transforms/GCSE/RLE-Eliminate.ll @@ -1,10 +1,7 @@ ; This testcase ensures that redundant loads are eliminated when they should ; be. All RL variables (redundant loads) should be eliminated. ; -; RUN: if as < %s | opt -load-vn -gcse | dis | grep %RL -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -load-vn -gcse | dis | not grep %RL ; int "test1"(int* %P) { %A = load int* %P diff --git a/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll b/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll index 57ed72a93dcd..a923eb344122 100644 --- a/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll +++ b/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll @@ -1,10 +1,7 @@ ; Make sure that functions are removed successfully if they are referred to by ; a global that is dead. Make sure any globals they refer to die as well. -; RUN: if as < %s | opt -globaldce | dis | grep foo -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -globaldce | dis | not grep foo %b = internal global int ()* %foo ;; Unused, kills %foo diff --git a/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll b/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll index b969424cb114..039d597b8c29 100644 --- a/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll +++ b/llvm/test/Regression/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll @@ -1,10 +1,7 @@ ; This testcase tests that a worklist is being used, and that globals can be ; removed if they are the subject of a constexpr and ConstantPointerRef -; RUN: if as < %s | opt -globaldce | dis | grep global -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -globaldce | dis | not grep global %t0 = internal global [4 x sbyte] c"foo\00" %t1 = internal global [4 x sbyte] c"bar\00" diff --git a/llvm/test/Regression/Transforms/GlobalDCE/basicvariabletest.ll b/llvm/test/Regression/Transforms/GlobalDCE/basicvariabletest.ll index a3d65c79f4b3..1f5c61b66efe 100644 --- a/llvm/test/Regression/Transforms/GlobalDCE/basicvariabletest.ll +++ b/llvm/test/Regression/Transforms/GlobalDCE/basicvariabletest.ll @@ -1,8 +1,4 @@ -; RUN: if as < %s | opt -globaldce | dis | grep global -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi - +; RUN: as < %s | opt -globaldce | dis | not grep global %X = uninitialized global int %Y = internal global int 7 diff --git a/llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll b/llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll index cf3e022ab13e..d7290e6090c6 100644 --- a/llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll +++ b/llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll @@ -3,10 +3,7 @@ ; happens because preheader insertion doesn't insert a preheader for this ; case... bad. -; RUN: if as < %s | opt -licm -adce -simplifycfg | dis | grep 'br ' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -licm -adce -simplifycfg | dis | not grep 'br ' int %main(int %argc) { br label %bb5 diff --git a/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll b/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll index 61145387815f..f89515094921 100644 --- a/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll +++ b/llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll @@ -1,8 +1,5 @@ ; Promoting some values allows promotion of other values. -; RUN: if as < %s | opt -mem2reg | dis | grep alloca -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -mem2reg | dis | not grep alloca int %test2() { %result = alloca int ; ty=int* diff --git a/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll b/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll index 782deaafc43c..e1069a41b97d 100644 --- a/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll +++ b/llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll @@ -2,10 +2,7 @@ ; generated code should perform the appropriate masking operations required ; depending on the endianness of the target... -; RUN: if as < %s | opt -mem2reg | dis | grep 'alloca' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca' implementation diff --git a/llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll b/llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll index aacf5bf1f5a9..ea30cdb5b8f3 100644 --- a/llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll +++ b/llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll @@ -1,8 +1,5 @@ ; Simple sanity check testcase. Both alloca's should be eliminated. -; RUN: if as < %s | opt -mem2reg | dis | grep 'alloca' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca' implementation diff --git a/llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll b/llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll index 2c103b995ab4..a08a968ea4bb 100644 --- a/llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll +++ b/llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -pinodes -instcombine -die | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -pinodes -instcombine -die | dis | not grep add int "test"(int %i, int %j) { %c = seteq int %i, 0 diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll index 8646ae3cabcb..94785f318fab 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll @@ -1,9 +1,6 @@ -; RUN: if as < %s | opt -reassociate -instcombine -constprop -dce | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -instcombine -constprop -dce | dis | not grep add -int "test"(int %A) { +int %test(int %A) { %X = add int %A, 1 %Y = add int %A, 1 %r = sub int %X, %Y diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll index 1d08a1054e26..4f36c96b364d 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll @@ -1,9 +1,6 @@ -; RUN: if as < %s | opt -reassociate -instcombine -constprop -die | dis | grep 5 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -instcombine -constprop -die | dis | not grep 5 -int "test"(int %A, int %B) { +int %test(int %A, int %B) { %W = add int %B, -5 %Y = add int %A, 5 %Z = add int %W, %Y diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll index 7df7bafb2562..2136e094253e 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll @@ -1,11 +1,8 @@ ; With sub reassociation, constant folding can eliminate all of the constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -dce | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -dce | dis | not grep add -int "test"(int %A, int %B) { +int %test(int %A, int %B) { %W = add int 5, %B %X = add int -7, %A %Y = sub int %X, %W diff --git a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll index aa0066a1ff37..05f9bd4ae6ae 100644 --- a/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll +++ b/llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll @@ -1,9 +1,6 @@ ; With sub reassociation, constant folding can eliminate the two 12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -dce | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -dce | dis | not grep 12 int "test"(int %A, int %B, int %C, int %D) { %M = add int %A, 12 diff --git a/llvm/test/Regression/Transforms/Reassociate/basictest.ll b/llvm/test/Regression/Transforms/Reassociate/basictest.ll index ac5932053fd3..cad7a5aafda6 100644 --- a/llvm/test/Regression/Transforms/Reassociate/basictest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/basictest.ll @@ -1,11 +1,8 @@ ; With reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep add -int "test"(int %arg) { +int %test(int %arg) { %tmp1 = sub int -12, %arg %tmp2 = add int %tmp1, 12 ret int %tmp2 diff --git a/llvm/test/Regression/Transforms/Reassociate/basictest2.ll b/llvm/test/Regression/Transforms/Reassociate/basictest2.ll index 192b8d3d086c..31c3be0a8784 100644 --- a/llvm/test/Regression/Transforms/Reassociate/basictest2.ll +++ b/llvm/test/Regression/Transforms/Reassociate/basictest2.ll @@ -1,9 +1,6 @@ ; With reassociation, constant folding can eliminate the +/- 30 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 30 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 30 int "test"(int %reg109, int %reg1111) { %reg115 = add int %reg109, -30 ; [#uses=1] diff --git a/llvm/test/Regression/Transforms/Reassociate/looptest.ll b/llvm/test/Regression/Transforms/Reassociate/looptest.ll index a05e64a04d93..06dea0bbbb75 100644 --- a/llvm/test/Regression/Transforms/Reassociate/looptest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/looptest.ll @@ -12,10 +12,7 @@ ; In this case, we want to reassociate the specified expr so that i+j can be ; hoisted out of the inner most loop. ; -; RUN: if as < %s | opt -reassociate | dis | grep 115 | grep 117 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate | dis | grep 115 | not grep 117 %.LC0 = internal global [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1] diff --git a/llvm/test/Regression/Transforms/Reassociate/otherops.ll b/llvm/test/Regression/Transforms/Reassociate/otherops.ll index 7182e1f72ace..6960b1df9913 100644 --- a/llvm/test/Regression/Transforms/Reassociate/otherops.ll +++ b/llvm/test/Regression/Transforms/Reassociate/otherops.ll @@ -1,9 +1,6 @@ ; Reassociation should apply to Add, Mul, And, Or, & Xor ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 int "test_mul"(int %arg) { %tmp1 = mul int 12, %arg diff --git a/llvm/test/Regression/Transforms/Reassociate/subtest.ll b/llvm/test/Regression/Transforms/Reassociate/subtest.ll index e3a7adf5aed7..38a887b56625 100644 --- a/llvm/test/Regression/Transforms/Reassociate/subtest.ll +++ b/llvm/test/Regression/Transforms/Reassociate/subtest.ll @@ -1,9 +1,6 @@ ; With sub reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: if as < %s | opt -reassociate -constprop -instcombine -die | dis | grep 12 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 int "test"(int %A, int %B) { %X = add int -12, %A diff --git a/llvm/test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll b/llvm/test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll index 341847bc13ae..be8bbfda67fe 100644 --- a/llvm/test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll +++ b/llvm/test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll @@ -5,13 +5,9 @@ ; real benchmark (mst from Olden benchmark, MakeGraph function). When SCCP is ; fixed, this should be eliminated by a single SCCP application. ; -; RUN: if as < %s | opt -sccp | dis | grep loop -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp | dis | not grep loop -int *"test"() -begin +int* %test() { bb1: %A = malloc int br label %bb2 @@ -24,5 +20,4 @@ bb2: bb3: ret int * %A -end - +} diff --git a/llvm/test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll b/llvm/test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll index 8029456af707..101ced7a6516 100644 --- a/llvm/test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll +++ b/llvm/test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll @@ -1,12 +1,7 @@ -; RUN: if as < %s | opt -sccp | dis | grep sub -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp | dis | not grep sub -void "test3"(int, int) -begin +void %test3(int, int) { add int 0, 0 sub int 0, 4 ret void -end - +} diff --git a/llvm/test/Regression/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll b/llvm/test/Regression/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll index c3c5d70a721b..a957a905db84 100644 --- a/llvm/test/Regression/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll +++ b/llvm/test/Regression/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -sccp | dis | grep '%X' -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp | dis | not grep '%X' %G = uninitialized global [40x int] diff --git a/llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll b/llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll index e91c643cc01a..85ea1a7f6009 100644 --- a/llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll +++ b/llvm/test/Regression/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -sccp -simplifycfg | dis | grep then: -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp -simplifycfg | dis | not grep then: void %cprop_test11(int* %data.1) { entry: ; No predecessors! diff --git a/llvm/test/Regression/Transforms/SCCP/basictest.ll b/llvm/test/Regression/Transforms/SCCP/basictest.ll index 239f375e0529..2ed9d5e47927 100644 --- a/llvm/test/Regression/Transforms/SCCP/basictest.ll +++ b/llvm/test/Regression/Transforms/SCCP/basictest.ll @@ -1,13 +1,9 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: if as < %s | opt -sccp | dis | grep add -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp | dis | not grep add -int "test"(bool %B) -begin +int %test(bool %B) { br bool %B, label %BB1, label %BB2 BB1: %Val = add int 0, 0 @@ -17,4 +13,4 @@ BB2: BB3: %Ret = phi int [%Val, %BB1], [1, %BB2] ret int %Ret -end +} diff --git a/llvm/test/Regression/Transforms/SCCP/sccptest.ll b/llvm/test/Regression/Transforms/SCCP/sccptest.ll index 20361f7d71d0..37f4bc264ab6 100644 --- a/llvm/test/Regression/Transforms/SCCP/sccptest.ll +++ b/llvm/test/Regression/Transforms/SCCP/sccptest.ll @@ -1,13 +1,9 @@ ; 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: if as < %s | opt -sccp -constprop -dce -cfgsimplify | dis | grep BB3 -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -sccp -constprop -dce -cfgsimplify | dis | not grep BB3 -int "test function"(int %i0, int %j0) -begin +int %test function(int %i0, int %j0) { BB1: br label %BB2 BB2: @@ -35,5 +31,4 @@ BB7: %j4 = phi int [1, %BB5], [%k2, %BB6] %k4 = phi int [%k3, %BB5], [%k5, %BB6] br label %BB2 -end - +} diff --git a/llvm/test/Regression/Transforms/ScalarRepl/arraytest.ll b/llvm/test/Regression/Transforms/ScalarRepl/arraytest.ll index a6474070e31d..076659b39f2d 100644 --- a/llvm/test/Regression/Transforms/ScalarRepl/arraytest.ll +++ b/llvm/test/Regression/Transforms/ScalarRepl/arraytest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -scalarrepl -mem2reg | dis | grep alloca -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -scalarrepl -mem2reg | dis | not grep alloca int %test() { %X = alloca [ 4 x int ] diff --git a/llvm/test/Regression/Transforms/ScalarRepl/basictest.ll b/llvm/test/Regression/Transforms/ScalarRepl/basictest.ll index 0582a34c6922..a576fd63624e 100644 --- a/llvm/test/Regression/Transforms/ScalarRepl/basictest.ll +++ b/llvm/test/Regression/Transforms/ScalarRepl/basictest.ll @@ -1,7 +1,4 @@ -; RUN: if as < %s | opt -scalarrepl -mem2reg | dis | grep alloca -; RUN: then exit 1 -; RUN: else exit 0 -; RUN: fi +; RUN: as < %s | opt -scalarrepl -mem2reg | dis | not grep alloca int %test() { %X = alloca { int, float }