================
@@ -781,6 +781,30 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver
&D,
if (FPUKind == llvm::ARM::FK_FPV5_D16 || FPUKind ==
llvm::ARM::FK_FPV5_SP_D16)
Features.push_back("-mve.fp");
+ // If SIMD has been disabled and the selected FPU support NEON, then features
+ // that rely on NEON Instructions should also be disabled. Cases where NEON
+ // needs activating to support another feature is handled below with the
+ // crypto feature.
+ bool HasSimd = false;
+ const auto ItSimd =
+ llvm::find_if(llvm::reverse(Features),
+ [](const StringRef F) { return F.contains("neon"); });
+ const bool FoundSimd = ItSimd != Features.rend();
+ const bool FPUSupportsNeon = (llvm::ARM::FPUNames[FPUKind].NeonSupport ==
+ llvm::ARM::NeonSupportLevel::Neon) ||
+ (llvm::ARM::FPUNames[FPUKind].NeonSupport ==
+ llvm::ARM::NeonSupportLevel::Crypto);
+ if (FoundSimd)
----------------
Stylie777 wrote:
Done
https://github.com/llvm/llvm-project/pull/137595
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits