[llvm] [SLP]Allow matching and shuffling of extractelement vector operands with different VF. (PR #97414)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 09:23:27 PDT 2024
================
@@ -10679,11 +10667,11 @@ BoUpSLP::tryToGatherSingleRegisterExtractElements(
SmallVector<Value *> GatheredExtracts(
VL.size(), PoisonValue::get(VL.front()->getType()));
if (SingleMax >= PairMax && SingleMax) {
- for (int Idx : VectorOpToIdx[SingleVec])
+ for (int Idx : Vectors.front().second)
std::swap(GatheredExtracts[Idx], VL[Idx]);
- } else {
- for (Value *V : {PairVec.first, PairVec.second})
- for (int Idx : VectorOpToIdx[V])
+ } else if (!Vectors.empty()) {
+ for (unsigned Idx : {0, 1})
----------------
RKSimon wrote:
why can we guarantee that Vectors.size() == 2 here (but not earlier)?
https://github.com/llvm/llvm-project/pull/97414
More information about the llvm-commits
mailing list