[PATCH] D93370: [PowerPC] Add new infrastructure to select load/store instructions, update P8/P9 load/store patterns.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 17:26:55 PST 2020


amyk added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.h:698
+
+      // Subtarget features.
+      MOF_SubtargetNoP9 = 1 << 26,
----------------
shchenz wrote:
> The following features should not be associated to one specific memory operation? Should we add them into the flag set of each memory operation in `computeMOFlags`? Is it possible to get the sub-target info when we do am selection after we get all flags?
I apologize, I think I do not quite follow. If you could clarify, that would be great.

Are you suggesting that these should not be flags, but more of Subtarget checks after the flags are computed?

I think it can be useful to store the subtarget information in the set of flags is that we can easily know which instructions we can produce on P9 and P10. 

I was thinking for instance, if we have flags set for `SubtargetP9`, `ScalFlt` and `RPlusSImm16Mult4` (register + signed 16 bit immediate, multiple of 4), then we know we can generate the DS-Form (corresponding to `DFLOAD` pseudoinstruction. Or, when we have `PPC::MOF_SubtargetP10` and `PPC::MOF_RPlusSImm34` (signed 34-bit immediate), we can know we can generate prefixed load/stores.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93370



More information about the llvm-commits mailing list