[PATCH] D53710: [FileCheck] Warn if a prefix is only used in LABEL checks
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 12:04:05 PST 2018
probinson added a comment.
In https://reviews.llvm.org/D53710#1290345, @jdenny wrote:
> In https://reviews.llvm.org/D53710#1289937, @SjoerdMeijer wrote:
>
> > > AMDGPU does this a lot intentionally for a shared label prefix and unique per run like ones for different subtargets
> >
> > Yep. Briefly looked at AMDGPU warnings. The very first 4 warnings, in tests `basic-loop.ll`, `basic-call-return.ll`, `bug-vopc-commute.ll`, `call-return-types.ll`, shows I think that they are dodgy tests, but then I see indeed the intentional use of the shared label prefix.
>
>
> You two seem to be saying that the concept of a "shared label prefix" justifies this use case. I'm sorry, but I don't know what that phrase means. Could someone please explain? In other words, couldn't these tests just use "CHECK:" (or "GCN:" or whatever prefix they prefer) without "-LABEL"? I believe that's Paul's position.
I think a concrete example would help, and it looks like CodeGen/AMDGPU/cttz_zero_undef.ll is one. In this test, there are three RUN lines, each for a different subtarget, and the check-prefix options include FUNC and also some subtarget-specific prefixes. Then you have checks like
; FUNC-LABEL: {{^}}s_cttz_zero_undef_i32:
; SI: something
; EG: some other thing
; FUNC-LABEL: {{^}}v_cttz_zero_undef_i32:
; SI: thing3
; EG: thing4
So the FUNC prefix is used just for the LABELs, and other prefixes are used for target-specific variations within each test function.
This seems like a reasonable use-case to me.
https://reviews.llvm.org/D53710
More information about the llvm-commits
mailing list