================
@@ -659,13 +659,21 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver 
&D,
         CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : 
ArchArgFPUKind;
     (void)llvm::ARM::getFPUFeatures(FPUKind, Features);
   } else {
+    bool Generic = true;
     if (!ForAS) {
       std::string CPU = arm::getARMTargetCPU(CPUName, ArchName, Triple);
+      if (CPU != "generic")
+        Generic = false;
----------------
mstorsjo wrote:

Btw, I do feel that this logic where we explicitly look for `"generic"` is a 
bit kludgey. It would be slightly neater to just stick this into the existing 
Android case above (at lines 650-655) - but then the default-neon case 
overrides arch/os default CPUs from `getLLVMArchKindForARM`, which shows up as 
different output for `%clang -target x86_64-apple-macosx10.10 -arch armv7s` in 
`arm-target-features.c` below (where the default cpu for `armv7s` includes fp16 
support).

I'm open to opinions on what's the least ugly compromise here. :-)

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

Reply via email to