[clang] [AArch64][SME] Warn when using a streaming builtin from a non-streaming function (PR #74064)
Sam Tebbs via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 03:29:02 PST 2023
================
@@ -20,3 +21,23 @@ int16x8_t incompat_neon_smc(int16x8_t splat) __arm_streaming_compatible {
// expected-warning at +1 {{builtin call has undefined behaviour when called from a streaming compatible function}}
return (int16x8_t)__builtin_neon_vqaddq_v((int8x16_t)splat, (int8x16_t)splat, 33);
}
+
+void incompat_sme_norm(svbool_t pg, void const *ptr) __arm_shared_za {
+ // expected-warning at +1 {{builtin call has undefined behaviour when called from a non-streaming function}}
+ return __builtin_sme_svld1_hor_za128(0, 0, pg, ptr);
----------------
SamTebbs33 wrote:
> nit: returning a `void` value from a `void` function doesn't seem right.
Agreed, I'll fix that.
> Also, is `incompat_sme_norm` testing anything that `incompat_sme_sm` isn't testing?
> Or should this be a test where we'd call a non-streaming SVE/SME builtin from a streaming-function?
Yeah it doesn't look like it is. That would be better!
https://github.com/llvm/llvm-project/pull/74064
More information about the cfe-commits
mailing list