================
@@ -130,17 +131,35 @@ bool X86TargetInfo::initFeatureMap(
       continue;
     }
 
-    if (!HasAVX512F && Feature.substr(0, 7) == "+avx512")
+    if (Feature.substr(0, 7) == "+avx10.") {
+      HasAVX10 = true;
       HasAVX512F = true;
-    if (HasAVX512F && Feature == "-avx512f")
+      if (Feature.substr(Feature.size() - 3, 3) == "512") {
+        HasEVEX512 = true;
+      } else if (Feature.substr(7, 2) == "1-") {
+        HasEVEX512 = false;
+      }
+    } else if (!HasAVX512F && Feature.substr(0, 7) == "+avx512") {
+      HasAVX512F = true;
+    } else if (HasAVX512F && Feature == "-avx512f") {
+      HasAVX512F = false;
+    } else if (HasAVX10 && Feature == "-avx10.1-256") {
+      HasAVX10 = false;
       HasAVX512F = false;
-    if (HasEVEX512 && Feature == "-evex512")
+    } else if (!HasEVEX512 && Feature == "+evex512") {
+      HasEVEX512 = true;
+    } else if (HasEVEX512 && Feature == "-avx10.1-512") {
----------------
e-kud wrote:

`+avx10.1-512,-avx10.1-512` effectively means `+avx10.1-256`?

Generally, when I see such flag dangling, I'm used to thinking there is likely 
to be a bug. Do we have some reasoning that it is correct? Or maybe it's just 
my internal bias.

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

Reply via email to