[clang] Add SME2 builtins for pfalse and ptrue (PR #71953)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 07:35:17 PST 2023


================
@@ -15,7 +17,7 @@
 // CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8()
 // CPP-CHECK-NEXT:    ret target("aarch64.svcount") [[TMP0]]
 //
-svcount_t test_svptrue_c8(void) {
+svcount_t test_svptrue_c8(void) __arm_streaming_compatible {
----------------
sdesmalen-arm wrote:

Can you rewrite the tests in such a way that we do test for the two different configurations:
* For SVE2p1: no attribute
* For SME2: `__arm_streaming`

You can do something with macros, so that you replace `__arm_streaming_compatible` here with `ATTR` and then do something like:
```
#ifndef TEST_SME
#define ATTR
#else
#define ATTR __arm_streaming
#endif
```
and then for the `+sme2` RUN line you'd add `-DTEST_SME`.

That way, we're sure to test for the correct mode when we update the builtin to use a different attribute than `__arm_streaming_compatible`.

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


More information about the cfe-commits mailing list