[PATCH] D139691: [PowerPC] add a peephole to remove redundant swap instructions after vector splats on P8

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 19:02:04 PST 2022


tingwang added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:647
           LLVM_DEBUG(MI.dump());
+        } else if (Immed == 2 &&
+                   (DefOpc == PPC::VSPLTB || DefOpc == PPC::VSPLTH ||
----------------
shchenz wrote:
> Can this branch be merged to the above one at line 627? Splat a double word and the double word is a splat of a small unit should also can be removed?
Sure, I can do the merge to reuse logic. 

Are you referring to instructions like xxspltib? I think those are introduced in v3.0, and they will not appear on P8, so I did not include those.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139691



More information about the llvm-commits mailing list