aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/asm.py
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2024-05-27 19:17:04 +0200
committerGitHub <noreply@github.com>2024-05-27 19:17:04 +0200
commit34388f986af1289492d043b56b6cba17468d1f8d (patch)
tree47866691d99ab9cc75ca5976b765767a4cd7b240 /llvm/utils/UpdateTestChecks/asm.py
parent4b5e0a1d12f0d624852c6d7c82207647ed5282aa (diff)
downloadllvm-34388f986af1289492d043b56b6cba17468d1f8d.zip
llvm-34388f986af1289492d043b56b6cba17468d1f8d.tar.gz
llvm-34388f986af1289492d043b56b6cba17468d1f8d.tar.bz2
update_llc_test_checks: better support for non-llc tools (#93135)
A full downstream fork can already hack up update_llc_test_checks.py to support custom tools that output assembly. An out-of-tree frontend which is meant to build against upstream llvm-project cannot do this, and so providing additional arguments to support a non-standard tool is useful. This also makes a minor adjustment to the regular expression for matching AMDGPU functions when fewer comments are enabled, which happens to be the case for our out-of-tree shader compiler (which motivated this change).
Diffstat (limited to 'llvm/utils/UpdateTestChecks/asm.py')
-rw-r--r--llvm/utils/UpdateTestChecks/asm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 33ede81..cce00e4 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -51,7 +51,8 @@ ASM_FUNCTION_AARCH64_RE = re.compile(
)
ASM_FUNCTION_AMDGPU_RE = re.compile(
- r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@"?(?P=func)"?\n[^:]*?'
+ r"\.type\s+_?(?P<func>[^,\n]+),@function\n"
+ r'^_?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n'
r"(?P<body>.*?)\n" # (body of the function)
# This list is incomplete
r"^\s*(\.Lfunc_end[0-9]+:\n|\.section)",