[PATCH] D89727: [PowerPC] Fix the Predicates for enabling pcrelative-memops and PLXVP/PSTXVP definitions

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 22:24:59 PDT 2020


steven.zhang added a comment.

Test is missing. Please add a test to turn off the prefix instr to see if PLXVP disappear. And we have code like this, please double confirm if it is guarded by proper feature.

  // If we encounter an LXVP/STXVP with an offset that doesn't fit, we can
  // transform it to the prefixed version so we don't have to use the XForm.
  if ((OpC == PPC::LXVP || OpC == PPC::STXVP) &&
      (!isInt<16>(Offset) || (Offset % offsetMinAlign(MI)) != 0)) {
    unsigned NewOpc = OpC == PPC::LXVP ? PPC::PLXVP : PPC::PSTXVP;
    MI.setDesc(TII.get(NewOpc));
    OpC = NewOpc;
  }



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:1412
+
+let mayLoad = 1, mayStore = 0, hasSideEffects = 0, Predicates = [PairedVectorMemops, PrefixInstrs] in {
+  defm PLXVP :
----------------
amyk wrote:
> Question: is the `hasSideEffects` necessary?
Yes, it is needed as load/store instr also may have the sideeffects.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89727



More information about the llvm-commits mailing list