From 43b40035baca3c0a66d3af538f8d5347fb4ceea6 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 16 Apr 2007 15:31:49 +0000 Subject: [PATCH] For PR1319: Fix syntax of tests to ensure grep pattern is properly quoted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36134 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll | 2 +- test/Assembler/2002-07-25-ParserAssertionFailure.llx | 2 +- test/Assembler/2003-04-15-ConstantInitAssertion.llx | 2 +- test/Assembler/2003-12-30-TypeMapInvalidMemory.llx | 2 +- test/Assembler/ConstantExprFold.llx | 3 +-- test/C++Frontend/2005-01-03-StaticInitializers.cpp | 2 +- test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp | 3 +-- test/CFrontend/2003-11-19-AddressOfRegister.c.tr | 2 +- test/CFrontend/2005-05-06-CountBuiltins.c | 2 +- test/CodeGen/Alpha/ctpop.ll | 2 +- test/CodeGen/CBackend/2004-12-03-ExternStatics.ll | 2 +- test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll | 4 ++-- test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll | 2 +- test/CodeGen/PowerPC/and-imm.ll | 2 +- test/CodeGen/PowerPC/small-arguments.ll | 3 +-- test/CodeGen/X86/2005-01-17-CycleInDAG.ll | 2 +- test/CodeGen/X86/2005-12-03-IndirectTailCall.ll | 2 +- test/CodeGen/X86/2006-03-01-InstrSchedBug.ll | 2 +- test/CodeGen/X86/2006-05-08-InstrSched.ll | 3 ++- test/CodeGen/X86/2007-01-13-StackPtrIndex.ll | 4 ++-- test/CodeGen/X86/2007-02-04-OrAddrMode.ll | 2 +- test/CodeGen/X86/overlap-add.ll | 2 +- test/CodeGen/X86/setuge.ll | 2 +- test/CodeGen/X86/shift-one.ll | 2 +- test/CodeGen/X86/trunc-to-bool.ll | 3 +-- test/CodeGen/X86/vec_shuffle-10.ll | 10 ++++++---- test/TableGen/DagDefSubst.ll | 4 ++-- test/TableGen/DagIntSubst.ll | 2 +- test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll | 3 ++- test/Transforms/ConstProp/logicaltest.ll | 3 ++- .../IndVarsSimplify/2003-12-10-IndVarDeadCode.ll | 3 ++- .../LoopStrengthReduce/invariant_value_first.ll | 3 ++- .../LoopStrengthReduce/invariant_value_first_arg.ll | 3 ++- test/Transforms/LoopStrengthReduce/variable_stride.ll | 2 +- test/Transforms/Mem2Reg/PromoteMemToRegister.ll | 2 +- test/Transforms/Reassociate/inverses.ll | 3 ++- test/Transforms/SimplifyLibCalls/FFS.ll | 3 ++- test/Transforms/SimplifyLibCalls/FPrintF.ll | 3 ++- test/Transforms/SimplifyLibCalls/MemCpy.ll | 4 ++-- test/Transforms/SimplifyLibCalls/MemMove.ll | 4 ++-- test/Transforms/SimplifyLibCalls/Printf.ll | 5 +++-- test/Transforms/SimplifyLibCalls/Puts.ll | 3 ++- test/Transforms/SimplifyLibCalls/SPrintF.ll | 4 ++-- test/Transforms/SimplifyLibCalls/StrCat.ll | 3 ++- test/Transforms/SimplifyLibCalls/StrChr.ll | 3 ++- test/Transforms/SimplifyLibCalls/StrCmp.ll | 3 ++- test/Transforms/SimplifyLibCalls/StrCpy.ll | 3 ++- test/Transforms/SimplifyLibCalls/StrLen.ll | 2 +- test/Transforms/SimplifyLibCalls/StrNCmp.ll | 3 ++- test/Transforms/SimplifyLibCalls/ToAscii.ll | 3 ++- test/Transforms/SimplifyLibCalls/memcmp.ll | 3 ++- 51 files changed, 81 insertions(+), 65 deletions(-) diff --git a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll index d7ae66ee9f5..f29e9a0e8bb 100644 --- a/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll +++ b/test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | \ -; RUN: opt -aa-eval -disable-output |& grep '2 no alias respon' +; RUN: opt -aa-eval -disable-output |& grep {2 no alias respon} ;; TEST that A[1][0] may alias A[0][i]. diff --git a/test/Assembler/2002-07-25-ParserAssertionFailure.llx b/test/Assembler/2002-07-25-ParserAssertionFailure.llx index 214538384ff..ccfc380b75b 100644 --- a/test/Assembler/2002-07-25-ParserAssertionFailure.llx +++ b/test/Assembler/2002-07-25-ParserAssertionFailure.llx @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: llvm-as < %s -o /dev/null -f |& grep 'No arguments' +; RUN: llvm-as < %s -o /dev/null -f |& grep {No arguments} %ty = type void (i32) diff --git a/test/Assembler/2003-04-15-ConstantInitAssertion.llx b/test/Assembler/2003-04-15-ConstantInitAssertion.llx index b2c6f8a5f47..58b8bcaca14 100644 --- a/test/Assembler/2003-04-15-ConstantInitAssertion.llx +++ b/test/Assembler/2003-04-15-ConstantInitAssertion.llx @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s >/dev/null |& grep "Expected type 'i32' for element #0" +; RUN: llvm-as < %s >/dev/null |& grep {Expected type 'i32' for element #0} ; Test the case of a misformed constant initializer ; This should cause an assembler error, not an assertion failure! constant { i32 } { float 1.0 } diff --git a/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx b/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx index 2cf1e56a361..cffee6dda38 100644 --- a/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx +++ b/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f |& grep 'Undefined type remains' +; RUN: llvm-as < %s -o /dev/null -f |& grep {Undefined type remains} ; END. @d_reduction_0_dparser_gram = global { diff --git a/test/Assembler/ConstantExprFold.llx b/test/Assembler/ConstantExprFold.llx index c9c3dff9459..b4d779d7946 100644 --- a/test/Assembler/ConstantExprFold.llx +++ b/test/Assembler/ConstantExprFold.llx @@ -1,8 +1,7 @@ ; This test checks to make sure that constant exprs fold in some simple ; situations -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep '(' && -; RUN: llvm-upgrade < %s | llvm-as +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep {(} %A = global long 0 diff --git a/test/C++Frontend/2005-01-03-StaticInitializers.cpp b/test/C++Frontend/2005-01-03-StaticInitializers.cpp index 27da715c147..0791d9fd83f 100644 --- a/test/C++Frontend/2005-01-03-StaticInitializers.cpp +++ b/test/C++Frontend/2005-01-03-StaticInitializers.cpp @@ -1,4 +1,4 @@ -// RUN: %llvmgxx %s -S -o - | not grep 'llvm.global_ctor' +// RUN: %llvmgxx %s -S -o - | not grep llvm.global_ctor struct S { int A[2]; diff --git a/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp b/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp index b1fb0dbd6b1..654e11be1ff 100644 --- a/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp +++ b/test/C++Frontend/2007-01-06-ELF-Thunk-Sections.cpp @@ -1,5 +1,4 @@ -// RUN: %llvmgxx %s -emit-llvm -S -o - && -// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'gnu.linkonce.' +// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep gnu.linkonce. // PR1085 class diff --git a/test/CFrontend/2003-11-19-AddressOfRegister.c.tr b/test/CFrontend/2003-11-19-AddressOfRegister.c.tr index 30cac7ba8e9..69dc54d9289 100644 --- a/test/CFrontend/2003-11-19-AddressOfRegister.c.tr +++ b/test/CFrontend/2003-11-19-AddressOfRegister.c.tr @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep 'warning' +// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep warning struct item { short delta[4]; diff --git a/test/CFrontend/2005-05-06-CountBuiltins.c b/test/CFrontend/2005-05-06-CountBuiltins.c index cfc691a670b..da40a142ae9 100644 --- a/test/CFrontend/2005-05-06-CountBuiltins.c +++ b/test/CFrontend/2005-05-06-CountBuiltins.c @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep 'call.*__builtin' +// RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | not grep call.*__builtin int G, H, I; void foo(int P) { diff --git a/test/CodeGen/Alpha/ctpop.ll b/test/CodeGen/Alpha/ctpop.ll index fa84cb706b9..6405224117b 100644 --- a/test/CodeGen/Alpha/ctpop.ll +++ b/test/CodeGen/Alpha/ctpop.ll @@ -7,7 +7,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | \ ; RUN: not grep -i ctpop ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | \ -; RUN: not grep -i 'ctpop' +; RUN: not grep -i ctpop ; XFAIL: * declare long %llvm.ctpop.i64(long) diff --git a/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll b/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll index 6a55db8617c..a285daeab22 100644 --- a/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll +++ b/test/CodeGen/CBackend/2004-12-03-ExternStatics.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep 'extern.*msg' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep extern.*msg ; This is PR472 diff --git a/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll b/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll index 2bb4233bb95..0f5688db372 100644 --- a/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll +++ b/test/CodeGen/Generic/2007-04-14-BitTestsBadMask.ll @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 | grep '8388635' && -; RUN: llvm-as < %s | llc -march=x86-64 | grep '4294981120' +; RUN: llvm-as < %s | llc -march=x86 | grep 8388635 && +; RUN: llvm-as < %s | llc -march=x86-64 | grep 4294981120 ; PR 1325 ; FIXME: this is xfailed until we figure out ppc bootstrap diff --git a/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll b/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll index 839e88c51ef..87f6005a364 100644 --- a/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll +++ b/test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll @@ -1,3 +1,3 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep '.comm.*X,0' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep .comm.*X,0 %X = linkonce global {} {} diff --git a/test/CodeGen/PowerPC/and-imm.ll b/test/CodeGen/PowerPC/and-imm.ll index e81f7768a60..b1d9fcbba16 100644 --- a/test/CodeGen/PowerPC/and-imm.ll +++ b/test/CodeGen/PowerPC/and-imm.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'ori\|lis' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep {ori\\|lis} int %test(int %X) { %Y = and int %X, 32769 ; andi. r3, r3, 32769 diff --git a/test/CodeGen/PowerPC/small-arguments.ll b/test/CodeGen/PowerPC/small-arguments.ll index 3ab92d1187b..e5120473a2f 100644 --- a/test/CodeGen/PowerPC/small-arguments.ll +++ b/test/CodeGen/PowerPC/small-arguments.ll @@ -1,5 +1,4 @@ -; RUN: llvm-as < %s | llc -march=ppc32 && -; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'extsh\|rlwinm' +; RUN: llvm-as < %s | llc -march=ppc32 | not grep {extsh\\|rlwinm} declare i16 @foo() sext diff --git a/test/CodeGen/X86/2005-01-17-CycleInDAG.ll b/test/CodeGen/X86/2005-01-17-CycleInDAG.ll index 8dbff537f59..74233ebda05 100644 --- a/test/CodeGen/X86/2005-01-17-CycleInDAG.ll +++ b/test/CodeGen/X86/2005-01-17-CycleInDAG.ll @@ -3,7 +3,7 @@ ; is invalid code (there is no correct way to order the instruction). Check ; that we do not fold the load into the sub. -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'sub.*GLOBAL' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep sub.*GLOBAL %GLOBAL = external global int diff --git a/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll b/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll index e87221decf5..f5d5ec2e615 100644 --- a/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll +++ b/test/CodeGen/X86/2005-12-03-IndirectTailCall.ll @@ -1,5 +1,5 @@ ; XFAIL: * -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'jmp \*ecx' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {jmp \\*ecx} declare int %putchar(int) int %main(){ diff --git a/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll b/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll index c9e4b0675e1..b7f08cfc9ce 100644 --- a/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll +++ b/test/CodeGen/X86/2006-03-01-InstrSchedBug.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'subl.*%esp' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep {subl.*%esp} int %f(int %a, int %b) { %tmp.2 = mul int %a, %a diff --git a/test/CodeGen/X86/2006-05-08-InstrSched.ll b/test/CodeGen/X86/2006-05-08-InstrSched.ll index 8897692be21..fd35f9f5cce 100644 --- a/test/CodeGen/X86/2006-05-08-InstrSched.ll +++ b/test/CodeGen/X86/2006-05-08-InstrSched.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | not grep 'subl.*%esp' +; RUN: llvm-upgrade < %s | llvm-as | \ +; RUN: llc -march=x86 -relocation-model=static | not grep {subl.*%esp} %A = external global ushort* %B = external global uint diff --git a/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll b/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll index 43d685188ec..bdef507f93c 100644 --- a/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll +++ b/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | grep leaq && -; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | not grep ',%rsp)' +; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | grep leaq +; RUN: llvm-as < %s | llc -march=x86-64 -sched=none | not grep {,%rsp)} ; PR1103 target datalayout = "e-p:64:64" diff --git a/test/CodeGen/X86/2007-02-04-OrAddrMode.ll b/test/CodeGen/X86/2007-02-04-OrAddrMode.ll index 05114d1bff6..cadba5b0437 100644 --- a/test/CodeGen/X86/2007-02-04-OrAddrMode.ll +++ b/test/CodeGen/X86/2007-02-04-OrAddrMode.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -march=x86 | grep {orl \$1, %eax} -; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)' +; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)} ;; This example can't fold the or into an LEA. define i32 @test(float ** %tmp2, i32 %tmp12) { diff --git a/test/CodeGen/X86/overlap-add.ll b/test/CodeGen/X86/overlap-add.ll index 354dcc6fe6f..4eef68d3d54 100644 --- a/test/CodeGen/X86/overlap-add.ll +++ b/test/CodeGen/X86/overlap-add.ll @@ -7,7 +7,7 @@ ; Check that the shift gets turned into an LEA. ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \ -; RUN: not grep 'mov E.X, E.X' +; RUN: not grep {mov E.X, E.X} ; FIXME: We need live variable information about flags to do this xform safely. :( ; XFAIL: * diff --git a/test/CodeGen/X86/setuge.ll b/test/CodeGen/X86/setuge.ll index 0cdade2710d..2960c6b4d1e 100644 --- a/test/CodeGen/X86/setuge.ll +++ b/test/CodeGen/X86/setuge.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'set' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep set declare bool %llvm.isunordered.f32(float, float) diff --git a/test/CodeGen/X86/shift-one.ll b/test/CodeGen/X86/shift-one.ll index a91cbbc5030..3108fba0f4d 100644 --- a/test/CodeGen/X86/shift-one.ll +++ b/test/CodeGen/X86/shift-one.ll @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'leal' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep leal %x = external global int diff --git a/test/CodeGen/X86/trunc-to-bool.ll b/test/CodeGen/X86/trunc-to-bool.ll index 667fc2f3d3c..bf5382510c2 100644 --- a/test/CodeGen/X86/trunc-to-bool.ll +++ b/test/CodeGen/X86/trunc-to-bool.ll @@ -1,8 +1,7 @@ ; An integer truncation to i1 should be done with an and instruction to make ; sure only the LSBit survives. Test that this is the case both for a returned ; value and as the operand of a branch. -; RUN: llvm-as < %s | llc -march=x86 && -; RUN: llvm-as < %s | llc -march=x86 | grep '\(and\)\|\(test.*\$1\)' | \ +; RUN: llvm-as < %s | llc -march=x86 | grep {\\(and\\)\\|\\(test.*\\\$1\\)} | \ ; RUN: wc -l | grep 6 define i1 @test1(i32 %X) zext { diff --git a/test/CodeGen/X86/vec_shuffle-10.ll b/test/CodeGen/X86/vec_shuffle-10.ll index ccd19114174..34a97c4ffde 100644 --- a/test/CodeGen/X86/vec_shuffle-10.ll +++ b/test/CodeGen/X86/vec_shuffle-10.ll @@ -1,7 +1,9 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpcklps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep unpckhps | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | not grep 'sub.*esp' +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: grep unpcklps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: grep unpckhps | wc -l | grep 1 +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \ +; RUN: not grep {sub.*esp} void %test(<4 x float>* %res, <4 x float>* %A, <4 x float>* %B) { %tmp = load <4 x float>* %B ; <<4 x float>> [#uses=2] diff --git a/test/TableGen/DagDefSubst.ll b/test/TableGen/DagDefSubst.ll index a9cd59b9afb..e5eebe99e8c 100644 --- a/test/TableGen/DagDefSubst.ll +++ b/test/TableGen/DagDefSubst.ll @@ -1,5 +1,5 @@ -// RUN: tblgen %s | grep 'dag d = (X Y)' && -// RUN: tblgen %s | grep 'dag e = (Y X)' +// RUN: tblgen %s | grep {dag d = (X Y)} +// RUN: tblgen %s | grep {dag e = (Y X)} def X; class yclass; diff --git a/test/TableGen/DagIntSubst.ll b/test/TableGen/DagIntSubst.ll index b9522f1f57f..3c1291c3eca 100644 --- a/test/TableGen/DagIntSubst.ll +++ b/test/TableGen/DagIntSubst.ll @@ -1,4 +1,4 @@ -// RUN: tblgen %s | grep 'dag d = (X 13)' +// RUN: tblgen %s | grep {dag d = (X 13)} def X; class C { diff --git a/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll b/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll index 6b6b340097d..cf443469657 100644 --- a/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll +++ b/test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll @@ -1,6 +1,7 @@ ; SetCC on boolean values was not implemented! -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep 'set' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | \ +; RUN: not grep set bool "test1"() { %A = setle bool true, false diff --git a/test/Transforms/ConstProp/logicaltest.ll b/test/Transforms/ConstProp/logicaltest.ll index dfd45869b2a..ce311146d0a 100644 --- a/test/Transforms/ConstProp/logicaltest.ll +++ b/test/Transforms/ConstProp/logicaltest.ll @@ -1,6 +1,7 @@ ; Ensure constant propogation of logical instructions is working correctly. -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not egrep 'and|or|xor' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | \ +; RUN: not egrep {and|or|xor} int "test1"() { %R = and int 4,1234 ret int %R } diff --git a/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll b/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll index 743827df3f1..ba679892b6f 100644 --- a/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll +++ b/test/Transforms/IndVarsSimplify/2003-12-10-IndVarDeadCode.ll @@ -1,7 +1,8 @@ ; The induction variable canonicalization pass shouldn't leave dead ; instructions laying around! ; -; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | not grep '#uses=0' +; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | \ +; RUN: not grep {#uses=0} int %mul(int %x, int %y) { entry: diff --git a/test/Transforms/LoopStrengthReduce/invariant_value_first.ll b/test/Transforms/LoopStrengthReduce/invariant_value_first.ll index 5e05e755508..f2b75a2a13c 100644 --- a/test/Transforms/LoopStrengthReduce/invariant_value_first.ll +++ b/test/Transforms/LoopStrengthReduce/invariant_value_first.ll @@ -1,5 +1,6 @@ ; Check that the index of 'P[outer]' is pulled out of the loop. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | \ +; RUN: not grep {getelementptr.*%outer.*%INDVAR} declare bool %pred() declare int %foo() diff --git a/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll b/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll index 0289badddc4..6e9051278f4 100644 --- a/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll +++ b/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll @@ -1,5 +1,6 @@ ; Check that the index of 'P[outer]' is pulled out of the loop. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'getelementptr.*%outer.*%INDVAR' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | \ +; RUN: not grep {getelementptr.*%outer.*%INDVAR} declare bool %pred() diff --git a/test/Transforms/LoopStrengthReduce/variable_stride.ll b/test/Transforms/LoopStrengthReduce/variable_stride.ll index 83aeaa6a9c6..1af2a12df24 100644 --- a/test/Transforms/LoopStrengthReduce/variable_stride.ll +++ b/test/Transforms/LoopStrengthReduce/variable_stride.ll @@ -1,5 +1,5 @@ ; Check that variable strides are reduced to adds instead of multiplies. -; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep 'mul' +; RUN: llvm-upgrade < %s | llvm-as | opt -loop-reduce | llvm-dis | not grep mul declare bool %pred(int) diff --git a/test/Transforms/Mem2Reg/PromoteMemToRegister.ll b/test/Transforms/Mem2Reg/PromoteMemToRegister.ll index 49de1b6bcee..8bf7b51a39f 100644 --- a/test/Transforms/Mem2Reg/PromoteMemToRegister.ll +++ b/test/Transforms/Mem2Reg/PromoteMemToRegister.ll @@ -1,5 +1,5 @@ ; Simple sanity check testcase. Both alloca's should be eliminated. -; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep 'alloca' +; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep alloca implementation diff --git a/test/Transforms/Reassociate/inverses.ll b/test/Transforms/Reassociate/inverses.ll index eff3e6b34bf..e431328a481 100644 --- a/test/Transforms/Reassociate/inverses.ll +++ b/test/Transforms/Reassociate/inverses.ll @@ -1,4 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -dce | llvm-dis | not grep '\(and\|sub\)' +; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -dce | llvm-dis | \ +; RUN: not grep {\\(and\\|sub\\)} int %test1(int %a, int %b) { %tmp.2 = and int %b, %a diff --git a/test/Transforms/SimplifyLibCalls/FFS.ll b/test/Transforms/SimplifyLibCalls/FFS.ll index 335274ac45d..7049b5a377a 100644 --- a/test/Transforms/SimplifyLibCalls/FFS.ll +++ b/test/Transforms/SimplifyLibCalls/FFS.ll @@ -1,5 +1,6 @@ ; Test that the ToAsciiOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*%ffs} declare int %ffs(int) declare int %ffsl(int) diff --git a/test/Transforms/SimplifyLibCalls/FPrintF.ll b/test/Transforms/SimplifyLibCalls/FPrintF.ll index 040052708e4..53b751f1c1f 100644 --- a/test/Transforms/SimplifyLibCalls/FPrintF.ll +++ b/test/Transforms/SimplifyLibCalls/FPrintF.ll @@ -1,5 +1,6 @@ ; Test that the FPrintFOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fprintf' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*fprintf} ; %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] } diff --git a/test/Transforms/SimplifyLibCalls/MemCpy.ll b/test/Transforms/SimplifyLibCalls/MemCpy.ll index 6cc43733a1a..0a99488197b 100644 --- a/test/Transforms/SimplifyLibCalls/MemCpy.ll +++ b/test/Transforms/SimplifyLibCalls/MemCpy.ll @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memcpy.i32' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | \ +; RUN: llvm-dis | not grep {call.*llvm.memcpy.i32} declare void %llvm.memcpy.i32(sbyte*,sbyte*,uint,uint) %h = constant [2 x sbyte] c"h\00" diff --git a/test/Transforms/SimplifyLibCalls/MemMove.ll b/test/Transforms/SimplifyLibCalls/MemMove.ll index 3e6e8bd75b4..7c89d914a90 100644 --- a/test/Transforms/SimplifyLibCalls/MemMove.ll +++ b/test/Transforms/SimplifyLibCalls/MemMove.ll @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | llvm-dis | not grep 'call.*llvm.memmove.i32' +; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -simplify-libcalls | \ +; RUN: llvm-dis | not grep {call.*llvm.memmove.i32} declare void %llvm.memmove.i32(sbyte*,sbyte*,uint,uint) %h = constant [2 x sbyte] c"h\00" diff --git a/test/Transforms/SimplifyLibCalls/Printf.ll b/test/Transforms/SimplifyLibCalls/Printf.ll index 2a42e006ef9..c892f0341ab 100644 --- a/test/Transforms/SimplifyLibCalls/Printf.ll +++ b/test/Transforms/SimplifyLibCalls/Printf.ll @@ -1,5 +1,6 @@ -; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep putchar && -; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*printf' +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep putchar +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*printf} @str = internal constant [13 x i8] c"hello world\0A\00" ; <[13 x i8]*> [#uses=1] @str1 = internal constant [2 x i8] c"h\00" ; <[2 x i8]*> [#uses=1] diff --git a/test/Transforms/SimplifyLibCalls/Puts.ll b/test/Transforms/SimplifyLibCalls/Puts.ll index 4011a82fa9f..795b15cb654 100644 --- a/test/Transforms/SimplifyLibCalls/Puts.ll +++ b/test/Transforms/SimplifyLibCalls/Puts.ll @@ -1,5 +1,6 @@ ; Test that the PutsCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputs' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*fputs} ; %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] } %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int } diff --git a/test/Transforms/SimplifyLibCalls/SPrintF.ll b/test/Transforms/SimplifyLibCalls/SPrintF.ll index 48b76b194ec..a8ad3699e2a 100644 --- a/test/Transforms/SimplifyLibCalls/SPrintF.ll +++ b/test/Transforms/SimplifyLibCalls/SPrintF.ll @@ -1,6 +1,6 @@ ; Test that the SPrintFOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output && -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*sprintf' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*sprintf} declare int %sprintf(sbyte*,sbyte*,...) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/StrCat.ll b/test/Transforms/SimplifyLibCalls/StrCat.ll index 6532a637c19..06bc833e5c9 100644 --- a/test/Transforms/SimplifyLibCalls/StrCat.ll +++ b/test/Transforms/SimplifyLibCalls/StrCat.ll @@ -1,5 +1,6 @@ ; Test that the StrCatOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcat' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcat} declare sbyte* %strcat(sbyte*,sbyte*) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/StrChr.ll b/test/Transforms/SimplifyLibCalls/StrChr.ll index b8e0de27339..56e624810a7 100644 --- a/test/Transforms/SimplifyLibCalls/StrChr.ll +++ b/test/Transforms/SimplifyLibCalls/StrChr.ll @@ -1,5 +1,6 @@ ; Test that the StrChrOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*%strchr' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*%strchr} declare sbyte* %strchr(sbyte*,int) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/StrCmp.ll b/test/Transforms/SimplifyLibCalls/StrCmp.ll index 1ab075de46b..ba2a4e07298 100644 --- a/test/Transforms/SimplifyLibCalls/StrCmp.ll +++ b/test/Transforms/SimplifyLibCalls/StrCmp.ll @@ -1,5 +1,6 @@ ; Test that the StrCmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcmp' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcmp} declare int %strcmp(sbyte*,sbyte*) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/StrCpy.ll b/test/Transforms/SimplifyLibCalls/StrCpy.ll index f75238bad4a..481dccf24f2 100644 --- a/test/Transforms/SimplifyLibCalls/StrCpy.ll +++ b/test/Transforms/SimplifyLibCalls/StrCpy.ll @@ -1,5 +1,6 @@ ; Test that the StrCpyOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strcpy' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strcpy} declare sbyte* %strcpy(sbyte*,sbyte*) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/StrLen.ll b/test/Transforms/SimplifyLibCalls/StrLen.ll index d50b7c573f5..98a76c8862e 100644 --- a/test/Transforms/SimplifyLibCalls/StrLen.ll +++ b/test/Transforms/SimplifyLibCalls/StrLen.ll @@ -1,6 +1,6 @@ ; Test that the StrCatOptimizer works correctly ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ -; RUN: not grep 'call.*strlen' +; RUN: not grep {call.*strlen} target datalayout = "e-p:32:32" diff --git a/test/Transforms/SimplifyLibCalls/StrNCmp.ll b/test/Transforms/SimplifyLibCalls/StrNCmp.ll index 278861a9acd..7de3410fc53 100644 --- a/test/Transforms/SimplifyLibCalls/StrNCmp.ll +++ b/test/Transforms/SimplifyLibCalls/StrNCmp.ll @@ -1,5 +1,6 @@ ; Test that the StrNCmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*strncmp' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*strncmp} declare int %strncmp(sbyte*,sbyte*,int) declare int %puts(sbyte*) diff --git a/test/Transforms/SimplifyLibCalls/ToAscii.ll b/test/Transforms/SimplifyLibCalls/ToAscii.ll index e9580c62541..0bc2664d429 100644 --- a/test/Transforms/SimplifyLibCalls/ToAscii.ll +++ b/test/Transforms/SimplifyLibCalls/ToAscii.ll @@ -1,5 +1,6 @@ ; Test that the ToAsciiOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii' +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*toascii} declare int %toascii(int) diff --git a/test/Transforms/SimplifyLibCalls/memcmp.ll b/test/Transforms/SimplifyLibCalls/memcmp.ll index 3ccf00265ac..bea9eed74a5 100644 --- a/test/Transforms/SimplifyLibCalls/memcmp.ll +++ b/test/Transforms/SimplifyLibCalls/memcmp.ll @@ -1,5 +1,6 @@ ; Test that the memcmpOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*memcmp' && +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: not grep {call.*memcmp} ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls -disable-output declare int %memcmp(sbyte*,sbyte*,int) -- 2.34.1