[PATCH] D53710: [FileCheck] Warn if a prefix is only used in LABEL checks

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 09:50:50 PST 2018


jdenny added a comment.

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.

In https://reviews.llvm.org/D53710#1290271, @probinson wrote:

> Renaming CHECK-LABEL to, say, CHECK-BOUND is way more work than you signed up for, but I think it's preferable than piling more options and warnings on top of the existing feature.  I'd support an RFC to do this and help with some of the mechanical work.


Renaming sounds like it could be helpful if the community agrees on the new name, but let's not forget the original purpose of this warning: to identify prefix typos.  It just so happens that this warning also finds misuses of CHECK-LABEL.  If those misuses can be eliminated through the renaming process you describe, it would be interesting to see how many misspellings this warning then finds.


https://reviews.llvm.org/D53710





More information about the llvm-commits mailing list