[llvm] r179241 - Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep

Eli Bendersky eliben at google.com
Thu Apr 11 07:27:54 PDT 2013


On Wed, Apr 10, 2013 at 4:58 PM, Reid Kleckner <rnk at google.com> wrote:

> On Wed, Apr 10, 2013 at 4:30 PM, Eli Bendersky <eliben at google.com> wrote:
> > Author: eliben
> > Date: Wed Apr 10 18:30:20 2013
> > New Revision: 179241
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=179241&view=rev
> > Log:
> > Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of
> grep
> >
> >
> > Modified:
> >     llvm/trunk/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
> >     llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll
> >     llvm/trunk/test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll
> >     llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll
> >     llvm/trunk/test/CodeGen/X86/fast-isel-fneg.ll
> >     llvm/trunk/test/CodeGen/X86/fast-isel-gv.ll
> >     llvm/trunk/test/CodeGen/X86/fast-isel-tailcall.ll
> >     llvm/trunk/test/CodeGen/X86/fastcc-2.ll
> >     llvm/trunk/test/CodeGen/X86/fastcc-byval.ll
> >     llvm/trunk/test/CodeGen/X86/fastcc-sret.ll
> >     llvm/trunk/test/CodeGen/X86/fastcc3struct.ll
> >
> > Modified: llvm/trunk/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll?rev=179241&r1=179240&r2=179241&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll
> (original)
> > +++ llvm/trunk/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll Wed Apr
> 10 18:30:20 2013
> > @@ -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
> >
> > Modified: llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll?rev=179241&r1=179240&r2=179241&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll (original)
> > +++ llvm/trunk/test/CodeGen/X86/fast-cc-merge-stack-adj.ll Wed Apr 10
> 18:30:20 2013
> > @@ -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"
> >
> >
> > Modified:
> llvm/trunk/test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll?rev=179241&r1=179240&r2=179241&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll
> (original)
> > +++ llvm/trunk/test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll
> Wed Apr 10 18:30:20 2013
> > @@ -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.
> >
> > Modified: llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll?rev=179241&r1=179240&r2=179241&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll (original)
> > +++ llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll Wed Apr 10
> 18:30:20 2013
> > @@ -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"
> >
> > Modified: llvm/trunk/test/CodeGen/X86/fast-isel-fneg.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-fneg.ll?rev=179241&r1=179240&r2=179241&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/fast-isel-fneg.ll (original)
> > +++ llvm/trunk/test/CodeGen/X86/fast-isel-fneg.ll Wed Apr 10 18:30:20
> 2013
> > @@ -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
>
> To be perfectly pedantic, to match | count 2 you have to do a SSE2-NOT: xor
>
>
Thanks for the catch, I'll fix it.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130411/6a2f0406/attachment.html>


More information about the llvm-commits mailing list