[llvm] [LV]: Teach LV to recursively (de)interleave. (PR #89018)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 08:53:49 PST 2024
================
@@ -2773,10 +2773,22 @@ static Value *interleaveVectors(IRBuilderBase &Builder, ArrayRef<Value *> Vals,
// Scalable vectors cannot use arbitrary shufflevectors (only splats), so
// must use intrinsics to interleave.
if (VecTy->isScalableTy()) {
- VectorType *WideVecTy = VectorType::getDoubleElementsVectorType(VecTy);
- return Builder.CreateIntrinsic(WideVecTy, Intrinsic::vector_interleave2,
- Vals,
- /*FMFSource=*/nullptr, Name);
+ unsigned InterleaveFactor = Vals.size();
+ SmallVector<Value *> InterleavingValues(Vals);
+ // As we are interleaving, the values sz will be shrinked until we have the
----------------
paulwalker-arm wrote:
```suggestion
// When interleaving, the number of values will be shrunk until we have the
```
https://github.com/llvm/llvm-project/pull/89018
More information about the llvm-commits
mailing list