[clang] [AArch64][SME2] Remove IsPreservesZA from ldr_zt builtin (PR #74303)

Matthew Devereau via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 03:34:04 PST 2023


https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/74303

>From de96ce8075385a3404a24e6cb7d81e46e23f8089 Mon Sep 17 00:00:00 2001
From: Matt Devereau <matthew.devereau at arm.com>
Date: Mon, 4 Dec 2023 10:55:24 +0000
Subject: [PATCH 1/2] [AArch64][SME2] Remove IsPreservesZA from ldr_zt builtin

---
 clang/include/clang/Basic/arm_sme.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/include/clang/Basic/arm_sme.td b/clang/include/clang/Basic/arm_sme.td
index 34dbfff6c4c85..7cdb531b5aae4 100644
--- a/clang/include/clang/Basic/arm_sme.td
+++ b/clang/include/clang/Basic/arm_sme.td
@@ -319,7 +319,7 @@ let TargetGuard = "sme2" in {
 // Spill and fill of ZT0
 //
 let TargetGuard = "sme2" in {
-  def SVLDR_ZT : Inst<"svldr_zt", "viQ", "", MergeNone, "aarch64_sme_ldr_zt", [IsOverloadNone, IsStreamingCompatible, IsSharedZA, IsPreservesZA], [ImmCheck<0, ImmCheck0_0>]>;
+  def SVLDR_ZT : Inst<"svldr_zt", "viQ", "", MergeNone, "aarch64_sme_ldr_zt", [IsOverloadNone, IsStreamingCompatible, IsSharedZA], [ImmCheck<0, ImmCheck0_0>]>;
   def SVSTR_ZT : Inst<"svstr_zt", "vi%", "", MergeNone, "aarch64_sme_str_zt", [IsOverloadNone, IsStreamingCompatible, IsSharedZA, IsPreservesZA], [ImmCheck<0, ImmCheck0_0>]>;
 
 //

>From 5aa2f18d25c112f71aac8ca1474b9b7341cdacfe Mon Sep 17 00:00:00 2001
From: Matt Devereau <matthew.devereau at arm.com>
Date: Mon, 4 Dec 2023 11:30:03 +0000
Subject: [PATCH 2/2] Update ldr_zt tests

---
 .../CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c  | 2 +-
 clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp   | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c b/clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c
index 126a4fc104585..83fbd6e5855ca 100644
--- a/clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c
+++ b/clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c
@@ -20,7 +20,7 @@
 // CPP-CHECK-NEXT:    tail call void @llvm.aarch64.sme.ldr.zt(i32 0, ptr [[BASE:%.*]])
 // CPP-CHECK-NEXT:    ret void
 //
-void test_svldr_zt(const void *base) __arm_streaming_compatible __arm_shared_za __arm_preserves_za {
+void test_svldr_zt(const void *base) __arm_streaming_compatible __arm_shared_za {
   svldr_zt(0, base);
 }
 
diff --git a/clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp b/clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp
index 70987ad395f73..19d55d2388e47 100644
--- a/clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp
+++ b/clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp
@@ -20,7 +20,11 @@ void test_outer_product(svbool_t pred, svint16_t s16, svuint16_t u16, svint32_t
   svbmops_za32_s32_m(4, pred, pred, s32, s32); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
 }
 
-void test_ldr_str_zt(const void *const_base, void *base) __arm_streaming_compatible __arm_shared_za __arm_preserves_za {
+void test_ldr_zt(const void *const_base, void *base) __arm_streaming_compatible __arm_shared_za {
   svldr_zt(1, const_base); // expected-error {{argument value 1 is outside the valid range [0, 0]}}
+}
+
+void test_str_zt(const void *const_base, void *base) __arm_streaming_compatible __arm_shared_za __arm_preserves_za {
   svstr_zt(1, base);       // expected-error {{argument value 1 is outside the valid range [0, 0]}}
 }
+



More information about the cfe-commits mailing list