[PATCH] D95458: [PowerPC] Exploit xxsplti32dx (constant materialization) for scalars

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 09:38:47 PST 2021


amyk added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:1885
 
+let isReMaterializable = 1, isMoveImm = 1, Predicates = [PrefixInstrs] in {
+  def XXSPLTI32DX :
----------------
I think it might be good to add a comment of why the `XXSPLTI32DX` instruction needs to be split out like this from the other instructions.


================
Comment at: llvm/test/CodeGen/PowerPC/pcrel-linkeropt.ll:41
+; which is defined between the pld and the stb.
+; In this test the stb r3, 0(r4) cannot be optimized because it
+; uses the register r3 and that register is defined by lbz r3, 0(r3)
----------------
nit: Remove duplicate comment.


================
Comment at: llvm/test/CodeGen/PowerPC/pcrel-linkeropt.ll:63
+; which is defined between the pld and the sth.
+; In this test the sth r3, 0(r4) cannot be optimized because it
+; uses the register r3 and that register is defined by lhz r3, 0(r3)
----------------
nit: Remove duplicate comment.


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

https://reviews.llvm.org/D95458



More information about the llvm-commits mailing list