[llvm] [SandboxVec][BottomUpVec] Implement pack of scalars (PR #115549)
Sriraman Tallam via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 14:22:22 PST 2024
================
@@ -164,7 +164,39 @@ void BottomUpVec::tryEraseDeadInstrs() {
DeadInstrCandidates.clear();
}
-Value *BottomUpVec::vectorizeRec(ArrayRef<Value *> Bndl) {
+Value *BottomUpVec::createPack(ArrayRef<Value *> ToPack) {
+ BasicBlock::iterator WhereIt = getInsertPointAfterInstrs(ToPack);
+
+ Type *ScalarTy = VecUtils::getCommonScalarType(ToPack);
+ unsigned Lanes = VecUtils::getNumLanes(ToPack);
----------------
tmsri wrote:
Since all values in this bundle have the same scalar type, isn't it just more efficient to do:
```
unsigned Lanes = VecUtils::getNumLanes(Utils::getExpectedType(ToPack[0])) * ToPack.size();
```
https://github.com/llvm/llvm-project/pull/115549
More information about the llvm-commits
mailing list