[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 08:23:08 PST 2024
================
@@ -6376,6 +6409,10 @@ unsigned BoUpSLP::canMapToVector(Type *T) const {
bool BoUpSLP::canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
SmallVectorImpl<unsigned> &CurrentOrder,
bool ResizeAllowed) const {
+ // TODO: Reusing extracts is not supported yet for non-power-of-2 ops.
+ if (!isPowerOf2_32(VL.size()))
+ return false;
+
----------------
fhahn wrote:
Moved to caller, and added a check to `BoUpSLP::getReorderingData`.
https://github.com/llvm/llvm-project/pull/77790
More information about the llvm-commits
mailing list