This patch simply adds support for the new CPU in anticipation of
Power10. There isn't really any functionality added so there are no
associated test cases at this time.
Details
- Reviewers
stefanp nemanjai amyk hfinkel power-llvm-team - Group Reviewers
Restricted Project - Commits
- rG2368bf52cd77: [PowerPC] Add support for -mcpu=pwr10 in both clang and llvm
rG7eb666b1556b: [PowerPC] Add support for -mcpu=pwr10 in both clang and llvm
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I believe we're also missing IsISA3_1 = false; in PPCSubtarget.cpp.
llvm/lib/Target/PowerPC/PPC.td | ||
---|---|---|
338 ↗ | (On Diff #264303) | Are we missing FeatureISA3_1 in P10AdditionalFeatures? |
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
272 | Well, pls ignore this comments as that macro should be added when p10 vector feature is added. |
clang/test/Preprocessor/init-ppc64.c | ||
---|---|---|
652 ↗ | (On Diff #264303) | |
llvm/lib/Target/PowerPC/PPC.td | ||
340 ↗ | (On Diff #264303) | I think these can be moved up to P10AdditionalFeatures. That way everything on P10 is now inheritable by future and we don't have to specify anything for FutureSpecificFeatures. |
351 ↗ | (On Diff #264303) | These features are now no longer FutureSpecificFeatures I would think that they would now be part of Power10 and should be inherited by future CPU. |
llvm/test/CodeGen/PowerPC/check-cpu.ll | ||
11 ↗ | (On Diff #264303) | nit: |
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
345 | I think we also need to check for ArchDefinePwr10 and ArchDefineFuture based on the comment "// We have __float128 on PPC but not power 9 and above." !(ArchDefs & ArchDefinePwr9) -> !(ArchDefs & (ArchDefinePwr9 | ArchDefinePwr10 | ArchDefineFuture)) |
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
345 | Yeah. That makes sense. Thanks for the explanation! |
LGTM aside from a couple of minor nits.
clang/lib/Basic/Targets/PPC.cpp | ||
---|---|---|
319 | Please remove this since HTM was removed in P10. | |
clang/test/Preprocessor/init-ppc64.c | ||
644 ↗ | (On Diff #266073) | I am not sure what the story is with not checking for _ARCH_PWR8 for the P9 test, but I don't think we need to continue that precedent. |
I think this looks good aside from the comments I had.
llvm/lib/Target/PowerPC/PPCSubtarget.h | ||
---|---|---|
142 ↗ | (On Diff #266073) | Missing IsISA3_1 = false; in PPCSubtarget.cpp. |
Do we miss to define this macro ?