[PATCH] D76508: [VectorUtils] move x86's scaleShuffleMask to generic VectorUtils
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 10:40:37 PDT 2020
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Thanks, that helped convince me of this not being endian-specific.
LG
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19759-19760
- auto ScaleShuffleMask = [](ArrayRef<int> Mask, int Scale) {
- if (Scale == 1)
- return SmallVector<int, 8>(Mask.begin(), Mask.end());
-
----------------
Do we want to preserve fastpath?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19765
- for (int s = 0; s != Scale; ++s)
- NewMask.push_back(M < 0 ? -1 : Scale * M + s);
- return NewMask;
----------------
I'd personally keep ternary variant, not have two loops.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76508/new/
https://reviews.llvm.org/D76508
More information about the llvm-commits
mailing list