================
@@ -3581,6 +3556,16 @@ bool 
CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD,
       Attrs.addAttribute("fmv-features", FMVFeatures.substr(1));
       AddedAttr = true;
     }
+  } else if (getTarget().getTriple().isX86() && getTarget().supportsIFunc() &&
+             TC) {
+    auto Arch = TC->getX86Architecture(GD.getMultiVersionIndex());
+    // CPU-model checks cannot be represented by feature masks.
----------------
adamant-pwn wrote:

`arch=haswell` selects by CPU identity. Another CPU can support the same ISA 
features without satisfying that predicate, so representing it as a feature 
mask could select the wrong clone. I've expanded the comment to explain why 
these versions retain runtime dispatch.

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

Reply via email to