[PATCH] D47106: [FileCheck] Make CHECK-DAG non-overlapping

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 14:47:27 PDT 2018


probinson added inline comments.


================
Comment at: test/FileCheck/check-dag-overlap.txt:12
+
+; IdentPat:     {{^}}__IdentPat
+; IdentPat-DAG: {{^}}add [[REG1:r[0-9]+]], {{r[0-9]+}}, {{r[0-9]+}}
----------------
Ordinarily these delimiters would be using -LABEL; is there some reason not to?


================
Comment at: test/FileCheck/check-dag-overlap.txt:34
+; IdentPatNot-NOT: {{^}}xor
+; IdentPatNot-DAG: {{^}}mul r5, r10, r11
+; IdentPatNot:     {{^}}__IdentPatNot
----------------
Normally I'd say a single DAG after a NOT is more misleading than helpful; unless you changed some behavior here?


================
Comment at: test/FileCheck/check-dag-overlap.txt:165
+; RUN:               -check-prefix=Torture
+; RUN: FileCheck -input-file %s %s -check-prefix=Torture
+
----------------
Please move the Torture  part into its own test file.  I'm finding it hard to keep track well enough to review.


================
Comment at: test/FileCheck/check-dag-overlap.txt:467
+; DagNotDag:     {{^}}__DagNotDag
\ No newline at end of file

----------------
Reading this in the overlapping mode:  The X set of DAGs will all match on line 424, the Y set will all match on line 425, therefore the NOTs for rule 1 will correctly not match anything.  The Z set of DAGs will all match on line 428, therefore the NOTs for rule 2 will correctly not match anything.  Then the NOTs for rule 3 will match, making the run fail.

Is that what you intended?  Naively I would have thought you'd try to break each of the rules, but that's not what the test does.


https://reviews.llvm.org/D47106





More information about the llvm-commits mailing list