[PATCH] D129647: [X86] Use generic tuning for "x86-64" if "tune-cpu" is not specified
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 08:48:47 PDT 2022
craig.topper added a comment.
This comment in X86.td is wrong now
// NOTE: As a default tuning, "generic" aims to produce code optimized for the
// most common X86 processors. The tunings might be changed over time. It is
// recommended to use "x86-64" in lit tests for consistency.
================
Comment at: llvm/lib/Target/X86/X86TargetMachine.cpp:257
CPUAttr.isValid() ? CPUAttr.getValueAsString() : (StringRef)TargetCPU;
- StringRef TuneCPU =
- TuneAttr.isValid() ? TuneAttr.getValueAsString() : (StringRef)CPU;
+ StringRef TuneCPU = TuneAttr.isValid() ? TuneAttr.getValueAsString()
+ : CPU == "x86-64" ? "generic"
----------------
Probably worth a comment here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129647/new/
https://reviews.llvm.org/D129647
More information about the llvm-commits
mailing list