[libc-commits] [clang] [libc] [flang] [clang-tools-extra] [llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)
Florian Hahn via libc-commits
libc-commits at lists.llvm.org
Fri Feb 2 08:33:11 PST 2024
================
@@ -10654,7 +10703,16 @@ template <typename BVTy, typename ResTy, typename... Args>
ResTy BoUpSLP::processBuildVector(const TreeEntry *E, Args &...Params) {
assert(E->State == TreeEntry::NeedToGather && "Expected gather node.");
unsigned VF = E->getVectorFactor();
-
+ BVTy ShuffleBuilder(Params...);
+ // FIXME: Only full gathering is implemented for non-power-of-2 nodes at the
+ // moment.
+ if (E->isNonPowOf2Vec()) {
+ Value *BV = ShuffleBuilder.gather(E->Scalars);
+ SmallVector<int> Mask(VF, PoisonMaskElem);
+ std::iota(Mask.begin(), Mask.end(), 0);
+ ShuffleBuilder.add(BV, Mask);
+ return ShuffleBuilder.finalize({});
----------------
fhahn wrote:
Adusted, thanks
https://github.com/llvm/llvm-project/pull/77790
More information about the libc-commits
mailing list