[llvm] [utils] Add script to generate elaborated assembly tests (PR #89026)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 22:02:18 PDT 2024
MaskRay wrote:
> Sounds OK
>
> I wonder whether it'd be a better tradeoff to accept the top-level content wouldn't be assembly, and then this'd be more generally useful (& maybe easier to read - the embedded assembly with embedded commands is a bit extra difficult to read for me, at least).
>
> Like accept that the top level must be a split-file mode, with a specific named file for the test input and a specific named file for the regenerate command - and any extra ones can be used for input files to the regenerate command. (though then, I guess, you've got to figure a potentially different prefix for split-file, if the generated file is mean tto be split too (though, like FileCheck prefixes, that might not be such a bad feature to have, if we don't have it already)
I've generalized the script to not require `.ifdef/.endif` so that it can apply to IR tests.
Many assembly tests just invoke `llvm-mc` and don't bother with `split-file`. So I keep the current `.endif` detection for convenience.
https://github.com/llvm/llvm-project/pull/89026
More information about the llvm-commits
mailing list