[PATCH] D133524: [SLP]Improve reordering of clustered reused scalars.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 09:36:01 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/IR/Instructions.cpp:2573
+bool ShuffleVectorInst::isOneUseSingleSourceMask(ArrayRef<int> Mask, int VF) {
+ if (VF <= 1 || Mask.size() < static_cast<unsigned>(VF) ||
+ Mask.size() % VF != 0)
----------------
Is it going to be a problem to refactor this back to the old bitmask approach to allow VF == 1? I can think of cases where we're going to want to match this to <1,0,2,3> style permutes without any clustering.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3892
+ OpTE->getVectorFactor() == ExtOrder.size() ? ExtOrder
+ : OrdersType(),
+ 0))
----------------
Pull the ternary operator out - this should make the code easier to grok.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133524/new/
https://reviews.llvm.org/D133524
More information about the llvm-commits
mailing list