================
@@ -690,6 +698,19 @@ bool PPCTargetInfo::initFeatureMap(
     return false;
   }
 
+  if (llvm::is_contained(FeaturesVec, "-hard-float")) {
----------------
chenzheng1030 wrote:

After another look, I still think this should be done in 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/PPC.cpp#L783-L789,
 with changes like:
```diff
@@ -802,11 +803,15 @@ void 
PPCTargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
       Features["efpu2"] = false;
     // If we're disabling altivec or vsx go ahead and disable all of the vsx
     // features.
-    if ((Name == "altivec") || (Name == "vsx"))
+    if ((Name == "altivec") || (Name == "vsx") || (Name == "hard-float")) {
+      if (Name != "vsx")
+        Features["altivec"] = Features["crypto"] = false;
```

What do you think?

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

Reply via email to