-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Clang][Sema] Extend test coverage for SVE/SME builtin usage. #156908
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
paulwalker-arm
merged 7 commits into
llvm:main
from
paulwalker-arm:sve-acle-test-refactor
Oct 8, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c0320ff
[Clang][Sema] Extend test coverage for SVE/SME builtin usage.
paulwalker-arm 50547e8
Reformat aarch64_builtins_test_generator.py
paulwalker-arm 6f7ac62
Fix issues reported by mypy.
paulwalker-arm ea8c80b
Reduce required python version to 3.7.
paulwalker-arm 1e2ddfa
Implement review comments.
paulwalker-arm 0269a02
Fix typo and emit message for unexpected literal types.
paulwalker-arm 4365005
Fix typo in emit_streaming_guard_run_lines description.
paulwalker-arm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
clang/test/CodeGen/AArch64/sve2-intrinsics/acle_sve2_rax1.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
clang/test/Sema/AArch64/arm_sme_streaming_compatible_sme.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py | ||
| // RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -verify | ||
| // expected-no-diagnostics | ||
|
|
||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_sme.h> | ||
|
|
||
| // Properties: guard="" streaming_guard="sme" flags="streaming-compatible,requires-za" | ||
|
|
||
| void test(void) __arm_inout("za"){ | ||
| int64_t int64_t_val; | ||
| uint32_t uint32_t_val; | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svldr_za(uint32_t_val, void_ptr_val); | ||
| svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svstr_za(uint32_t_val, void_ptr_val); | ||
| svzero_mask_za(2); | ||
| svzero_za(); | ||
| } | ||
|
|
||
| void test_streaming(void) __arm_streaming __arm_inout("za"){ | ||
| int64_t int64_t_val; | ||
| uint32_t uint32_t_val; | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svldr_za(uint32_t_val, void_ptr_val); | ||
| svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svstr_za(uint32_t_val, void_ptr_val); | ||
| svzero_mask_za(2); | ||
| svzero_za(); | ||
| } | ||
|
|
||
| void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("za"){ | ||
| int64_t int64_t_val; | ||
| uint32_t uint32_t_val; | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svldr_za(uint32_t_val, void_ptr_val); | ||
| svstr_vnum_za(uint32_t_val, void_ptr_val, int64_t_val); | ||
| svstr_za(uint32_t_val, void_ptr_val); | ||
| svzero_mask_za(2); | ||
| svzero_za(); | ||
| } | ||
33 changes: 33 additions & 0 deletions
33
clang/test/Sema/AArch64/arm_sme_streaming_compatible_sme_AND_sme2.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // NOTE: File has been autogenerated by utils/aarch64_builtins_test_generator.py | ||
| // RUN: %clang_cc1 %s -fsyntax-only -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -verify | ||
| // expected-no-diagnostics | ||
|
|
||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_sme.h> | ||
|
|
||
| // Properties: guard="" streaming_guard="sme,sme2" flags="streaming-compatible,requires-zt" | ||
|
|
||
| void test(void) __arm_inout("zt0"){ | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_zt(0, void_ptr_val); | ||
| svstr_zt(0, void_ptr_val); | ||
| svzero_zt(0); | ||
| } | ||
|
|
||
| void test_streaming(void) __arm_streaming __arm_inout("zt0"){ | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_zt(0, void_ptr_val); | ||
| svstr_zt(0, void_ptr_val); | ||
| svzero_zt(0); | ||
| } | ||
|
|
||
| void test_streaming_compatible(void) __arm_streaming_compatible __arm_inout("zt0"){ | ||
| void * void_ptr_val; | ||
|
|
||
| svldr_zt(0, void_ptr_val); | ||
| svstr_zt(0, void_ptr_val); | ||
| svzero_zt(0); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: It would be nice if this added the command line used to generate the test file (like
UTC_ARGSforutils/update_test_checks.py).