[llvm] [SLP][REVEC] VectorValuesAndScales should be supported by REVEC. (PR #135762)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 06:58:38 PDT 2025
================
@@ -22718,9 +22681,35 @@ class HorizontalReduction {
Value *createSingleOp(IRBuilderBase &Builder, const TargetTransformInfo &TTI,
Value *Vec, unsigned Scale, bool IsSigned,
Type *DestTy) {
- Value *Rdx = emitReduction(Vec, Builder, &TTI, DestTy);
- if (Rdx->getType() != DestTy->getScalarType())
- Rdx = Builder.CreateIntCast(Rdx, DestTy->getScalarType(), IsSigned);
+ Value *Rdx;
+ if (auto *VecTy = dyn_cast<FixedVectorType>(DestTy)) {
+ unsigned DestTyNumElements = VecTy->getNumElements();
----------------
alexey-bataev wrote:
```suggestion
unsigned DestTyNumElements = getNumElements(VecTy);
```
https://github.com/llvm/llvm-project/pull/135762
More information about the llvm-commits
mailing list