[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/92427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-22 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/92427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-20 Thread via cfe-commits
rsandifo-arm wrote: > clang specifically diagnoses always_inline functions. So for example, say you > want to write something like: > > ``` > #include > __attribute__((always_inline, target("+sve"))) > static inline void f(void* p) __arm_streaming_compatible { > *(svuint32_t*)p =

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: clang specifically diagnoses always_inline functions. So for example, say you want to write something like: ``` #include __attribute__((always_inline, target("+sve"))) static inline void f(void* p) __arm_streaming_compatible { *(svuint32_t*)p = svmul_m(svptrue_b32(),

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-17 Thread via cfe-commits
rsandifo-arm wrote: > > Thinking about it a bit more, maybe we can just do some magic to make > > things work? Say, if you specify `__attribute__((target("sve"))) > > __arm_streaming_compatible`, and the caller is in streaming mode, allow the > > call even if the caller doesn't have SVE

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Thinking about it a bit more, maybe we can just do some magic to make things > work? Say, if you specify `__attribute__((target("sve"))) > __arm_streaming_compatible`, and the caller is in streaming mode, allow the > call even if the caller doesn't have SVE proper.

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The key here is that `__arm_streaming_compatible` is the only way to write code that runs in both streaming and non-streaming mode; outside of `__arm_streaming_compatible`, there generally isn't an issue. If you know you're not in streaming mode, you can just check

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/92427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread via cfe-commits
rsandifo-arm wrote: > However we choose to emit this particular builtin, should we provide a way to > write a function like this? Like, the caller has to either support sve, or > have streaming enabled. Maybe call it __arm_streaming_compatible_requires_sve. I'd like to make two (probably

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: However we choose to emit this particular builtin, should we provide a way to write a function like this? Like, the caller has to either support sve, or have streaming enabled. Maybe call it __arm_streaming_compatible_requires_sve.

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes The intrinsics are currently defined as: __aio __attribute__((target("sve"))) svint8_t svreinterpret_s8(svuint8_t op) __arm_streaming_compatible { return

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-16 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/92427 The intrinsics are currently defined as: __aio __attribute__((target("sve"))) svint8_t svreinterpret_s8(svuint8_t op) __arm_streaming_compatible { return __builtin_sve_reinterpret_s8_u8(op); }