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

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 00:31:44 PST 2022


shchenz added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:10063
+  // cheaper to use load+vperm.
+  if (!MaskMap[PermMask].second) {
+    unsigned PFIndexes[4];
----------------
qiucf wrote:
> 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.
yes, right, I mean we first check the expressions which have lower complexity.


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