Skip to content

[update_llc_test_checks][AMDGPU] Update AMDGPU regexp in update_llc_test_checks.py #102480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

jmmartinez
Copy link
Contributor

Updating llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll with update_llc_test_checks.py ended with several kernels with no checks.

Llc's output contained the line ".amdgpu_hsa_kernel " after the ".type ,@function" entry which was not considered by the regexp.

…est_checks.py

Updating llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll with
update_llc_test_checks.py ended with several kernels with no checks.

Change-Id: Ib83e1fe830109431cb3cb26fb12d7960db4e2abf
@llvmbot
Copy link
Member

llvmbot commented Aug 8, 2024

@llvm/pr-subscribers-testing-tools

Author: Juan Manuel Martinez Caamaño (jmmartinez)

Changes

Updating llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll with update_llc_test_checks.py ended with several kernels with no checks.

Llc's output contained the line ".amdgpu_hsa_kernel <funcname>" after the ".type <funcname>,@function" entry which was not considered by the regexp.


Full diff: https://github.com/llvm/llvm-project/pull/102480.diff

1 Files Affected:

  • (modified) llvm/utils/UpdateTestChecks/asm.py (+1)
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index f150098eaaeef4..f05d8b89e73b93 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -52,6 +52,7 @@ class string:
 
 ASM_FUNCTION_AMDGPU_RE = re.compile(
     r"\.type\s+_?(?P<func>[^,\n]+),@function\n"
+    r"(^\s*\.amdgpu_hsa_kernel (?P=func)\n)?"
     r'^_?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n'
     r"(?P<body>.*?)\n"  # (body of the function)
     # This list is incomplete

@jmmartinez jmmartinez merged commit d38bae3 into llvm:main Aug 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants