[PATCH] D111258: [PowerPC] Emit dcbt and dcbtst in place of their extended mnemonics on AIX

Jinsong Ji via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 6 12:59:02 PDT 2021


jsji accepted this revision as: jsji.
jsji added a comment.
This revision is now accepted and ready to land.

Thanks for working on this.



================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp:161
   //  where th can be omitted when it is 0. dcbtst is the same.
-  if (MI->getOpcode() == PPC::DCBT || MI->getOpcode() == PPC::DCBTST) {
+  // TODO: AIX still requires dcbtt and dcbtstt implementation,
+  // remove AIX OS check when dcbtt and dcbtstt become available.
----------------
What do you mean by `still requires dcbtt and dcbtstt implementation`?


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp:164
+  if ((MI->getOpcode() == PPC::DCBT || MI->getOpcode() == PPC::DCBTST) &&
+      !TT.isOSAIX()) {
     unsigned char TH = MI->getOperand(0).getImm();
----------------
I think it is better to use the same condition as `ModernAs` Predicate , so that we may be able to enable it with feature bit if needed.
```
(!TT.isOSAIX() || STI.getFeatureBits()[PPC::HasModernAIXAs])
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111258



More information about the cfe-commits mailing list