Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
authorEli Bendersky <eliben@google.com>
Wed, 10 Apr 2013 23:30:20 +0000 (23:30 +0000)
committerEli Bendersky <eliben@google.com>
Wed, 10 Apr 2013 23:30:20 +0000 (23:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179241 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
test/CodeGen/X86/fast-cc-merge-stack-adj.ll
test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll
test/CodeGen/X86/fast-isel-constpool.ll
test/CodeGen/X86/fast-isel-fneg.ll
test/CodeGen/X86/fast-isel-gv.ll
test/CodeGen/X86/fast-isel-tailcall.ll
test/CodeGen/X86/fastcc-2.ll
test/CodeGen/X86/fastcc-byval.ll
test/CodeGen/X86/fastcc-sret.ll
test/CodeGen/X86/fastcc3struct.ll

index b22a391ef3585957b974b2062dc6497c09ae2321..b5679e665696c8cb4a97e00e91e01fc2afb152b5 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc -fast-isel -march=x86 < %s | grep %fs:
+; RUN: llc -fast-isel -march=x86 < %s | FileCheck %s
+; CHECK: %fs:
 
 define i32 @test1(i32 addrspace(257)* %arg) nounwind {
        %tmp = load i32 addrspace(257)* %arg
index d591f9408b140c38ee0ea065ec8f06afbafd8ac4..5121ed13228df21f5db0c5698229e6567e7f5b68 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mcpu=generic -march=x86 -x86-asm-syntax=intel | \
-; RUN:   grep "add     ESP, 8"
+; RUN: llc < %s -mcpu=generic -march=x86 -x86-asm-syntax=intel | FileCheck %s
+; CHECK: add ESP, 8
 
 target triple = "i686-pc-linux-gnu"
 
index 9233d3f7c1a039ed59b7ff8697594037c26d1951..21fae4a8205159efda30cabfcd420d2a91c6a128 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc -O0 -relocation-model=pic < %s | not grep call
+; RUN: llc -O0 -relocation-model=pic < %s | FileCheck %s
+; CHECK-NOT: call
 ; rdar://8396318
 
 ; Don't emit a PIC base register if no addresses are needed.
index b3adb802a8c57172a7d8979e1dbc820e9779c0d7..bbbaeb23391955d0a6d1d2a4b296e19504147a6f 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -fast-isel | grep "LCPI0_0(%rip)"
+; RUN: llc < %s -fast-isel | FileCheck %s
+; CHECK: LCPI0_0(%rip)
+
 ; Make sure fast isel uses rip-relative addressing when required.
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 target triple = "x86_64-apple-darwin9.0"
index f42a4a245bc880efbed0b38bd92e7186b9ddff1c..bd96ab95efec5185f6383270d6dce71b76b4fc91 100644 (file)
@@ -1,5 +1,8 @@
 ; RUN: llc < %s -fast-isel -fast-isel-abort -mtriple=x86_64-apple-darwin10 | FileCheck %s
-; RUN: llc < %s -fast-isel -march=x86 -mattr=+sse2 | grep xor | count 2
+; RUN: llc < %s -fast-isel -march=x86 -mattr=+sse2 | FileCheck --check-prefix=SSE2 %s
+
+; SSE2: xor
+; SSE2: xor
 
 ; CHECK: doo:
 ; CHECK: xor
index cb2464e746b17a6b40da1413570603884c83af21..de7509568907e29efafe37e57ab8ee46d1e30ab2 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -fast-isel | grep "_kill@GOTPCREL(%rip)"
+; RUN: llc < %s -fast-isel | FileCheck %s
+; CHECK: _kill@GOTPCREL(%rip)
+
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
 target triple = "x86_64-apple-darwin10.0"
 @f = global i8 (...)* @kill            ; <i8 (...)**> [#uses=1]
index c3e527c4e5b484d16627e683be74c6769e607481..79ff79d4bca53bb7d50e6a8de8b9ab4a3a68d828 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc < %s -fast-isel -tailcallopt -march=x86 | not grep add
+; RUN: llc < %s -fast-isel -tailcallopt -march=x86 | FileCheck %s
+; CHECK-NOT: add
 ; PR4154
 
 ; On x86, -tailcallopt changes the ABI so the caller shouldn't readjust
index d044a2ad9e8404473eb8b52a598132f4957670cb..e11cdd19723aac1ec92d79e1ad1908d4d859a2e1 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | grep movsd
-; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | grep mov | count 1
+; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | FileCheck %s
+; CHECK: movsd
+; CHECK-NOT: mov
 
 define i32 @foo() nounwind {
 entry:
index f1204d677a55b64a76a77558a766571985e08cdf..08f4564fc69fe07f4394d9c155732841d5799afa 100644 (file)
@@ -1,4 +1,7 @@
-; RUN: llc < %s -tailcallopt=false | grep "movl[[:space:]]*8(%esp), %eax" | count 2
+; RUN: llc < %s -tailcallopt=false | FileCheck %s
+; CHECK: movl 8(%esp), %eax 
+; CHECK: movl 8(%esp), %eax 
+
 ; PR3122
 ; rdar://6400815
 
index d45741884c7db0e8bccc165cc9cd7bbe97650ad4..05705b9431ba220df90c1f1bd242b1f99ac6ec7a 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc < %s -march=x86 -tailcallopt=false | grep ret | not grep 4
+; RUN: llc < %s -march=x86 -tailcallopt=false | FileCheck %s
+; CHECK: ret{{[^4]*$}}
 
        %struct.foo = type { [4 x i32] }
 
index 84f8ef6cf3603f84020edf64c27f912351472c25..e2c54ac8a13300ff3bcfa04fcca83f4946f7a2a5 100644 (file)
@@ -1,7 +1,8 @@
 ; RUN: llc < %s -march=x86 -o %t
-; RUN: grep "movl      .48, %ecx" %t
-; RUN: grep "movl      .24, %edx" %t
-; RUN: grep "movl      .12, %eax" %t
+; RUN: FileCheck %s -input-file %t
+; CHECK: movl {{.}}12, %eax
+; CHECK: movl {{.}}24, %edx
+; CHECK: movl {{.}}48, %ecx
 
 %0 = type { i32, i32, i32 }