[clang] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. (PR #95982)

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 13:45:15 PDT 2024


jroelofs wrote:

> I've tested this change locally, but wasn't sure how to write a test for it.

how about:
```
void check(uint64_t *a, uint64_t *b) {
    __builtin_arm_get_sme_state(a, b);
}
```

with a couple of run lines for various platforms? if `a` and `b` were `unsigned long *` you'd get an error about the type mismatch on an LLP64 system like:

```
error: cannot initialize a parameter of type 'unsigned long long *' with an lvalue of type 'unsigned long *'
```

Likewise, if they were `unsigned long long *`, you'd get the error on an LP64 system.

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


More information about the cfe-commits mailing list