================
@@ -1802,9 +1854,29 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, 
ACLEKind Kind) {
 
     if (Def->isFlagSet(IsStreamingFlag))
       StreamingMap["ArmStreaming"].insert(Def->getMangledName());
-    else if (Def->isFlagSet(VerifyRuntimeMode))
+    else if (Def->isFlagSet(VerifyRuntimeMode)) {
+      // Verify that the target guards contain at least one feature that
+      // actually enables SVE or SME (explicitly, or implicitly). This is 
needed
+      // for the code in SemaARM.cpp (checkArmStreamingBuiltin) that checks
+      // whether the required runtime mode for an intrinsic matches with the
+      // given set of target features and function attributes.
+      //
+      // The feature lists below must match the disabled features in
+      // 'checkArmStreamingBuiltin'!
+      if (!Def->getSVEGuard().empty() &&
+          !verifyGuard(Def->getSVEGuard(),
+                       {"sve", "sve2", "sve2p1", "sve2-aes", "sve2-sha3",
----------------
SpencerAbson wrote:

I think we should need to have `"f32mm"` and  `"f64mm"` here (and the 
`CallerFeatureMapWithoutSVE` part). This works at the moment as the only 
intrinsics that have these in their target-guard also redundantly include `sve` 
and are invalid in streaming mode.





https://github.com/llvm/llvm-project/pull/109420
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to