[PATCH] D101470: [XCOFF][AIX] Peephole optimization for small code model TocData transformations

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 08:11:17 PDT 2023


stefanp accepted this revision.
stefanp added a comment.
This revision is now accepted and ready to land.

I have one minor nit and that's it. Otherwise LGTM.



================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7651
+    const bool OpcodeIsAIXTocData =
+        BaseOpcode == PPC::ADDItoc || BaseOpcode == PPC::ADDItoc8;
+
----------------
nit:
Just add a comment here to say that `PPC::ADDItoc` and `PPC::ADDItoc8` are only used for AIX small code model.
It's not obvious from the name of the pseudo instruction so this tripped me up initially. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101470/new/

https://reviews.llvm.org/D101470



More information about the llvm-commits mailing list