Skip to content

[Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. #95982

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 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/BuiltinsAArch64.def
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TARGET_BUILTIN(__builtin_arm_stg, "vv*", "t", "mte")
TARGET_BUILTIN(__builtin_arm_subp, "Uiv*v*", "t", "mte")

// SME state function
BUILTIN(__builtin_arm_get_sme_state, "vULi*ULi*", "n")
BUILTIN(__builtin_arm_get_sme_state, "vWUi*WUi*", "n")

// Memory Operations
TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops")
Expand Down
14 changes: 14 additions & 0 deletions clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_state_builtin.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// REQUIRES: aarch64-registered-target
// RUN: %clang_cc1 -triple aarch64-linux -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
// RUN: %clang_cc1 -triple aarch64-windows -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
// RUN: %clang_cc1 -triple aarch64-darwin -S -disable-O0-optnone -Werror -Wall -o /dev/null %s

#include <stdint.h>

// Ensure that the builtin is defined to take a uint64_t * rather than relying
// on the size of 'unsigned long' which may have different meanings on different
// targets depending on LP64/LLP64.
void test_sme_state_builtin(uint64_t *a,
uint64_t *b) __arm_streaming_compatible {
__builtin_arm_get_sme_state(a, b);
}
Loading