[PATCH] D116801: [PowerPC] Avoid perfect shuffle when mask has multiple uses

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 9 21:21:05 PST 2022


qiucf marked an inline comment as done.
qiucf added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10063
+  // cheaper to use load+vperm.
+  if (!MaskMap[PermMask].second) {
+    unsigned PFIndexes[4];
----------------
shchenz wrote:
> Can we first check `isLittleEndian` and then `isFourElementShuffle` and then `MaskMap[PermMask].second` to improve the compile time?
`isFourElementShuffle` is also computed, when we think it's unprofitable to do perfect shuffle, it's meaningless to compute it.

Do you mean we check endian first, and only calculate `MaskMap` on big endian? That may improve compile time, but only before little-endian perfect shuffles are implemented.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116801



More information about the llvm-commits mailing list