[llvm-dev] [RFC] Compiled regression tests.
Robinson, Paul via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 8 04:12:03 PDT 2020
> -----Original Message-----
> From: David Greene <david.greene at hpe.com>
> Sent: Tuesday, July 7, 2020 5:11 PM
> To: Robinson, Paul <paul.robinson at sony.com>; Michael Kruse
> <llvmdev at meinersbur.de>; 'llvm-dev at lists.llvm.org' <llvm-
> dev at lists.llvm.org>
> Subject: Re: [llvm-dev] [RFC] Compiled regression tests.
>
> "Robinson, Paul via llvm-dev" <llvm-dev at lists.llvm.org> writes:
>
> > I believe you can get the effect you want with a pair of DAG directives
> > followed by `CHECK: {{$}}`. The latter will constrain the DAG search
> > to be between the previous match point and the next EOL.
>
> I'm sorry, I don't quite understand what you mean. Can you give an
> example?
>
> My use-case is for metadata, where I wanted to do this:
>
> CHECK: %r1 = add %r2, %r3
> CHECK-SAME: !some-metadata
> CHECK-SAME: !some-other-metadata
>
> where some-metadata and some-other-metadata might be reordered within
> the line (because some unrelated metadata got added to the instruction).
> In other words, all of these should match:
>
> %r1 = add %r2, %r3, !some-metadata !1, !some-other-metadata !2
> %r1 = add %r2, %r3, !some-other-metadata !1, !some-metadata !2
> %r1 = add %r2, %r3, !some-other-metadata !1, !some-unrelated-metadata !3,
> !some-metadata !2
>
> -David
I'd expect the following to do what you want:
CHECK: %r1 = add %r2, %r3
CHECK-DAG: !some-metadata
CHECK-DAG: !some-other-metadata
CHECK: {{$}}
Interestingly, it does not; I filed PR46634 to figure this out.
--paulr
More information about the llvm-dev
mailing list