[PATCH] D77448: [PowerPC] Canonicalize shuffles to match more single-instruction masks on LE
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 23:57:46 PDT 2020
amyk added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:13850
+SDValue PPCTargetLowering::combineVectorShuffle(ShuffleVectorSDNode *SVN,
+ SelectionDAG &DAG) const {
+ SDValue LHS = SVN->getOperand(0);
----------------
I see that our other combine functions have an assert in the beginning checking the opcode. It might make sense to have one here checking `SVN->getOpcode() == ISD::VECTOR_SHUFFLE`?
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:13868
+ }
+ bool IsLHSSplat = isSplatBV(LHS);
+ bool IsRHSSplat = isSplatBV(RHS);
----------------
Is it possible to add a comment regarding the splats here? Or is the comment above supposed to explain this bit, too?
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:13884
+ // and we have elements coming in from the splat at indices that are not
+ // condusive to using a merge.
+ // Example:
----------------
s/condusive/conducive
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77448/new/
https://reviews.llvm.org/D77448
More information about the llvm-commits
mailing list