[PATCH] D101312: [Utils] Do not remove comments in llc test script
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 6 04:04:12 PDT 2021
sebastian-ne updated this revision to Diff 356671.
sebastian-ne added a comment.
> It seems like most of the "arg name scrubbing" that this function does is not relevant for asm? Perhaps update_llc_test_checks could use a much much simpler form of this function instead?
You’re right, seems like D68819 <https://reviews.llvm.org/D68819> added it and it is meant for IR test. For `args_and_sig`, it is still done (whatever that contains in llc tests), but for the body, the scrubbing with these regexes is skipped: https://github.com/llvm/llvm-project/blob/bbcbf21ae60c928e07dde6a1c468763b3209d1e6/llvm/utils/UpdateTestChecks/common.py#L679-L687
So, I hope it works if we do the same in this check function as when emitting the check lines.
> Maybe the problem is that SCRUB_IR_COMMENT should remove a trailing comment only, but not completely delete a whole-line comment?
Probably, that is a different problem and should be fixed in a different patch (if is_asm is true, the regexes are not applied at all; IR comments are left in place for llc tests). The problem is that `\s` in the regex also matches—and removes—newlines. I guess the most difficult part is coming up with a testcase.
Sorry, it took me a while to look at this again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101312/new/
https://reviews.llvm.org/D101312
Files:
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test
llvm/utils/UpdateTestChecks/common.py
llvm/utils/update_analyze_test_checks.py
llvm/utils/update_cc_test_checks.py
llvm/utils/update_llc_test_checks.py
llvm/utils/update_test_checks.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101312.356671.patch
Type: text/x-patch
Size: 6780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210706/aab8d021/attachment.bin>
More information about the llvm-commits
mailing list