[llvm] [SLP] Fix crash on trying to reshuffle a scalar that was vectorized. (PR #72295)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 12:52:59 PST 2023
================
@@ -9164,7 +9164,8 @@ BoUpSLP::tryToGatherSingleRegisterExtractElements(
continue;
}
auto *VecTy = dyn_cast<FixedVectorType>(EI->getVectorOperandType());
- if (!VecTy || !isa<ConstantInt, UndefValue>(EI->getIndexOperand()))
+ if (!VecTy || !isa<ConstantInt, UndefValue>(EI->getIndexOperand()) ||
----------------
alexey-bataev wrote:
I don't like this approach. Instead better to check if the vector operands depend on tree entires and delay the vectorization of this particular gather node. When "VectorizedValue" is ready, replace the vector operand with the vectorized value and perform shuffle.
https://github.com/llvm/llvm-project/pull/72295
More information about the llvm-commits
mailing list