[clang] [RISCV][FMV] Support target_version (PR #99040)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 19 15:47:59 PDT 2024
================
@@ -4268,8 +4268,12 @@ void CodeGenModule::emitMultiVersionFunctions() {
} else if (const auto *TVA = CurFD->getAttr<TargetVersionAttr>()) {
if (TVA->isDefaultVersion() && IsDefined)
ShouldEmitResolver = true;
- TVA->getFeatures(Feats);
llvm::Function *Func = createFunction(CurFD);
+ if (getTarget().getTriple().isRISCV()) {
+ Feats.push_back(TVA->getName());
+ } else {
+ TVA->getFeatures(Feats);
----------------
topperc wrote:
Add an assert here that the target is AArch64
https://github.com/llvm/llvm-project/pull/99040
More information about the cfe-commits
mailing list