[clang] [Clang] Check features of tune CPU against target CPU (PR #68861)
Chen Zheng via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 16 20:33:27 PDT 2023
================
@@ -833,6 +833,22 @@ TargetInfo::CreateTargetInfo(DiagnosticsEngine &Diags,
if (!Target->handleTargetFeatures(Opts->Features, Diags))
return nullptr;
+ // If TuneCPU is set, check if it contains all instruction sets needed by
+ // current feature map.
+ if (!Opts->TuneCPU.empty() && Opts->TuneCPU != Opts->CPU) {
----------------
chenzheng1030 wrote:
Can this handle the case that we use default cpu(i.e. no -mcpu set)?
https://github.com/llvm/llvm-project/pull/68861
More information about the cfe-commits
mailing list