[llvm] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 04:02:17 PST 2024
================
@@ -5748,7 +5775,8 @@ BoUpSLP::TreeEntry::EntryState BoUpSLP::getScalarsVectorizationState(
case Instruction::ExtractValue:
case Instruction::ExtractElement: {
bool Reuse = canReuseExtract(VL, VL0, CurrentOrder);
- if (Reuse || !CurrentOrder.empty())
+ // FIXME: Vectorizing is not supported yet for non-power-of-2 ops.
+ if (isPowerOf2_32(VL.size()) && (Reuse || !CurrentOrder.empty()))
----------------
alexey-bataev wrote:
```suggestion
// FIXME: Vectorizing is not supported yet for non-power-of-2 ops.
if (!isPowerOf2_32(VL.size())
return TreeEntry::NeedToGather;
bool Reuse = canReuseExtract(VL, VL0, CurrentOrder);
if (Reuse || !CurrentOrder.empty())
```
https://github.com/llvm/llvm-project/pull/77790
More information about the llvm-commits
mailing list