diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -37,6 +37,7 @@ const RISCVSubtarget *getST() const { return ST; } const RISCVTargetLowering *getTLI() const { return TLI; } + unsigned getMaxVLFor(VectorType *Ty); public: explicit RISCVTTIImpl(const RISCVTargetMachine *TM, const Function &F) : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -236,15 +236,7 @@ auto &VTy = *cast(DataTy); InstructionCost MemOpCost = getMemoryOpCost(Opcode, VTy.getElementType(), Alignment, 0, CostKind, I); - if (isa(VTy)) { - const unsigned EltSize = DL.getTypeSizeInBits(VTy.getElementType()); - const unsigned MinSize = DL.getTypeSizeInBits(&VTy).getKnownMinValue(); - const unsigned VectorBitsMax = ST->getRealMaxVLen(); - const unsigned MaxVLMAX = - RISCVTargetLowering::computeVLMAX(VectorBitsMax, EltSize, MinSize); - return MaxVLMAX * MemOpCost; - } - unsigned NumLoads = cast(VTy).getNumElements(); + unsigned NumLoads = getMaxVLFor(&VTy); return NumLoads * MemOpCost; } @@ -312,15 +304,21 @@ return BaseT::getCastInstrCost(Opcode, Dst, Src, CCH, CostKind, I); } +unsigned RISCVTTIImpl::getMaxVLFor(VectorType *Ty) { + if (isa(Ty)) { + const unsigned EltSize = DL.getTypeSizeInBits(Ty->getElementType()); + const unsigned MinSize = DL.getTypeSizeInBits(Ty).getKnownMinValue(); + const unsigned VectorBitsMax = ST->getRealMaxVLen(); + return RISCVTargetLowering::computeVLMAX(VectorBitsMax, EltSize, MinSize); + } + return cast(Ty)->getNumElements(); +} + InstructionCost RISCVTTIImpl::getMinMaxReductionCost(VectorType *Ty, VectorType *CondTy, bool IsUnsigned, TTI::TargetCostKind CostKind) { - // FIXME: Only supporting fixed vectors for now. - if (!isa(Ty)) - return BaseT::getMinMaxReductionCost(Ty, CondTy, IsUnsigned, CostKind); - - if (!ST->useRVVForFixedLengthVectors()) + if (isa(Ty) && !ST->useRVVForFixedLengthVectors()) return BaseT::getMinMaxReductionCost(Ty, CondTy, IsUnsigned, CostKind); // Skip if scalar size of Ty is bigger than ELEN. @@ -335,7 +333,7 @@ // IR Reduction is composed by two vmv and one rvv reduction instruction. InstructionCost BaseCost = 2; - unsigned VL = cast(Ty)->getNumElements(); + unsigned VL = getMaxVLFor(Ty); return (LT.first - 1) + BaseCost + Log2_32_Ceil(VL); } @@ -343,11 +341,7 @@ RISCVTTIImpl::getArithmeticReductionCost(unsigned Opcode, VectorType *Ty, Optional FMF, TTI::TargetCostKind CostKind) { - // FIXME: Only supporting fixed vectors for now. - if (!isa(Ty)) - return BaseT::getArithmeticReductionCost(Opcode, Ty, FMF, CostKind); - - if (!ST->useRVVForFixedLengthVectors()) + if (isa(Ty) && !ST->useRVVForFixedLengthVectors()) return BaseT::getArithmeticReductionCost(Opcode, Ty, FMF, CostKind); // Skip if scalar size of Ty is bigger than ELEN. @@ -368,7 +362,7 @@ // IR Reduction is composed by two vmv and one rvv reduction instruction. InstructionCost BaseCost = 2; - unsigned VL = cast(Ty)->getNumElements(); + unsigned VL = getMaxVLFor(Ty); if (TTI::requiresOrderedReduction(FMF)) return (LT.first - 1) + BaseCost + VL; return (LT.first - 1) + BaseCost + Log2_32_Ceil(VL); diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll --- a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll @@ -6,7 +6,7 @@ define half @vreduce_fadd_nxv1f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call reassoc half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) @@ -15,7 +15,7 @@ define half @vreduce_ord_fadd_nxv1f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1026 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fadd.nxv1f16(half %s, %v) @@ -26,7 +26,7 @@ define half @vreduce_fadd_nxv2f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call reassoc half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) @@ -35,7 +35,7 @@ define half @vreduce_ord_fadd_nxv2f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2050 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fadd.nxv2f16(half %s, %v) @@ -46,7 +46,7 @@ define half @vreduce_fadd_nxv4f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call reassoc half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) @@ -55,7 +55,7 @@ define half @vreduce_ord_fadd_nxv4f16( %v, half %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4098 for instruction: %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fadd.nxv4f16(half %s, %v) @@ -66,7 +66,7 @@ define float @vreduce_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) @@ -75,7 +75,7 @@ define float @vreduce_ord_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1026 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) @@ -85,7 +85,7 @@ define float @vreduce_fwadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -96,7 +96,7 @@ define float @vreduce_ord_fwadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1026 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv1f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -108,7 +108,7 @@ define float @vreduce_fadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) @@ -117,7 +117,7 @@ define float @vreduce_ord_fadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2050 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %v) @@ -127,7 +127,7 @@ define float @vreduce_fwadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -138,7 +138,7 @@ define float @vreduce_ord_fwadd_nxv2f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2050 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv2f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -150,7 +150,7 @@ define float @vreduce_fadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) @@ -159,7 +159,7 @@ define float @vreduce_ord_fadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4098 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %v) @@ -169,7 +169,7 @@ define float @vreduce_fwadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call reassoc float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -180,7 +180,7 @@ define float @vreduce_ord_fwadd_nxv4f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4098 for instruction: %red = call float @llvm.vector.reduce.fadd.nxv4f32(float %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %e = fpext %v to @@ -192,7 +192,7 @@ define double @vreduce_fadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv1f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) @@ -201,7 +201,7 @@ define double @vreduce_ord_fadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv1f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1026 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %v) @@ -211,7 +211,7 @@ define double @vreduce_fwadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -222,7 +222,7 @@ define double @vreduce_ord_fwadd_nxv1f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv1f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 1026 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv1f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -234,7 +234,7 @@ define double @vreduce_fadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv2f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) @@ -243,7 +243,7 @@ define double @vreduce_ord_fadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv2f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2050 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %v) @@ -253,7 +253,7 @@ define double @vreduce_fwadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -264,7 +264,7 @@ define double @vreduce_ord_fwadd_nxv2f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv2f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 2050 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv2f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -276,7 +276,7 @@ define double @vreduce_fadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fadd_nxv4f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) @@ -285,7 +285,7 @@ define double @vreduce_ord_fadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fadd_nxv4f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4098 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %v) @@ -295,7 +295,7 @@ define double @vreduce_fwadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_fwadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call reassoc double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -306,7 +306,7 @@ define double @vreduce_ord_fwadd_nxv4f64( %v, double %s) { ; CHECK-LABEL: 'vreduce_ord_fwadd_nxv4f64' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = fpext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 4098 for instruction: %red = call double @llvm.vector.reduce.fadd.nxv4f64(double %s, %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %e = fpext %v to @@ -318,7 +318,7 @@ define half @vreduce_fmin_nxv1f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -327,7 +327,7 @@ define half @vreduce_fmin_nxv1f16_nonans( %v) #0 { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call nnan half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -336,7 +336,7 @@ define half @vreduce_fmin_nxv1f16_nonans_noinfs( %v) #1 { ; CHECK-LABEL: 'vreduce_fmin_nxv1f16_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call nnan ninf half @llvm.vector.reduce.fmin.nxv1f16( %v) @@ -347,7 +347,7 @@ define half @vreduce_fmin_nxv2f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv2f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmin.nxv2f16( %v) @@ -358,7 +358,7 @@ define half @vreduce_fmin_nxv4f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv4f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmin.nxv4f16( %v) @@ -369,7 +369,7 @@ define half @vreduce_fmin_nxv64f16( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv64f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %red = call half @llvm.vector.reduce.fmin.nxv64f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmin.nxv64f16( %v) @@ -380,7 +380,7 @@ define float @vreduce_fmin_nxv1f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -389,7 +389,7 @@ define float @vreduce_fmin_nxv1f32_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call nnan float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -398,7 +398,7 @@ define float @vreduce_fmin_nxv1f32_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f32_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call nnan ninf float @llvm.vector.reduce.fmin.nxv1f32( %v) @@ -409,7 +409,7 @@ define float @vreduce_fmin_nxv2f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv2f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmin.nxv2f32( %v) @@ -420,7 +420,7 @@ define float @vreduce_fmin_nxv4f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv4f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmin.nxv4f32( %v) @@ -431,7 +431,7 @@ define float @vreduce_fmin_nxv32f32( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv32f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %red = call float @llvm.vector.reduce.fmin.nxv32f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmin.nxv32f32( %v) @@ -442,7 +442,7 @@ define double @vreduce_fmin_nxv1f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -451,7 +451,7 @@ define double @vreduce_fmin_nxv1f64_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call nnan double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -460,7 +460,7 @@ define double @vreduce_fmin_nxv1f64_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv1f64_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call nnan ninf double @llvm.vector.reduce.fmin.nxv1f64( %v) @@ -471,7 +471,7 @@ define double @vreduce_fmin_nxv2f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv2f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv2f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmin.nxv2f64( %v) @@ -482,7 +482,7 @@ define double @vreduce_fmin_nxv4f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv4f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv4f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmin.nxv4f64( %v) @@ -493,7 +493,7 @@ define double @vreduce_fmin_nxv16f64( %v) { ; CHECK-LABEL: 'vreduce_fmin_nxv16f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %red = call double @llvm.vector.reduce.fmin.nxv16f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmin.nxv16f64( %v) @@ -504,7 +504,7 @@ define half @vreduce_fmax_nxv1f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -513,7 +513,7 @@ define half @vreduce_fmax_nxv1f16_nonans( %v) #0 { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call nnan half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -522,7 +522,7 @@ define half @vreduce_fmax_nxv1f16_nonans_noinfs( %v) #1 { ; CHECK-LABEL: 'vreduce_fmax_nxv1f16_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call nnan ninf half @llvm.vector.reduce.fmax.nxv1f16( %v) @@ -533,7 +533,7 @@ define half @vreduce_fmax_nxv2f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv2f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmax.nxv2f16( %v) @@ -544,7 +544,7 @@ define half @vreduce_fmax_nxv4f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv4f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmax.nxv4f16( %v) @@ -555,7 +555,7 @@ define half @vreduce_fmax_nxv64f16( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv64f16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %red = call half @llvm.vector.reduce.fmax.nxv64f16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret half %red ; %red = call half @llvm.vector.reduce.fmax.nxv64f16( %v) @@ -566,7 +566,7 @@ define float @vreduce_fmax_nxv1f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -575,7 +575,7 @@ define float @vreduce_fmax_nxv1f32_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call nnan float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -584,7 +584,7 @@ define float @vreduce_fmax_nxv1f32_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f32_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call nnan ninf float @llvm.vector.reduce.fmax.nxv1f32( %v) @@ -595,7 +595,7 @@ define float @vreduce_fmax_nxv2f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv2f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmax.nxv2f32( %v) @@ -606,7 +606,7 @@ define float @vreduce_fmax_nxv4f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv4f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmax.nxv4f32( %v) @@ -617,7 +617,7 @@ define float @vreduce_fmax_nxv32f32( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv32f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %red = call float @llvm.vector.reduce.fmax.nxv32f32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call float @llvm.vector.reduce.fmax.nxv32f32( %v) @@ -628,7 +628,7 @@ define double @vreduce_fmax_nxv1f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -637,7 +637,7 @@ define double @vreduce_fmax_nxv1f64_nonans( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call nnan double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -646,7 +646,7 @@ define double @vreduce_fmax_nxv1f64_nonans_noinfs( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv1f64_nonans_noinfs' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call nnan ninf double @llvm.vector.reduce.fmax.nxv1f64( %v) @@ -657,7 +657,7 @@ define double @vreduce_fmax_nxv2f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv2f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv2f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmax.nxv2f64( %v) @@ -668,7 +668,7 @@ define double @vreduce_fmax_nxv4f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv4f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv4f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmax.nxv4f64( %v) @@ -679,7 +679,7 @@ define double @vreduce_fmax_nxv16f64( %v) { ; CHECK-LABEL: 'vreduce_fmax_nxv16f64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %red = call double @llvm.vector.reduce.fmax.nxv16f64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret double %red ; %red = call double @llvm.vector.reduce.fmax.nxv16f64( %v) @@ -688,7 +688,7 @@ define float @vreduce_nsz_fadd_nxv1f32( %v, float %s) { ; CHECK-LABEL: 'vreduce_nsz_fadd_nxv1f32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret float %red ; %red = call reassoc nsz float @llvm.vector.reduce.fadd.nxv1f32(float %s, %v) diff --git a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll --- a/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll +++ b/llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll @@ -6,7 +6,7 @@ define signext i8 @vreduce_add_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.add.nxv1i8( %v) @@ -17,7 +17,7 @@ define signext i8 @vreduce_umax_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umax.nxv1i8( %v) @@ -28,7 +28,7 @@ define signext i8 @vreduce_smax_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smax.nxv1i8( %v) @@ -39,7 +39,7 @@ define signext i8 @vreduce_umin_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umin.nxv1i8( %v) @@ -50,7 +50,7 @@ define signext i8 @vreduce_smin_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smin.nxv1i8( %v) @@ -61,7 +61,7 @@ define signext i8 @vreduce_and_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.and.nxv1i8( %v) @@ -72,7 +72,7 @@ define signext i8 @vreduce_or_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.or.nxv1i8( %v) @@ -83,7 +83,7 @@ define signext i8 @vreduce_xor_nxv1i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv1i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.xor.nxv1i8( %v) @@ -94,7 +94,7 @@ define signext i8 @vreduce_add_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.add.nxv2i8( %v) @@ -105,7 +105,7 @@ define signext i8 @vreduce_umax_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umax.nxv2i8( %v) @@ -116,7 +116,7 @@ define signext i8 @vreduce_smax_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smax.nxv2i8( %v) @@ -127,7 +127,7 @@ define signext i8 @vreduce_umin_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umin.nxv2i8( %v) @@ -138,7 +138,7 @@ define signext i8 @vreduce_smin_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smin.nxv2i8( %v) @@ -149,7 +149,7 @@ define signext i8 @vreduce_and_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.and.nxv2i8( %v) @@ -160,7 +160,7 @@ define signext i8 @vreduce_or_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.or.nxv2i8( %v) @@ -171,7 +171,7 @@ define signext i8 @vreduce_xor_nxv2i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv2i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.xor.nxv2i8( %v) @@ -182,7 +182,7 @@ define signext i8 @vreduce_add_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.add.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.add.nxv4i8( %v) @@ -193,7 +193,7 @@ define signext i8 @vreduce_umax_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.umax.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umax.nxv4i8( %v) @@ -204,7 +204,7 @@ define signext i8 @vreduce_smax_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.smax.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smax.nxv4i8( %v) @@ -215,7 +215,7 @@ define signext i8 @vreduce_umin_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.umin.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.umin.nxv4i8( %v) @@ -226,7 +226,7 @@ define signext i8 @vreduce_smin_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.smin.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.smin.nxv4i8( %v) @@ -237,7 +237,7 @@ define signext i8 @vreduce_and_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.and.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.and.nxv4i8( %v) @@ -248,7 +248,7 @@ define signext i8 @vreduce_or_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.or.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.or.nxv4i8( %v) @@ -259,7 +259,7 @@ define signext i8 @vreduce_xor_nxv4i8( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i8' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i8 @llvm.vector.reduce.xor.nxv4i8( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %red ; %red = call i8 @llvm.vector.reduce.xor.nxv4i8( %v) @@ -270,7 +270,7 @@ define signext i16 @vreduce_add_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.add.nxv1i16( %v) @@ -280,7 +280,7 @@ define signext i16 @vwreduce_add_nxv1i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -291,7 +291,7 @@ define signext i16 @vwreduce_uadd_nxv1i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv1i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -303,7 +303,7 @@ define signext i16 @vreduce_umax_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umax.nxv1i16( %v) @@ -314,7 +314,7 @@ define signext i16 @vreduce_smax_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smax.nxv1i16( %v) @@ -325,7 +325,7 @@ define signext i16 @vreduce_umin_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umin.nxv1i16( %v) @@ -336,7 +336,7 @@ define signext i16 @vreduce_smin_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smin.nxv1i16( %v) @@ -347,7 +347,7 @@ define signext i16 @vreduce_and_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.and.nxv1i16( %v) @@ -358,7 +358,7 @@ define signext i16 @vreduce_or_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.or.nxv1i16( %v) @@ -369,7 +369,7 @@ define signext i16 @vreduce_xor_nxv1i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv1i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.xor.nxv1i16( %v) @@ -380,7 +380,7 @@ define signext i16 @vreduce_add_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.add.nxv2i16( %v) @@ -390,7 +390,7 @@ define signext i16 @vwreduce_add_nxv2i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -401,7 +401,7 @@ define signext i16 @vwreduce_uadd_nxv2i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv2i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -413,7 +413,7 @@ define signext i16 @vreduce_umax_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umax.nxv2i16( %v) @@ -424,7 +424,7 @@ define signext i16 @vreduce_smax_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smax.nxv2i16( %v) @@ -435,7 +435,7 @@ define signext i16 @vreduce_umin_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umin.nxv2i16( %v) @@ -446,7 +446,7 @@ define signext i16 @vreduce_smin_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smin.nxv2i16( %v) @@ -457,7 +457,7 @@ define signext i16 @vreduce_and_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.and.nxv2i16( %v) @@ -468,7 +468,7 @@ define signext i16 @vreduce_or_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.or.nxv2i16( %v) @@ -479,7 +479,7 @@ define signext i16 @vreduce_xor_nxv2i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv2i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.xor.nxv2i16( %v) @@ -490,7 +490,7 @@ define signext i16 @vreduce_add_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.add.nxv4i16( %v) @@ -500,7 +500,7 @@ define signext i16 @vwreduce_add_nxv4i8( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -511,7 +511,7 @@ define signext i16 @vwreduce_uadd_nxv4i8( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i8' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.add.nxv4i16( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %e = sext %v to @@ -523,7 +523,7 @@ define signext i16 @vreduce_umax_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.umax.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umax.nxv4i16( %v) @@ -534,7 +534,7 @@ define signext i16 @vreduce_smax_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.smax.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smax.nxv4i16( %v) @@ -545,7 +545,7 @@ define signext i16 @vreduce_umin_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.umin.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.umin.nxv4i16( %v) @@ -556,7 +556,7 @@ define signext i16 @vreduce_smin_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.smin.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.smin.nxv4i16( %v) @@ -567,7 +567,7 @@ define signext i16 @vreduce_and_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.and.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.and.nxv4i16( %v) @@ -578,7 +578,7 @@ define signext i16 @vreduce_or_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.or.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.or.nxv4i16( %v) @@ -589,7 +589,7 @@ define signext i16 @vreduce_xor_nxv4i16( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i16' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i16 @llvm.vector.reduce.xor.nxv4i16( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %red ; %red = call i16 @llvm.vector.reduce.xor.nxv4i16( %v) @@ -600,7 +600,7 @@ define signext i32 @vreduce_add_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.add.nxv1i32( %v) @@ -610,7 +610,7 @@ define signext i32 @vwreduce_add_nxv1i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = sext %v to @@ -621,7 +621,7 @@ define signext i32 @vwreduce_uadd_nxv1i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv1i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = zext %v to @@ -633,7 +633,7 @@ define signext i32 @vreduce_umax_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umax.nxv1i32( %v) @@ -644,7 +644,7 @@ define signext i32 @vreduce_smax_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smax.nxv1i32( %v) @@ -655,7 +655,7 @@ define signext i32 @vreduce_umin_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umin.nxv1i32( %v) @@ -666,7 +666,7 @@ define signext i32 @vreduce_smin_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smin.nxv1i32( %v) @@ -677,7 +677,7 @@ define signext i32 @vreduce_and_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.and.nxv1i32( %v) @@ -688,7 +688,7 @@ define signext i32 @vreduce_or_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.or.nxv1i32( %v) @@ -699,7 +699,7 @@ define signext i32 @vreduce_xor_nxv1i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv1i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.xor.nxv1i32( %v) @@ -710,7 +710,7 @@ define signext i32 @vreduce_add_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.add.nxv2i32( %v) @@ -720,7 +720,7 @@ define signext i32 @vwreduce_add_nxv2i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = sext %v to @@ -731,7 +731,7 @@ define signext i32 @vwreduce_uadd_nxv2i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv2i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = zext %v to @@ -743,7 +743,7 @@ define signext i32 @vreduce_umax_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umax.nxv2i32( %v) @@ -754,7 +754,7 @@ define signext i32 @vreduce_smax_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smax.nxv2i32( %v) @@ -765,7 +765,7 @@ define signext i32 @vreduce_umin_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umin.nxv2i32( %v) @@ -776,7 +776,7 @@ define signext i32 @vreduce_smin_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smin.nxv2i32( %v) @@ -787,7 +787,7 @@ define signext i32 @vreduce_and_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.and.nxv2i32( %v) @@ -798,7 +798,7 @@ define signext i32 @vreduce_or_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.or.nxv2i32( %v) @@ -809,7 +809,7 @@ define signext i32 @vreduce_xor_nxv2i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv2i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.xor.nxv2i32( %v) @@ -820,7 +820,7 @@ define signext i32 @vreduce_add_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.add.nxv4i32( %v) @@ -830,7 +830,7 @@ define signext i32 @vwreduce_add_nxv4i16( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = sext %v to @@ -841,7 +841,7 @@ define signext i32 @vwreduce_uadd_nxv4i16( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i16' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.add.nxv4i32( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %e = zext %v to @@ -853,7 +853,7 @@ define signext i32 @vreduce_umax_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.umax.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umax.nxv4i32( %v) @@ -864,7 +864,7 @@ define signext i32 @vreduce_smax_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.smax.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smax.nxv4i32( %v) @@ -875,7 +875,7 @@ define signext i32 @vreduce_umin_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.umin.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.umin.nxv4i32( %v) @@ -886,7 +886,7 @@ define signext i32 @vreduce_smin_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.smin.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.smin.nxv4i32( %v) @@ -897,7 +897,7 @@ define signext i32 @vreduce_and_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.and.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.and.nxv4i32( %v) @@ -908,7 +908,7 @@ define signext i32 @vreduce_or_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.or.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.or.nxv4i32( %v) @@ -919,7 +919,7 @@ define signext i32 @vreduce_xor_nxv4i32( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i32' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i32 @llvm.vector.reduce.xor.nxv4i32( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %red ; %red = call i32 @llvm.vector.reduce.xor.nxv4i32( %v) @@ -930,7 +930,7 @@ define i64 @vreduce_add_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.add.nxv1i64( %v) @@ -940,7 +940,7 @@ define i64 @vwreduce_add_nxv1i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = sext %v to @@ -951,7 +951,7 @@ define i64 @vwreduce_uadd_nxv1i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv1i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv1i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = zext %v to @@ -963,7 +963,7 @@ define i64 @vreduce_umax_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umax.nxv1i64( %v) @@ -974,7 +974,7 @@ define i64 @vreduce_smax_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smax.nxv1i64( %v) @@ -985,7 +985,7 @@ define i64 @vreduce_umin_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umin.nxv1i64( %v) @@ -996,7 +996,7 @@ define i64 @vreduce_smin_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smin.nxv1i64( %v) @@ -1007,7 +1007,7 @@ define i64 @vreduce_and_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.and.nxv1i64( %v) @@ -1018,7 +1018,7 @@ define i64 @vreduce_or_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.or.nxv1i64( %v) @@ -1029,7 +1029,7 @@ define i64 @vreduce_xor_nxv1i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv1i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv1i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.xor.nxv1i64( %v) @@ -1040,7 +1040,7 @@ define i64 @vreduce_add_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.add.nxv2i64( %v) @@ -1050,7 +1050,7 @@ define i64 @vwreduce_add_nxv2i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = sext %v to @@ -1061,7 +1061,7 @@ define i64 @vwreduce_uadd_nxv2i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv2i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv2i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = zext %v to @@ -1073,7 +1073,7 @@ define i64 @vreduce_umax_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umax.nxv2i64( %v) @@ -1084,7 +1084,7 @@ define i64 @vreduce_smax_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smax.nxv2i64( %v) @@ -1095,7 +1095,7 @@ define i64 @vreduce_umin_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umin.nxv2i64( %v) @@ -1106,7 +1106,7 @@ define i64 @vreduce_smin_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smin.nxv2i64( %v) @@ -1117,7 +1117,7 @@ define i64 @vreduce_and_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.and.nxv2i64( %v) @@ -1128,7 +1128,7 @@ define i64 @vreduce_or_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.or.nxv2i64( %v) @@ -1139,7 +1139,7 @@ define i64 @vreduce_xor_nxv2i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv2i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv2i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.xor.nxv2i64( %v) @@ -1150,7 +1150,7 @@ define i64 @vreduce_add_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_add_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.add.nxv4i64( %v) @@ -1160,7 +1160,7 @@ define i64 @vwreduce_add_nxv4i32( %v) { ; CHECK-LABEL: 'vwreduce_add_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = sext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = sext %v to @@ -1171,7 +1171,7 @@ define i64 @vwreduce_uadd_nxv4i32( %v) { ; CHECK-LABEL: 'vwreduce_uadd_nxv4i32' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = zext %v to -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.add.nxv4i64( %e) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %e = zext %v to @@ -1183,7 +1183,7 @@ define i64 @vreduce_umax_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_umax_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.umax.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umax.nxv4i64( %v) @@ -1194,7 +1194,7 @@ define i64 @vreduce_smax_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_smax_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.smax.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smax.nxv4i64( %v) @@ -1205,7 +1205,7 @@ define i64 @vreduce_umin_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_umin_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.umin.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.umin.nxv4i64( %v) @@ -1216,7 +1216,7 @@ define i64 @vreduce_smin_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_smin_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.smin.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.smin.nxv4i64( %v) @@ -1227,7 +1227,7 @@ define i64 @vreduce_and_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_and_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.and.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.and.nxv4i64( %v) @@ -1238,7 +1238,7 @@ define i64 @vreduce_or_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_or_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.or.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.or.nxv4i64( %v) @@ -1249,7 +1249,7 @@ define i64 @vreduce_xor_nxv4i64( %v) { ; CHECK-LABEL: 'vreduce_xor_nxv4i64' -; CHECK-NEXT: Cost Model: Invalid cost for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64( %v) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %red = call i64 @llvm.vector.reduce.xor.nxv4i64( %v) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %red ; %red = call i64 @llvm.vector.reduce.xor.nxv4i64( %v)