[llvm] [PowerPC][AIX] Update the initial CPU type for AIX. (PR #102277)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 19:06:07 PDT 2024
================
@@ -84,6 +85,8 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef TuneCPU,
CPUName = "ppc64le";
else if (TargetTriple.getSubArch() == Triple::PPCSubArch_spe)
CPUName = "e500";
+ else if (TargetTriple.isOSAIX() && CPUName.empty())
+ CPUName = std::string(PPC::getNormalizedPPCTargetCPU(TargetTriple));
----------------
chenzheng1030 wrote:
For triple `ppc64le`, `getNormalizedPPCTargetCPU()` returns expected CPUName, `ppc64le`.
Will there be any issues if we just use: (We should use same CPU for clang and llc on all targets. )
```
if (CPUName.empty() || CPU == "generic") {
if (TargetTriple.getSubArch() == Triple::PPCSubArch_spe)
CPUName = "e500";
else
CPUName = std::string(PPC::getNormalizedPPCTargetCPU(TargetTriple));
}
```
https://github.com/llvm/llvm-project/pull/102277
More information about the llvm-commits
mailing list