[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)
Sander de Smalen via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 9 03:17:29 PST 2024
================
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar
// expected-cpp-error at +2 {{conflicting attributes for state 'zt0'}}
// expected-error at +1 {{conflicting attributes for state 'zt0'}}
void conflicting_state_attrs_preserves_inout_zt0(void) __arm_preserves("zt0") __arm_inout("zt0");
+
----------------
sdesmalen-arm wrote:
I just wrote some tests manually with all combinations of n (normal), s (streaming), sc (streaming-compatible) and see the current behaviour isn't entirely correct. See the FIXME's below.
It also shows that there isn't enough test-coverage in your patch.
```
typedef __SVInt32_t sv_ty;
void n(sv_ty arg);
void sc(sv_ty arg) __arm_streaming_compatible;
void s(sv_ty arg) __arm_streaming;
void test_n_to_n(sv_ty arg) { n(arg); }
void test_n_to_sc(sv_ty arg) { sc(arg); }
void test_n_to_s(sv_ty arg) { s(arg); } // expect a diagnostic
void test_sc_to_n(sv_ty arg) __arm_streaming_compatible { n(arg); } // expect a diagnostic
void test_sc_to_sc(sv_ty arg) __arm_streaming_compatible { sc(arg); }
void test_sc_to_s(sv_ty arg) __arm_streaming_compatible { s(arg); } // expect a diagnostic (FIXME: missing diagnostic)
void test_s_to_n(sv_ty arg) __arm_streaming { n(arg); } // expect a diagnostic
void test_s_to_sc(sv_ty arg) __arm_streaming { sc(arg); } // FIXME: should not see a diagnostic for this case.
void test_s_to_s(sv_ty arg) __arm_streaming { s(arg); }
__arm_locally_streaming void ls_arg(sv_ty arg) { } // expect a diagnostic
__arm_locally_streaming sv_ty ls_ret() { return {}; } // expect a diagnostic
```
https://github.com/llvm/llvm-project/pull/79842
More information about the cfe-commits
mailing list