================ @@ -4303,21 +4288,15 @@ void CodeGenModule::emitMultiVersionFunctions() { continue; llvm::Function *Func = createFunction(CurFD, I); - StringRef Architecture; Feats.clear(); - if (getTarget().getTriple().isAArch64()) - TC->getFeatures(Feats, I); - else if (getTarget().getTriple().isRISCV()) { - StringRef Version = TC->getFeatureStr(I); - Feats.push_back(Version); + if (getTarget().getTriple().isX86()) { + TC->getAddedFeatures(Feats, I); ---------------- phoebewang wrote:
Do you mean in the first case, `I` actually points to `arch=sandybridge,default,sse4.2` rather than `arch=sandybridge`? If it is true, I think that's something we need to pre-process in general instead of specialize to X86. X86 just needs to handle `Architecture` here. https://github.com/llvm/llvm-project/pull/116257 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits