[clang] [X86] Ignore invalid features in FMV priority (PR #172844)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 2 17:59:50 PDT 2026


================
@@ -1371,7 +1371,9 @@ llvm::APInt X86TargetInfo::getFMVPriority(ArrayRef<StringRef> Features) const {
 
   unsigned Priority = 0;
   for (StringRef Feature : Features)
-    if (!Feature.empty())
+    if (!Feature.empty() &&
+        (llvm::X86::parseArchX86(Feature) != llvm::X86::CK_None ||
----------------
phoebewang wrote:

This is checked in line 1363. Maybe move `validateCpuSupports(Feature)` check into getPriority?

https://github.com/llvm/llvm-project/pull/172844


More information about the cfe-commits mailing list