[llvm] [SLP] Fix crash on trying to reshuffle a scalar that was vectorized. (PR #72295)
Valery Dmitriev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 13:16:34 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()) ||
----------------
valerydmit wrote:
Dependency is actually the other way around - a gather node operand depends on a vectorized node. But the dependency is not tracked anywhere so that we end up creating a shuffle of a value which was vectorized (and is in the deleted instructions list) , I do not like the idea to introduce yet another tracking mechanism.
https://github.com/llvm/llvm-project/pull/72295
More information about the llvm-commits
mailing list