[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 11:31:38 PDT 2020


jdenny added a comment.

In D77227#1955304 <https://reviews.llvm.org/D77227#1955304>, @jdoerfert wrote:

> The first I looked up `llvm/test/Transforms/LoopUnroll/runtime-loop5.ll:26` is `UNROLL-16-LABEL-NOT:`, which may not be allowed.


There are already a number of bad `NOT` combination checks.  I'm not sure why it doesn't include `LABEL`.

> Real error (partial list):
> 
>   llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/merge-stores.ll:114
>   llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/vect-ptr-ptr-size-mismatch.ll:58
>   llvm/test/Transforms/InstCombine/intptr1.ll:30
>   llvm/test/Transforms/InstCombine/phi-preserve-ir-flags.ll:20 [almost all lines]

That's unfortunate.

Checks that are likely to produce many false positives (like standalone `CHECK`) should be opt-in.  Ideally, such checks would also have error recovery (warning not error) so the user can see all occurrences and ignore false positives instead of having to rewrite false positives to see later occurrences.  To reduce false positives, checks might need heuristics like detecting whether `CHECK` appears at the beginning of a line and possibly in comments.  I don't know that we want to complicate FileCheck itself with such heuristics.  For example, FileCheck doesn't currently parse comments.  A separate script might be better.

Cases that are very unlikely to produce false positives (like bad `NOT` combinations) are safer to be implemented directly in FileCheck.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77227/new/

https://reviews.llvm.org/D77227





More information about the llvm-commits mailing list