[llvm-commits] [llvm] r164465 - /llvm/trunk/test/CodeGen/X86/atomic16.ll

Michael Liao michael.liao at intel.com
Sat Sep 22 19:48:07 PDT 2012


On Sat, 2012-09-22 at 23:23 +0200, Benjamin Kramer wrote:
> On 22.09.2012, at 23:07, Michael Liao <michael.liao at intel.com> wrote:
> 
> > Author: hliao
> > Date: Sat Sep 22 16:07:59 2012
> > New Revision: 164465
> > 
> > URL: http://llvm.org/viewvc/llvm-project?rev=164465&view=rev
> > Log:
> > Enhance test case of atomic16 to verify inst encoding fixed in r164453.
> > 
> > 
> > Modified:
> >    llvm/trunk/test/CodeGen/X86/atomic16.ll
> > 
> > Modified: llvm/trunk/test/CodeGen/X86/atomic16.ll
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/atomic16.ll?rev=164465&r1=164464&r2=164465&view=diff
> > ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/atomic16.ll (original)
> > +++ llvm/trunk/test/CodeGen/X86/atomic16.ll Sat Sep 22 16:07:59 2012
> > @@ -1,5 +1,11 @@
> > ; RUN: llc < %s -O0 -march=x86-64 -mcpu=corei7 | FileCheck %s --check-prefix X64
> > ; RUN: llc < %s -O0 -march=x86 -mcpu=corei7 | FileCheck %s --check-prefix X32
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep xaddw | grep 0x66
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep addw | grep 0x66
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep subw | grep 0x66
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep xorw | grep 0x66
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep orw | grep 0x66
> > +; RUN: llc < %s -O0 -mtriple=x86_64-linux-unknonw-unknown -mcpu=corei7 -show-mc-encoding | grep andw | grep 0x66
> 
> New tests in the llvm test suite shouldn't use grep. Can you add -show-mc-encoding to the existing run lines instead and enhance the check lines below to match the encoding? For example:
> 
> ; X64:       xaddw {{.*}} encoding: [0x66,
> 
> will verify that a xaddw instruction is emitted, the regex skips the operands and the encoding must begin with 0x66.

Done in r164472.

I agreed that lit test should not add extra dependency on system
environment. The testing guide seems outdated as examples there use
'grep' as samples.

- Michael

> 
> - Ben





More information about the llvm-commits mailing list