efriedma-quic wrote: clang specifically diagnoses always_inline functions. So for example, say you want to write something like:
``` #include <arm_sve.h> __attribute__((always_inline, target("+sve"))) static inline void f(void* p) __arm_streaming_compatible { *(svuint32_t*)p = svmul_m(svptrue_b32(), *(svuint32_t*)p, *(svuint32_t*)p); } ////////// void g(void* p) __arm_streaming { f(p); } ``` Conceptually, this should be fine, but currently it's an error. (You can sort of approximate it with an `#ifdef __ARM_FEATURE_SVE`, but that's pretty ugly.) But regardless of the diagnostics, if the user specifies "+sve" on a target that doesn't actually have SVE, we could miscompile; for example, if you call a versioned function, clang uses the features specified in the caller. 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