FileCheck-ify some grep tests
authorReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 22:11:46 +0000 (22:11 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 22:11:46 +0000 (22:11 +0000)
These tests in particular try to use escaped square brackets as an
argument to grep, which is failing for me with native win32 python.  It
appears the backslash is being lost near the CreateProcess*() call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173506 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Thumb2/thumb2-ldr_post.ll
test/TableGen/Slice.td
test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll

index 2178eecb43e45dcbebe587a886881398c13af94c..bce847471beb2b43fb966705e09e80f6e11cade5 100644 (file)
@@ -1,5 +1,4 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep "ldr.*\[.*\]," | count 1
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
 
 define i32 @test(i32 %a, i32 %b, i32 %c) {
         %tmp1 = mul i32 %a, %b          ; <i32> [#uses=2]
@@ -9,4 +8,5 @@ define i32 @test(i32 %a, i32 %b, i32 %c) {
         %tmp5 = mul i32 %tmp4, %tmp3            ; <i32> [#uses=1]
         ret i32 %tmp5
 }
+; CHECK:       ldr     r{{.*}},        [{{.*}}],
 
index cec9fb65ca8a2c2159ecc9b6adc5a59a958d43c5..7a35d315c5d859ebb8d5bc08b0c63e9ac161eabb 100644 (file)
@@ -1,5 +1,4 @@
-// RUN: llvm-tblgen %s | grep "\[(set" | count 2
-// RUN: llvm-tblgen %s | grep "\[\]" | count 2
+// RUN: llvm-tblgen %s | FileCheck %s
 
 class ValueType<int size, int value> {
   int Size = size;
@@ -85,3 +84,8 @@ multiclass myscalar<bits<8> opcode, string asmstr = "", list<list<dag>> patterns
   vscalar<opcode, asmstr, patterns>;
 
 defm NOT : myscalar<0x10, "not", [[], [(set FR32:$dst, (f32 (not FR32:$src)))]]>;
+
+// CHECK: Pattern = [(set FR32:$dst, (f32 (not FR32:$src)))];
+// CHECK: Pattern = [];
+// CHECK: Pattern = [(set FR32:$dst, (f32 (not FR32:$src)))];
+// CHECK: Pattern = [];
index 0b5e4152c423b20f2c8cdfaf629cb300e049f8d8..3f28cb187f867a7ef91f3f284d8f022c4217965c 100644 (file)
@@ -1,7 +1,6 @@
 ; Scalar replacement was incorrectly promoting this alloca!!
 ;
-; RUN: opt < %s -scalarrepl -S | \
-; RUN:   sed "s/;.*//g" | grep "\["
+; RUN: opt < %s -scalarrepl -S | FileCheck %s
 
 define i8* @test() {
        %A = alloca [30 x i8]           ; <[30 x i8]*> [#uses=1]
@@ -10,4 +9,4 @@ define i8* @test() {
        store i8 0, i8* %B
        ret i8* %C
 }
-
+; CHECK: alloca [