[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 02:48:09 PDT 2024


================
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -Waarch64-sme-attributes -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -Waarch64-sme-attributes -fsyntax-only -verify=expected-cpp -x c++ %s
+
+__attribute__((target_clones("sve", "simd"))) void ok_arm_streaming(void) __arm_streaming {}
+__arm_locally_streaming __attribute__((target_version("sme2"))) void ok_arm_streaming(void) __arm_streaming {}
+__attribute__((target_version("default"))) void ok_arm_streaming(void) __arm_streaming {}
+
+__attribute__((target_clones("sve", "simd"))) void ok_arm_streaming_compatible(void) __arm_streaming_compatible {}
+__arm_locally_streaming __attribute__((target_version("sme2"))) void ok_arm_streaming_compatible(void) __arm_streaming_compatible {}
----------------
sdesmalen-arm wrote:

Yes, the streaming interface can be different from the body of the function. `__arm_locally_streaming` is a declaration attribute and applies the 'streaming' property to the definition (body) of the function, even though the interface remains 'streaming compatible'.

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


More information about the cfe-commits mailing list