Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h =================================================================== --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -37,7 +37,15 @@ const RISCVSubtarget *getST() const { return ST; } const RISCVTargetLowering *getTLI() const { return TLI; } - unsigned getMaxVLFor(VectorType *Ty); + /// This function returns an estimate for VL to be used in VL based terms + /// of the cost model. For fixed length vectors, this is simply the + /// vector length. For scalable vectors, we return results consistent + /// with getVScaleForTuning under the assumption that clients are also + /// using that when comparing costs between scalar and vector representation. + /// This does unfortunately mean that we can both undershoot and overshot + /// the true cost significantly if getVScaleForTuning is wildly off for the + /// actual target hardware. + unsigned getEstimatedVLFor(VectorType *Ty); public: explicit RISCVTTIImpl(const RISCVTargetMachine *TM, const Function &F) : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)), Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -240,12 +240,12 @@ Alignment, CostKind, I); // Cost is proportional to the number of memory operations implied. For - // scalable vectors, we use an upper bound on that number since we don't + // scalable vectors, we use an estimate on that number since we don't // know exactly what VL will be. auto &VTy = *cast(DataTy); InstructionCost MemOpCost = getMemoryOpCost(Opcode, VTy.getElementType(), Alignment, 0, CostKind, I); - unsigned NumLoads = getMaxVLFor(&VTy); + unsigned NumLoads = getEstimatedVLFor(&VTy); return NumLoads * MemOpCost; } @@ -313,12 +313,12 @@ return BaseT::getCastInstrCost(Opcode, Dst, Src, CCH, CostKind, I); } -unsigned RISCVTTIImpl::getMaxVLFor(VectorType *Ty) { +unsigned RISCVTTIImpl::getEstimatedVLFor(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); + const unsigned VectorBits = *getVScaleForTuning() * RISCV::RVVBitsPerBlock; + return RISCVTargetLowering::computeVLMAX(VectorBits, EltSize, MinSize); } return cast(Ty)->getNumElements(); } @@ -342,7 +342,7 @@ // IR Reduction is composed by two vmv and one rvv reduction instruction. InstructionCost BaseCost = 2; - unsigned VL = getMaxVLFor(Ty); + unsigned VL = getEstimatedVLFor(Ty); return (LT.first - 1) + BaseCost + Log2_32_Ceil(VL); } @@ -371,7 +371,7 @@ // IR Reduction is composed by two vmv and one rvv reduction instruction. InstructionCost BaseCost = 2; - unsigned VL = getMaxVLFor(Ty); + unsigned VL = getEstimatedVLFor(Ty); if (TTI::requiresOrderedReduction(FMF)) return (LT.first - 1) + BaseCost + VL; return (LT.first - 1) + BaseCost + Log2_32_Ceil(VL); Index: llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/reduce-scalable-fp.ll +++ 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: 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 3 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: 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 4 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: 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 4 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: 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 6 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: 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 5 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: 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 10 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: 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 3 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: 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 4 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: 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 3 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: 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 4 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: 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 4 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: 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 6 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: 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 4 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: 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 6 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: 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 5 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: 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 10 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: 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 5 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: 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 10 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: 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 3 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: 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 4 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: 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 3 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: 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 4 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: 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 4 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: 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 6 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: 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 4 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: 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 6 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: 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 5 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: 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 10 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: 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 5 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: 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 10 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 10 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 9 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 8 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 10 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 9 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 5 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: 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 8 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: 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 3 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) Index: llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/reduce-scalable-int.ll +++ 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 3 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 4 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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: 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 5 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) Index: llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll +++ llvm/test/Analysis/CostModel/RISCV/scalable-gather.ll @@ -5,91 +5,91 @@ define void @masked_gather_aligned() { ; GENERIC-LABEL: 'masked_gather_aligned' -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0f64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0f64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0f64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0f64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0f32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0f32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0f32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0f32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0f32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: %V32F16 = call @llvm.masked.gather.nxv32f16.nxv32p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: %V16F16 = call @llvm.masked.gather.nxv16f16.nxv16p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8F16 = call @llvm.masked.gather.nxv8f16.nxv8p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4F16 = call @llvm.masked.gather.nxv4f16.nxv4p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2F16 = call @llvm.masked.gather.nxv2f16.nxv2p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1F16 = call @llvm.masked.gather.nxv1f16.nxv1p0f16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0i64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0i64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0i64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0i64( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0i32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0i32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0i32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0i32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0i32( undef, i32 4, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0i16( undef, i32 2, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 65536 for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0i8( undef, i32 1, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: %V8PTR = call @llvm.masked.gather.nxv8p0i8.nxv8p0p0i8( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0i8.nxv4p0p0i8( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0i8.nxv2p0p0i8( undef, i32 8, undef, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0i8.nxv1p0p0i8( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0f64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0f64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0f64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0f64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0f32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0f32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0f32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0f32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0f32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32F16 = call @llvm.masked.gather.nxv32f16.nxv32p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16F16 = call @llvm.masked.gather.nxv16f16.nxv16p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F16 = call @llvm.masked.gather.nxv8f16.nxv8p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F16 = call @llvm.masked.gather.nxv4f16.nxv4p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F16 = call @llvm.masked.gather.nxv2f16.nxv2p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F16 = call @llvm.masked.gather.nxv1f16.nxv1p0f16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0i64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0i64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0i64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0i64( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0i32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0i32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0i32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0i32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0i32( undef, i32 4, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0i16( undef, i32 2, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0i8( undef, i32 1, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8PTR = call @llvm.masked.gather.nxv8p0i8.nxv8p0p0i8( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0i8.nxv4p0p0i8( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0i8.nxv2p0p0i8( undef, i32 8, undef, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0i8.nxv1p0p0i8( undef, i32 8, undef, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; MAX256-LABEL: 'masked_gather_aligned' -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0f64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0f64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0f64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0f64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0f32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0f32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0f32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0f32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0f32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V32F16 = call @llvm.masked.gather.nxv32f16.nxv32p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V16F16 = call @llvm.masked.gather.nxv16f16.nxv16p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8F16 = call @llvm.masked.gather.nxv8f16.nxv8p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4F16 = call @llvm.masked.gather.nxv4f16.nxv4p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2F16 = call @llvm.masked.gather.nxv2f16.nxv2p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1F16 = call @llvm.masked.gather.nxv1f16.nxv1p0f16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0i64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0i64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0i64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0i64( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0i32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0i32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0i32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0i32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0i32( undef, i32 4, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0i16( undef, i32 2, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0i8( undef, i32 1, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V8PTR = call @llvm.masked.gather.nxv8p0i8.nxv8p0p0i8( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0i8.nxv4p0p0i8( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0i8.nxv2p0p0i8( undef, i32 8, undef, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0i8.nxv1p0p0i8( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F64 = call @llvm.masked.gather.nxv8f64.nxv8p0f64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F64 = call @llvm.masked.gather.nxv4f64.nxv4p0f64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F64 = call @llvm.masked.gather.nxv2f64.nxv2p0f64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F64 = call @llvm.masked.gather.nxv1f64.nxv1p0f64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16F32 = call @llvm.masked.gather.nxv16f32.nxv16p0f32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F32 = call @llvm.masked.gather.nxv8f32.nxv8p0f32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F32 = call @llvm.masked.gather.nxv4f32.nxv4p0f32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F32 = call @llvm.masked.gather.nxv2f32.nxv2p0f32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F32 = call @llvm.masked.gather.nxv1f32.nxv1p0f32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32F16 = call @llvm.masked.gather.nxv32f16.nxv32p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16F16 = call @llvm.masked.gather.nxv16f16.nxv16p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8F16 = call @llvm.masked.gather.nxv8f16.nxv8p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4F16 = call @llvm.masked.gather.nxv4f16.nxv4p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2F16 = call @llvm.masked.gather.nxv2f16.nxv2p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1F16 = call @llvm.masked.gather.nxv1f16.nxv1p0f16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I64 = call @llvm.masked.gather.nxv8i64.nxv8p0i64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I64 = call @llvm.masked.gather.nxv4i64.nxv4p0i64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I64 = call @llvm.masked.gather.nxv2i64.nxv2p0i64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I64 = call @llvm.masked.gather.nxv1i64.nxv1p0i64( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I32 = call @llvm.masked.gather.nxv16i32.nxv16p0i32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I32 = call @llvm.masked.gather.nxv8i32.nxv8p0i32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I32 = call @llvm.masked.gather.nxv4i32.nxv4p0i32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I32 = call @llvm.masked.gather.nxv2i32.nxv2p0i32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I32 = call @llvm.masked.gather.nxv1i32.nxv1p0i32( undef, i32 4, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I16 = call @llvm.masked.gather.nxv32i16.nxv32p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I16 = call @llvm.masked.gather.nxv16i16.nxv16p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I16 = call @llvm.masked.gather.nxv8i16.nxv8p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I16 = call @llvm.masked.gather.nxv4i16.nxv4p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I16 = call @llvm.masked.gather.nxv2i16.nxv2p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I16 = call @llvm.masked.gather.nxv1i16.nxv1p0i16( undef, i32 2, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %V64I8 = call @llvm.masked.gather.nxv64i8.nxv64p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %V32I8 = call @llvm.masked.gather.nxv32i8.nxv32p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %V16I8 = call @llvm.masked.gather.nxv16i8.nxv16p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8I8 = call @llvm.masked.gather.nxv8i8.nxv8p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4I8 = call @llvm.masked.gather.nxv4i8.nxv4p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2I8 = call @llvm.masked.gather.nxv2i8.nxv2p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1I8 = call @llvm.masked.gather.nxv1i8.nxv1p0i8( undef, i32 1, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8PTR = call @llvm.masked.gather.nxv8p0i8.nxv8p0p0i8( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V4PTR = call @llvm.masked.gather.nxv4p0i8.nxv4p0p0i8( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2PTR = call @llvm.masked.gather.nxv2p0i8.nxv2p0p0i8( undef, i32 8, undef, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V1PTR = call @llvm.masked.gather.nxv1p0i8.nxv1p0p0i8( undef, i32 8, undef, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; UNSUPPORTED-LABEL: 'masked_gather_aligned' Index: llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll +++ llvm/test/Analysis/CostModel/RISCV/scalable-scatter.ll @@ -5,91 +5,91 @@ define void @masked_scatter_aligned() { ; GENERIC-LABEL: 'masked_scatter_aligned' -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0f64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4f64.nxv4p0f64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2f64.nxv2p0f64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1f64.nxv1p0f64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: call void @llvm.masked.scatter.nxv16f32.nxv16p0f32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8f32.nxv8p0f32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4f32.nxv4p0f32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2f32.nxv2p0f32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1f32.nxv1p0f32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: call void @llvm.masked.scatter.nxv32f16.nxv32p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: call void @llvm.masked.scatter.nxv16f16.nxv16p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8f16.nxv8p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4f16.nxv4p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2f16.nxv2p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1f16.nxv1p0f16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8i64.nxv8p0i64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4i64.nxv4p0i64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2i64.nxv2p0i64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1i64.nxv1p0i64( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: call void @llvm.masked.scatter.nxv16i32.nxv16p0i32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8i32.nxv8p0i32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4i32.nxv4p0i32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2i32.nxv2p0i32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1i32.nxv1p0i32( undef, undef, i32 4, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: call void @llvm.masked.scatter.nxv32i16.nxv32p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: call void @llvm.masked.scatter.nxv16i16.nxv16p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8i16.nxv8p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4i16.nxv4p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2i16.nxv2p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1i16.nxv1p0i16( undef, undef, i32 2, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 65536 for instruction: call void @llvm.masked.scatter.nxv64i8.nxv64p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 32768 for instruction: call void @llvm.masked.scatter.nxv32i8.nxv32p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 16384 for instruction: call void @llvm.masked.scatter.nxv16i8.nxv16p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8i8.nxv8p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4i8.nxv4p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2i8.nxv2p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1i8.nxv1p0i8( undef, undef, i32 1, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 8192 for instruction: call void @llvm.masked.scatter.nxv8p0i8.nxv8p0p0i8( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 4096 for instruction: call void @llvm.masked.scatter.nxv4p0i8.nxv4p0p0i8( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 2048 for instruction: call void @llvm.masked.scatter.nxv2p0i8.nxv2p0p0i8( undef, undef, i32 8, undef) -; GENERIC-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: call void @llvm.masked.scatter.nxv1p0i8.nxv1p0p0i8( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0f64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f64.nxv4p0f64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f64.nxv2p0f64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f64.nxv1p0f64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16f32.nxv16p0f32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f32.nxv8p0f32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f32.nxv4p0f32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f32.nxv2p0f32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f32.nxv1p0f32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32f16.nxv32p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16f16.nxv16p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f16.nxv8p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f16.nxv4p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f16.nxv2p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f16.nxv1p0f16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i64.nxv8p0i64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i64.nxv4p0i64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i64.nxv2p0i64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i64.nxv1p0i64( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i32.nxv16p0i32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i32.nxv8p0i32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i32.nxv4p0i32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i32.nxv2p0i32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i32.nxv1p0i32( undef, undef, i32 4, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32i16.nxv32p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i16.nxv16p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i16.nxv8p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i16.nxv4p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i16.nxv2p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i16.nxv1p0i16( undef, undef, i32 2, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv64i8.nxv64p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32i8.nxv32p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i8.nxv16p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i8.nxv8p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i8.nxv4p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i8.nxv2p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i8.nxv1p0i8( undef, undef, i32 1, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8p0i8.nxv8p0p0i8( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4p0i8.nxv4p0p0i8( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2p0i8.nxv2p0p0i8( undef, undef, i32 8, undef) +; GENERIC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1p0i8.nxv1p0p0i8( undef, undef, i32 8, undef) ; GENERIC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; MAX256-LABEL: 'masked_scatter_aligned' -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0f64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4f64.nxv4p0f64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2f64.nxv2p0f64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1f64.nxv1p0f64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv16f32.nxv16p0f32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8f32.nxv8p0f32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4f32.nxv4p0f32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2f32.nxv2p0f32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1f32.nxv1p0f32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv32f16.nxv32p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv16f16.nxv16p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8f16.nxv8p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4f16.nxv4p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2f16.nxv2p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1f16.nxv1p0f16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8i64.nxv8p0i64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4i64.nxv4p0i64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2i64.nxv2p0i64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1i64.nxv1p0i64( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv16i32.nxv16p0i32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8i32.nxv8p0i32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4i32.nxv4p0i32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2i32.nxv2p0i32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1i32.nxv1p0i32( undef, undef, i32 4, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv32i16.nxv32p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv16i16.nxv16p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8i16.nxv8p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4i16.nxv4p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2i16.nxv2p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1i16.nxv1p0i16( undef, undef, i32 2, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 256 for instruction: call void @llvm.masked.scatter.nxv64i8.nxv64p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv32i8.nxv32p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv16i8.nxv16p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8i8.nxv8p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4i8.nxv4p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2i8.nxv2p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1i8.nxv1p0i8( undef, undef, i32 1, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv8p0i8.nxv8p0p0i8( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv4p0i8.nxv4p0p0i8( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv2p0i8.nxv2p0p0i8( undef, undef, i32 8, undef) -; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv1p0i8.nxv1p0p0i8( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f64.nxv8p0f64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f64.nxv4p0f64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f64.nxv2p0f64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f64.nxv1p0f64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16f32.nxv16p0f32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f32.nxv8p0f32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f32.nxv4p0f32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f32.nxv2p0f32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f32.nxv1p0f32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32f16.nxv32p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16f16.nxv16p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8f16.nxv8p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4f16.nxv4p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2f16.nxv2p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1f16.nxv1p0f16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i64.nxv8p0i64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i64.nxv4p0i64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i64.nxv2p0i64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i64.nxv1p0i64( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i32.nxv16p0i32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i32.nxv8p0i32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i32.nxv4p0i32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i32.nxv2p0i32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i32.nxv1p0i32( undef, undef, i32 4, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32i16.nxv32p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i16.nxv16p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i16.nxv8p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i16.nxv4p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i16.nxv2p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i16.nxv1p0i16( undef, undef, i32 2, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 128 for instruction: call void @llvm.masked.scatter.nxv64i8.nxv64p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 64 for instruction: call void @llvm.masked.scatter.nxv32i8.nxv32p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 32 for instruction: call void @llvm.masked.scatter.nxv16i8.nxv16p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8i8.nxv8p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4i8.nxv4p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2i8.nxv2p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1i8.nxv1p0i8( undef, undef, i32 1, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 16 for instruction: call void @llvm.masked.scatter.nxv8p0i8.nxv8p0p0i8( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 8 for instruction: call void @llvm.masked.scatter.nxv4p0i8.nxv4p0p0i8( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.nxv2p0i8.nxv2p0p0i8( undef, undef, i32 8, undef) +; MAX256-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.nxv1p0i8.nxv1p0p0i8( undef, undef, i32 8, undef) ; MAX256-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; UNSUPPORTED-LABEL: 'masked_scatter_aligned'