================
@@ -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-") {
----------------
phoebewang wrote:

We have convention that features are independent to each other and can be 
combined as a union set.
For example, when you specify `-mavx2 -mfma`, you will enable both features 
rather than disabling AVX2, though FMA only imply AVX1.
Similarly, we should avoid to disable `avx10.1-512` in combination of 
`-mavx10.1-512 -mavx10.2-256` just because `avx10.2-256` only implies 
`avx10.1-256`.

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