================
@@ -151,16 +151,7 @@ void x86::getX86TargetFeatures(const Driver &D, const 
llvm::Triple &Triple,
   }
 
   const llvm::Triple::ArchType ArchType = Triple.getArch();
-  bool HasEGPR = false;
-
-  // -ffixed-r16 through -ffixed-r31 are only valid when the selected x86_64
-  // CPU enables APX EGPR by default; later -target-feature arguments still get
-  // their own validation when translated to backend features.
-  if (ArchType == llvm::Triple::x86_64) {
-    SmallVector<StringRef, 16> CPUFeatures;
-    llvm::X86::getFeaturesForCPU(getX86TargetCPU(D, Args, Triple), 
CPUFeatures);
-    HasEGPR = llvm::is_contained(CPUFeatures, "+egpr");
-  }
+  std::optional<bool> HasEGPR;
----------------
aengelke wrote:

std::optional<bool> only invites for mistakes (e.g. `if (HasEGPR)` returns true 
even if the stored value is false).

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

Reply via email to