craig.topper added a comment. This doesn't seem correct
What's the priority among those options for now(w/o this patch)? Pipeline model: Take from -mtune if present. Take from -mcpu if present Use the default pipeline model: generic-rv32 or generic-rv64 Architecture extension: Take from -mcpu if present. Take from -march if present. Use the default architecture depending on the target triple The code in `riscv::getRISCVArch` prioritizes -march over -mcpu for architecture extensions for setting -target-features. But the backend still applies extensions from -target-cpu via the tablegen features from RISCV.td. So its not even a "priority", we end up with a union. ================ Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5457 + // RISC-V will handle -mcpu option in Clang::AddRISCVTargetArgs. + if (!Triple.isRISCV()) { + // Add the target cpu ---------------- I wonder if we should stop getCPUName from calling `getRISCVTargetCPU` instead? Have you audited all callers of getCPUName? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140693/new/ https://reviews.llvm.org/D140693 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits