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

David Blaikie dblaikie at gmail.com
Tue Oct 2 19:25:55 PDT 2012


On Sat, Sep 22, 2012 at 7:48 PM, Michael Liao <michael.liao at intel.com> wrote:
> 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.

Patches to update the testing guide would be welcome. Documentation
tends to bitrot rather easily. (in regards to grep, the general
community goal has been to not add new grep-based tests and to migrate
existing ones to filecheck whenever time permits)

>
> - Michael
>
>>
>> - Ben
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list