================
@@ -0,0 +1,111 @@
+// Case 1: No vscale flags — should only produce warnings
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +bf16
-target-feature +sme -target-feature +sme2 -target-feature +sve
-Waarch64-sme-attributes -fsyntax-only -verify=expected-noflags %s
+
+// Case 2: Explicit mismatch in vscale flags — should produce errors for
+// streaming and non-streaming callers
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +bf16
-target-feature +sme -target-feature +sme2 -target-feature +sve
-Waarch64-sme-attributes -fsyntax-only -mvscale-min=1 -mvscale-max=1
-mvscale-streaming-min=2 -mvscale-streaming-max=2 -verify=expected-flags %s
+
+void sme_streaming_with_vl_arg(__SVInt8_t a) __arm_streaming { }
----------------
sdesmalen-arm wrote:
nit: you don't necessarily need to define these functions, declaring them is
enough. In fact, you could even pass them in as parameters to the functions to
clean up the tests a bit more, e.g.:
```
void sme_nonstreaming_calling_streaming(__SVInt8_t v, void (*f)(__SVInt8_t)
__arm_streaming) {
// expected-noflags-warning@+2: ...
// expected-flags-error@+1: ...
f(v);
}
```
https://github.com/llvm/llvm-project/pull/159131
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits