[llvm] [AArch64] Model ZA array using inaccessible memory (PR #132058)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 03:47:37 PDT 2025


================
@@ -3257,36 +3257,36 @@ let TargetPrefix = "aarch64" in {
    : DefaultAttrsIntrinsic<[],
                [llvm_i32_ty,
                 llvm_anyvector_ty, LLVMMatchType<0>],
-               []>;
+               [IntrWriteMem, IntrInaccessibleMemOnly]>;
----------------
paulwalker-arm wrote:

This represents add/sub accumulation instructions and so also read ZA?

Related to this it looks like the following classes are used by the non-accumulation variants of add/sub and thus are over specified because those variants only write to ZA?:
```
SME2_Matrix_ArrayVector_VG2_Multi_Single_Intrinsic
SME2_Matrix_ArrayVector_VG4_Multi_Single_Intrinsic
SME2_Matrix_ArrayVector_VG2_Multi_Multi_Intrinsic
SME2_Matrix_ArrayVector_VG4_Multi_Multi_Intrinsic
```
Given it's not strictly speaking a bug, just a missed optimisation, I'm happy to let them slide for this PR if that's your preference but we should follow up and break them out.

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


More information about the llvm-commits mailing list