================ @@ -717,6 +716,16 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, } while (!Ext.empty()); } + // We add Zicsr/Zifenci as final to allow duplicated "zicsr"/"zifencei" like + // "rv64g_zicsr_zifencei". + if (Baseline == 'g') { + for (const char *Ext : RISCVGImplicationsZi) { + auto Version = findDefaultVersion(Ext); + assert(Version && "Default extension version not found?"); + ISAInfo->Exts[std::string(Ext)] = {Version->Major, Version->Minor}; ---------------- topperc wrote:
Maybe we should skip this assignment if it is already in the string. The user could pass a different version number than the default. Though we only allow the default version from the user today. https://github.com/llvm/llvm-project/pull/136842 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits