[clang] [llvm] [PowerPC][AIX] 64-bit large code-model support for toc-data (PR #90619)
Chen Zheng via cfe-commits
cfe-commits at lists.llvm.org
Wed May 15 19:26:15 PDT 2024
================
@@ -6167,16 +6166,12 @@ void PPCDAGToDAGISel::Select(SDNode *N) {
SDNode *Tmp = CurDAG->getMachineNode(
isPPC64 ? PPC::ADDIStocHA8 : PPC::ADDIStocHA, dl, VT, TOCbase, GA);
- // On AIX if the symbol has the toc-data attribute it will be defined
- // in the TOC entry, so we use an ADDItocL similar to the medium code
- // model ELF abi.
+ // On AIX, if the symbol has the toc-data attribute it will be defined
+ // in the TOC entry, so we use an ADDItocL/ADDItocL8.
if (isAIXABI && hasTocDataAttr(GA)) {
- if (isPPC64)
- report_fatal_error(
- "64-bit large code model toc-data not yet supported");
-
- ReplaceNode(N, CurDAG->getMachineNode(PPC::ADDItocL, dl, VT,
- SDValue(Tmp, 0), GA));
+ ReplaceNode(
+ N, CurDAG->getMachineNode(isPPC64 ? PPC::ADDItocL8 : PPC::ADDItocL,
+ dl, VT, SDValue(Tmp, 0), GA));
----------------
chenzheng1030 wrote:
nit: I suggest to add an assert like `assert(!isPPC64 && ...)` before line 6188 which assumes 32-bit linux/aix are already handled, so it uses `ADDItocL8` directly.
https://github.com/llvm/llvm-project/pull/90619
More information about the cfe-commits
mailing list