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
diff --git a/test/CodeGen/Alpha/ctpop.ll b/test/CodeGen/Alpha/ctpop.ll
index fa84cb7..6405224 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 6a55db8..a285dae 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 2bb4233..0f5688d 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 839e88c..87f6005 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 e81f776..b1d9fcb 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 3ab92d1..e512047 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 8dbff53..74233eb 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 e87221d..f5d5ec2 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 c9e4b06..b7f08cf 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 8897692..fd35f9f 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 43d6851..bdef507 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 05114d1..cadba5b 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 354dcc6..4eef68d 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 0cdade2..2960c6b 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 a91cbbc..3108fba 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 667fc2f..bf53825 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 ccd1911..34a97c4 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]