David Greene via llvm-dev
2020-Jul-06 13:55 UTC
[llvm-dev] [RFC] Compiled regression tests.
Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> writes:>> Would this not work? >> >> CHECK-SAME: ![[ACCESS_GROUP_INNER:[0-9]+]] >> CHECK-SAME: ![[ACCESS_GROUP_OUTER:[0-9]+]] >> >> I don't think CHECK-SAME is sensitive to order within the line. This >> works for me in my metadata tests but maybe I've just been lucky. > > AFAIU this will assume ACCESS_GROUP_INNER to appear before > ACCESS_GROUP_OUTER since CHECK-SAME will continue matching at the > column where the previous match stopped, thus have the same result as > written in the same line. If CHECK-SAME starts over at the beginning > of the line ACCESS_GROUP_OUTER/ACCESS_GROUP_INNER will both match the > same.Is the behavior of CHECK-SAME documented anywhere? It's not on the main FileCheck web page. I assumed it started over from the beginning of the line but now I'm not sure. -David
Michael Kruse via llvm-dev
2020-Jul-06 15:31 UTC
[llvm-dev] [RFC] Compiled regression tests.
Am Mo., 6. Juli 2020 um 08:55 Uhr schrieb David Greene <david.greene at hpe.com>:> Is the behavior of CHECK-SAME documented anywhere? It's not on the main > FileCheck web page. I assumed it started over from the beginning of the > line but now I'm not sure.https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-same-directive Michael
David Greene via llvm-dev
2020-Jul-07 15:15 UTC
[llvm-dev] [RFC] Compiled regression tests.
Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> writes:> Am Mo., 6. Juli 2020 um 08:55 Uhr schrieb David Greene <david.greene at hpe.com>: >> Is the behavior of CHECK-SAME documented anywhere? It's not on the main >> FileCheck web page. I assumed it started over from the beginning of the >> line but now I'm not sure. > > https://www.llvm.org/docs/CommandGuide/FileCheck.html#the-check-same-directiveBut that doesn't say whether multiple CHECK-SAME directives each start looking at the beginning of the line or whether they continue form where the previous CHECK-SAME left off. To me it makes the most sense if each CHECK-SAME starts from the beginning of the line and it would also seem to be much simpler to implement it that way. If it indeed works that way, then CHECK-SAME can be used to check things disregarding order within the line. -David