[PPC][AIX] Fix toc-data peephole bug and some related cleanup.
Set the ReplaceFlags variable to false, since there is code meant only for the ADDItocHi/ADDItocL nodes. This has the side effect of disabling the peephole when the load/store instruction has a non-zero offset. This patch also fixes retrieving the `ImmOpnd` node from the AIX small code model pseduos 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. Fixes https://github.com/llvm/llvm-project/issues/63927 Differential Revision: https://reviews.llvm.org/D155957
Loading
Please sign in to comment