================
@@ -257,21 +258,11 @@ void x86::getX86TargetFeatures(const Driver &D, const 
llvm::Triple &Triple,
 
     if (A->getOption().matches(options::OPT_mapxf) ||
         A->getOption().matches(options::OPT_mno_apxf)) {
-      if (IsNegative) {
-        Features.insert(Features.end(),
-                        {"-egpr", "-ndd", "-ccmp", "-nf", "-zu"});
-        if (!Triple.isOSWindows())
-          Features.insert(Features.end(), {"-push2pop2", "-ppx"});
-      } else {
-        Features.insert(Features.end(),
-                        {"+egpr", "+ndd", "+ccmp", "+nf", "+zu"});
-        if (!Triple.isOSWindows())
-          Features.insert(Features.end(), {"+push2pop2", "+ppx"});
-
-        if (Not64Bit)
-          D.Diag(diag::err_drv_unsupported_opt_for_target)
-              << StringRef("-mapxf") << Triple.getTriple();
-      }
+      llvm::X86::expandAPXFeatures(IsNegative ? "-apxf" : "+apxf", Triple,
----------------
phoebewang wrote:

We should avoid constract and pass the strings. Just bool `IsNegative` is 
better.

https://github.com/llvm/llvm-project/pull/184078
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to