[llvm] [AArch64][SME] Remove a couple of unused functions (NFC) (PR #192649)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 06:32:39 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Benjamin Maxwell (MacDue)
<details>
<summary>Changes</summary>
Follow up to https://github.com/llvm/llvm-project/pull/190950
---
Full diff: https://github.com/llvm/llvm-project/pull/192649.diff
2 Files Affected:
- (modified) llvm/lib/Target/AArch64/AArch64SMEAttributes.h (-9)
- (modified) llvm/unittests/Target/AArch64/SMEAttributesTest.cpp (+9-14)
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64SMEAttributes.h b/llvm/lib/Target/AArch64/AArch64SMEAttributes.h
index a01333087594a..58381a9a75bf2 100644
--- a/llvm/lib/Target/AArch64/AArch64SMEAttributes.h
+++ b/llvm/lib/Target/AArch64/AArch64SMEAttributes.h
@@ -194,15 +194,6 @@ class SMECallAttrs {
!callee().hasAgnosticZAInterface();
}
- bool requiresDisablingZABeforeCall() const {
- return caller().hasZT0State() && !caller().hasZAState() &&
- callee().hasPrivateZAInterface() && !callee().isSMEABIRoutine();
- }
-
- bool requiresEnablingZAAfterCall() const {
- return requiresDisablingZABeforeCall();
- }
-
bool requiresPreservingAllZAState() const {
return caller().hasAgnosticZAInterface() &&
!callee().hasAgnosticZAInterface() && !callee().isSMEABIRoutine();
diff --git a/llvm/unittests/Target/AArch64/SMEAttributesTest.cpp b/llvm/unittests/Target/AArch64/SMEAttributesTest.cpp
index f628755c4426f..c98405e4aea23 100644
--- a/llvm/unittests/Target/AArch64/SMEAttributesTest.cpp
+++ b/llvm/unittests/Target/AArch64/SMEAttributesTest.cpp
@@ -230,8 +230,7 @@ TEST(SMEAttributes, Transitions) {
// Normal -> Normal
ASSERT_FALSE(CA(SA::Normal, SA::Normal).requiresSMChange());
ASSERT_FALSE(CA(SA::Normal, SA::Normal).requiresPreservingZT0());
- ASSERT_FALSE(CA(SA::Normal, SA::Normal).requiresDisablingZABeforeCall());
- ASSERT_FALSE(CA(SA::Normal, SA::Normal).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(SA::Normal, SA::Normal).requiresLazySave());
// Normal -> Normal + LocallyStreaming
ASSERT_FALSE(CA(SA::Normal, SA::Normal | SA::SM_Body).requiresSMChange());
@@ -287,30 +286,26 @@ TEST(SMEAttributes, Transitions) {
SA::encodeZT0State(SA::StateValue::In));
// Shared ZA -> Private ZA Interface
- ASSERT_FALSE(CA(ZA_Shared, Private_ZA).requiresDisablingZABeforeCall());
- ASSERT_FALSE(CA(ZA_Shared, Private_ZA).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(ZA_Shared, Private_ZA).requiresPreservingZT0());
+ ASSERT_TRUE(CA(ZA_Shared, Private_ZA).requiresLazySave());
// Shared ZT0 -> Private ZA Interface
- ASSERT_TRUE(CA(ZT0_Shared, Private_ZA).requiresDisablingZABeforeCall());
ASSERT_TRUE(CA(ZT0_Shared, Private_ZA).requiresPreservingZT0());
- ASSERT_TRUE(CA(ZT0_Shared, Private_ZA).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(ZT0_Shared, Private_ZA).requiresLazySave());
// Shared ZA & ZT0 -> Private ZA Interface
- ASSERT_FALSE(CA(ZA_ZT0_Shared, Private_ZA).requiresDisablingZABeforeCall());
ASSERT_TRUE(CA(ZA_ZT0_Shared, Private_ZA).requiresPreservingZT0());
- ASSERT_FALSE(CA(ZA_ZT0_Shared, Private_ZA).requiresEnablingZAAfterCall());
+ ASSERT_TRUE(CA(ZA_ZT0_Shared, Private_ZA).requiresLazySave());
// Shared ZA -> Shared ZA Interface
- ASSERT_FALSE(CA(ZA_Shared, ZT0_Shared).requiresDisablingZABeforeCall());
- ASSERT_FALSE(CA(ZA_Shared, ZT0_Shared).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(ZA_Shared, ZT0_Shared).requiresPreservingZT0());
+ ASSERT_FALSE(CA(ZA_Shared, ZT0_Shared).requiresLazySave());
// Shared ZT0 -> Shared ZA Interface
- ASSERT_FALSE(CA(ZT0_Shared, ZT0_Shared).requiresDisablingZABeforeCall());
ASSERT_FALSE(CA(ZT0_Shared, ZT0_Shared).requiresPreservingZT0());
- ASSERT_FALSE(CA(ZT0_Shared, ZT0_Shared).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(ZT0_Shared, ZT0_Shared).requiresLazySave());
// Shared ZA & ZT0 -> Shared ZA Interface
- ASSERT_FALSE(CA(ZA_ZT0_Shared, ZT0_Shared).requiresDisablingZABeforeCall());
ASSERT_FALSE(CA(ZA_ZT0_Shared, ZT0_Shared).requiresPreservingZT0());
- ASSERT_FALSE(CA(ZA_ZT0_Shared, ZT0_Shared).requiresEnablingZAAfterCall());
+ ASSERT_FALSE(CA(ZA_ZT0_Shared, ZT0_Shared).requiresLazySave());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/192649
More information about the llvm-commits
mailing list