[PATCH] D155957: [PPC][AIX] Fix toc-data peephole bug and some related cleanup.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 07:54:42 PDT 2023


sfertile created this revision.
sfertile added reviewers: stefanp, hubert.reinterpretcast, syzaara.
Herald added subscribers: shchenz, kbarton, hiraditya, nemanjai.
Herald added a project: All.
sfertile requested review of this revision.
Herald added a project: LLVM.

Set the ReplaceFlags variable to false, since there is code meant only for the ADDItocHi/ADDItocL nodes guarded by this. This has the side effect of disabling the peephole on AIX when the load/store instruction has a non-zero offset fixing the bug reported in . This patch also fixes retrieving the `ImmOpnd` node from the AIX small code model pseudos and does the same for the register operand node. This allows cleaning up the later calls to replaceOperands. Finally move calculating the MaxOffset into the code guarded by ReplaceFlags as it is only used there and the comment is specific to the ELF ABI.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155957

Files:
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/test/CodeGen/PowerPC/aix-toc-data-offset.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155957.542913.patch
Type: text/x-patch
Size: 4362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/7027914f/attachment.bin>


More information about the llvm-commits mailing list