[llvm] [AArch64] Check for streaming mode in HasSME* features. (PR #96302)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 06:29:15 PDT 2024
================
@@ -141,35 +141,41 @@ def HasSPE : Predicate<"Subtarget->hasSPE()">,
def HasFuseAES : Predicate<"Subtarget->hasFuseAES()">,
AssemblerPredicateWithAll<(all_of FeatureFuseAES),
"fuse-aes">;
-def HasSVE : Predicate<"Subtarget->hasSVE()">,
+def HasSVE : Predicate<"Subtarget->isSVEAvailable()">,
AssemblerPredicateWithAll<(all_of FeatureSVE), "sve">;
-def HasSVE2 : Predicate<"Subtarget->hasSVE2()">,
+def HasSVE2 : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2), "sve2">;
-def HasSVE2p1 : Predicate<"Subtarget->hasSVE2p1()">,
+def HasSVE2p1 : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2p1()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2p1), "sve2p1">;
-def HasSVE2AES : Predicate<"Subtarget->hasSVE2AES()">,
+def HasSVE2AES : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2AES()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2AES), "sve2-aes">;
-def HasSVE2SM4 : Predicate<"Subtarget->hasSVE2SM4()">,
+def HasSVE2SM4 : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2SM4()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2SM4), "sve2-sm4">;
-def HasSVE2SHA3 : Predicate<"Subtarget->hasSVE2SHA3()">,
+def HasSVE2SHA3 : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2SHA3()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2SHA3), "sve2-sha3">;
-def HasSVE2BitPerm : Predicate<"Subtarget->hasSVE2BitPerm()">,
+def HasSVE2BitPerm : Predicate<"Subtarget->isSVEAvailable() && Subtarget->hasSVE2BitPerm()">,
AssemblerPredicateWithAll<(all_of FeatureSVE2BitPerm), "sve2-bitperm">;
def HasB16B16 : Predicate<"Subtarget->hasB16B16()">,
AssemblerPredicateWithAll<(all_of FeatureB16B16), "b16b16">;
-def HasSME : Predicate<"Subtarget->hasSME()">,
+def HasSMEandIsNonStreamingSafe
+ : Predicate<"Subtarget->hasSME()">,
AssemblerPredicateWithAll<(all_of FeatureSME), "sme">;
-def HasSMEF64F64 : Predicate<"Subtarget->hasSMEF64F64()">,
+def HasSME : Predicate<"Subtarget->isStreaming() && Subtarget->hasSME()">,
+ AssemblerPredicateWithAll<(all_of FeatureSME), "sme">;
+def HasSMEF64F64 : Predicate<"Subtarget->isStreaming() && Subtarget->hasSMEF64F64()">,
AssemblerPredicateWithAll<(all_of FeatureSMEF64F64), "sme-f64f64">;
-def HasSMEF16F16 : Predicate<"Subtarget->hasSMEF16F16()">,
+def HasSMEF16F16 : Predicate<"Subtarget->isStreaming() && Subtarget->hasSMEF16F16()">,
AssemblerPredicateWithAll<(all_of FeatureSMEF16F16), "sme-f16f16">;
-def HasSMEFA64 : Predicate<"Subtarget->hasSMEFA64()">,
+def HasSMEFA64 : Predicate<"Subtarget->isStreaming() && Subtarget->hasSMEFA64()">,
----------------
paulwalker-arm wrote:
FYI: I'm happy enough but part of me thinks this feature doesn't care about streaming mode, or rather I'd be surprised if we ever use this predicate to protect any isel directly. Either way I'm just going to ignore it.
https://github.com/llvm/llvm-project/pull/96302
More information about the llvm-commits
mailing list