[PATCH] D77646: [PowerPC] Fold vector merges of swapped vectors to merge the opposite half

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 22:08:49 PDT 2020


amyk added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:317
+
+Register
+PPCMIPeephole::getVecCopyOrSubregToReg(MachineInstr &MI, Register SrcReg,
----------------
I think it would be good to document this function, as other `PPCMIPeephole::` functions are also documented.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:658
       }
+      case PPC::VMRGLB:
+      case PPC::VMRGHB:
----------------
Just curious but does `vmrg[e | o]w` apply here, too?


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:702
+        switch (MI.getOpcode()) {
+        case PPC::VMRGLB:
+          NewOpc = PPC::VMRGHB;
----------------
Minor nit, but maybe reorder the cases the same way as how they're presented in the cases above?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77646





More information about the llvm-commits mailing list