[PATCH] D110143: [Utils] Replace llc with cat for tests

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 07:11:23 PDT 2021


sebastian-ne updated this revision to Diff 373914.
sebastian-ne added a comment.

Good idea, I added a comment.

> All the other update scripts seem to use `invoke_tool()` so we should be able to drop %s handling from those scripts too? I guess substitution twice doesn't do any harm but it would be good to remove duplication to make future refactoring easier.

%s is not substituted in the scripts (except update_cc_test_checks.py), it is just removed with `.replace('< %s', '').replace('%s', '')`. We can move that to invoke_tool() if you think it makes sense?

> Then it should be possible to use %s-O3.s in the tests instead of %S?

I tried exactly that before, but for the above reason, that %s is removed and not substituted, this doesn’t work (it tries to run `cat -03.s`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110143

Files:
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments-O0.s
  llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments-O3.s
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110143.373914.patch
Type: text/x-patch
Size: 6731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210921/1aae6e0b/attachment.bin>


More information about the llvm-commits mailing list