[llvm] [Utils] update_llc_test_checks.py: updated the regexp for ARM target (PR #148287)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 13:18:17 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-testing-tools

Author: Tommaso Fellegara (Felle33)

<details>
<summary>Changes</summary>

Fixes #<!-- -->147485.
I changed the regexp for the ARM target making the part `@+[ \t]*@"?(?P=func)"?` optional since when the -asm-verbose=false is passed it is not generated and this led to the issue.
I have tried to use this new version with the tests that used the -asm-verbose=false, these are the results:

- `2009-08-21-PostRAKill2.ll`, `2009-08-21-PostRAKill3.ll`: runtime error (UnboundLocalError), there was the same error also in the previous commit
- `2011-02-04-AntidepMultidef.ll`, `2011-02-07-AntidepClobber.ll`, `ifcvt-iter-indbr.ll`: the update removes the file_check directives
- `arm-vld1.ll`, `arm-vlddup-update.ll`, `arm-vst1.ll`, `atomic-cmpxchg.ll`, `float-helpers.ll`, `fp16-fullfp16.ll`: the update works
- `arm-vlddup.ll`, `tail-dup.ll`, `tail-opts.ll`: adds some notes generated by update_llc_test_checks, but the update works
- `fp16-promote.ll`, `cse-flags.ll`: in these files there are some file_checks directives outside the function and this leads to an error since the update script rewrites the directives inside the function.
- `fp16-vld.ll`: some spaces are added, but the update works.

Should I fix also the `2011-02-04-AntidepMultidef.ll`, `2011-02-07-AntidepClobber.ll`, `ifcvt-iter-indbr.ll` tests?
Moreover I did not found the aarch64 tests that you mentioned.

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


1 Files Affected:

- (modified) llvm/utils/UpdateTestChecks/asm.py (+1-1) 


``````````diff
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 3754aa2eeba85..ee70d837d7b7a 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -32,7 +32,7 @@ class string:
 )
 
 ASM_FUNCTION_ARM_RE = re.compile(
-    r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*@+[ \t]*@"?(?P=func)"?\n'  # f: (name of function)
+    r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*(@+[ \t]*@"?(?P=func)"?)?\n'  # f: (name of function)
     r"(?:\.L(?P=func)\$local:\n)?"  # drop .L<func>$local:
     r"(?:\s*\.type\s+\.L(?P=func)\$local, at function\n)?"  # drop .type .L<func>$local
     r"\s+\.fnstart\n"  # .fnstart

``````````

</details>


https://github.com/llvm/llvm-project/pull/148287


More information about the llvm-commits mailing list