[llvm] [AArch64][SME2] Add ZT0 attributes to SMEAttrs (PR #77607)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 07:15:41 PST 2024
================
@@ -50,6 +54,53 @@ TEST(SMEAttributes, Constructors) {
->getFunction("foo"))
.preservesZA());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_in\"")
+ ->getFunction("foo"))
+ .isZT0In());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_out\"")
+ ->getFunction("foo"))
+ .isZT0Out());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_inout\"")
+ ->getFunction("foo"))
+ .isZT0InOut());
+
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_in\"")
+ ->getFunction("foo"))
+ .sharesZT0());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_out\"")
+ ->getFunction("foo"))
+ .sharesZT0());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_inout\"")
+ ->getFunction("foo"))
+ .sharesZT0());
+ ASSERT_TRUE(SA(*parseIR("declare void @foo() \"aarch64_sme_zt0_preserved\"")
+ ->getFunction("foo"))
+ .sharesZT0());
----------------
sdesmalen-arm wrote:
This is already tested below by e.g. `ASSERT_TRUE(SA(SA::ZT0_In).hasZT0State());`. There is no point in testing that here again (same for most cases below)
https://github.com/llvm/llvm-project/pull/77607
More information about the llvm-commits
mailing list