-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[Utils] update_llc_test_checks.py: updated the regexp for ARM target #148287
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-testing-tools Author: Tommaso Fellegara (Felle33) ChangesFixes #147485.
Should I fix also the Full diff: https://github.com/llvm/llvm-project/pull/148287.diff 1 Files Affected:
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,@function\n)?" # drop .type .L<func>$local
r"\s+\.fnstart\n" # .fnstart
|
This is pretty common - the update script shouldn't touch comments outside functions so if the original CHECKS were put above the function then they won't get stripped and the lit test will fail as it ends up with duplicate checks - if a test file doesn't already have the "Assertions have been autogenerated by utils/update_llc_test_checks.py" note I wouldn't worry. |
I assume so. Currently travelling but will take a look when I can this week. I think I copied this from another target’s but it’s possible I had to edit it and botched that. |
Is there something I can do on my side? I could work on the AArch64 files, but I have not found a file that was updated with the script and the flag --asm-verbose=false was passed at the same time |
Can you update the other regex patterns that were updated in the same patch? |
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 commit2011-02-04-AntidepMultidef.ll
,2011-02-07-AntidepClobber.ll
,ifcvt-iter-indbr.ll
: the update removes the file_check directivesarm-vld1.ll
,arm-vlddup-update.ll
,arm-vst1.ll
,atomic-cmpxchg.ll
,float-helpers.ll
,fp16-fullfp16.ll
: the update worksarm-vlddup.ll
,tail-dup.ll
,tail-opts.ll
: adds some notes generated by update_llc_test_checks, but the update worksfp16-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.