[llvm] [SLP][REVEC] Use VL.front()->getType() as ScalarTy. (PR #102437)
Han-Kuan Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 03:02:04 PDT 2024
================
@@ -12391,8 +12391,8 @@ Value *BoUpSLP::vectorizeOperand(TreeEntry *E, unsigned NodeIdx,
}
if (IsSameVE) {
auto FinalShuffle = [&](Value *V, ArrayRef<int> Mask) {
- ShuffleInstructionBuilder ShuffleBuilder(
- cast<VectorType>(V->getType())->getElementType(), Builder, *this);
+ ShuffleInstructionBuilder ShuffleBuilder(VL.front()->getType(), Builder,
----------------
HanKuanChen wrote:
`ShuffleInstructionBuilder::add` will call `castToScalarTyElem`.
If `V` is affected by `MinBWs`, then `castToScalarTyElem` will use `CreateIntCast` and make `V` have a same type as `VL.front()->getType()`.
https://github.com/llvm/llvm-project/pull/102437
More information about the llvm-commits
mailing list