diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -10,6 +10,7 @@ #include "MCTargetDesc/RISCVMatInt.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/CodeGen/BasicTTIImpl.h" +#include "llvm/CodeGen/CostTable.h" #include "llvm/CodeGen/TargetLowering.h" #include using namespace llvm; @@ -250,6 +251,77 @@ return NumLoads * MemOpCost; } +// Currently, these represent both throughput and codesize costs +// for the respective intrinsics. The costs in this table are simply +// instruction counts with the following adjustments made: +// * One vsetvli is considered free. +static const CostTblEntry VectorIntrinsicCostTable[]{ + {Intrinsic::floor, MVT::v2f32, 15}, + {Intrinsic::floor, MVT::v4f32, 15}, + {Intrinsic::floor, MVT::v8f32, 15}, + {Intrinsic::floor, MVT::v16f32, 15}, + {Intrinsic::floor, MVT::nxv2f32, 15}, + {Intrinsic::floor, MVT::nxv4f32, 15}, + {Intrinsic::floor, MVT::nxv8f32, 15}, + {Intrinsic::floor, MVT::nxv16f32, 15}, + {Intrinsic::floor, MVT::v2f64, 15}, + {Intrinsic::floor, MVT::v4f64, 15}, + {Intrinsic::floor, MVT::v8f64, 15}, + {Intrinsic::floor, MVT::v16f64, 15}, + {Intrinsic::floor, MVT::nxv1f64, 15}, + {Intrinsic::floor, MVT::nxv2f64, 15}, + {Intrinsic::floor, MVT::nxv4f64, 15}, + {Intrinsic::floor, MVT::nxv8f64, 15}, + {Intrinsic::ceil, MVT::v2f32, 15}, + {Intrinsic::ceil, MVT::v4f32, 15}, + {Intrinsic::ceil, MVT::v8f32, 15}, + {Intrinsic::ceil, MVT::v16f32, 15}, + {Intrinsic::ceil, MVT::nxv2f32, 15}, + {Intrinsic::ceil, MVT::nxv4f32, 15}, + {Intrinsic::ceil, MVT::nxv8f32, 15}, + {Intrinsic::ceil, MVT::nxv16f32, 15}, + {Intrinsic::ceil, MVT::v2f64, 15}, + {Intrinsic::ceil, MVT::v4f64, 15}, + {Intrinsic::ceil, MVT::v8f64, 15}, + {Intrinsic::ceil, MVT::v16f64, 15}, + {Intrinsic::ceil, MVT::nxv1f64, 15}, + {Intrinsic::ceil, MVT::nxv2f64, 15}, + {Intrinsic::ceil, MVT::nxv4f64, 15}, + {Intrinsic::ceil, MVT::nxv8f64, 15}, + {Intrinsic::trunc, MVT::v2f32, 7}, + {Intrinsic::trunc, MVT::v4f32, 7}, + {Intrinsic::trunc, MVT::v8f32, 7}, + {Intrinsic::trunc, MVT::v16f32, 7}, + {Intrinsic::trunc, MVT::nxv2f32, 7}, + {Intrinsic::trunc, MVT::nxv4f32, 7}, + {Intrinsic::trunc, MVT::nxv8f32, 7}, + {Intrinsic::trunc, MVT::nxv16f32, 7}, + {Intrinsic::trunc, MVT::v2f64, 7}, + {Intrinsic::trunc, MVT::v4f64, 7}, + {Intrinsic::trunc, MVT::v8f64, 7}, + {Intrinsic::trunc, MVT::v16f64, 7}, + {Intrinsic::trunc, MVT::nxv1f64, 7}, + {Intrinsic::trunc, MVT::nxv2f64, 7}, + {Intrinsic::trunc, MVT::nxv4f64, 7}, + {Intrinsic::trunc, MVT::nxv8f64, 7}, + {Intrinsic::round, MVT::v2f32, 10}, + {Intrinsic::round, MVT::v4f32, 10}, + {Intrinsic::round, MVT::v8f32, 10}, + {Intrinsic::round, MVT::v16f32, 10}, + {Intrinsic::round, MVT::nxv2f32, 10}, + {Intrinsic::round, MVT::nxv4f32, 10}, + {Intrinsic::round, MVT::nxv8f32, 10}, + {Intrinsic::round, MVT::nxv16f32, 10}, + {Intrinsic::round, MVT::v2f64, 10}, + {Intrinsic::round, MVT::v4f64, 10}, + {Intrinsic::round, MVT::v8f64, 10}, + {Intrinsic::round, MVT::v16f64, 10}, + {Intrinsic::round, MVT::nxv1f64, 10}, + {Intrinsic::round, MVT::nxv2f64, 10}, + {Intrinsic::round, MVT::nxv4f64, 10}, + {Intrinsic::round, MVT::nxv8f64, 10}, +}; + InstructionCost RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) { @@ -262,6 +334,12 @@ return Cost + (LT.first - 1); } default: + if (ST->hasVInstructions() && RetTy->isVectorTy()) { + auto LT = getTypeLegalizationCost(RetTy); + if (const auto *Entry = CostTableLookup(VectorIntrinsicCostTable, + ICA.getID(), LT.second)) + return LT.first * Entry->Cost; + } break; } return BaseT::getIntrinsicInstrCost(ICA, CostKind); diff --git a/llvm/test/Analysis/CostModel/RISCV/fround.ll b/llvm/test/Analysis/CostModel/RISCV/fround.ll --- a/llvm/test/Analysis/CostModel/RISCV/fround.ll +++ b/llvm/test/Analysis/CostModel/RISCV/fround.ll @@ -4,23 +4,23 @@ define void @floor() { ; CHECK-LABEL: 'floor' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.floor.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.floor.v2f32(<2 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.floor.v4f32(<4 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.floor.v8f32(<8 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.floor.v16f32(<16 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.floor.nxv2f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.floor.nxv4f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.floor.nxv8f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.floor.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %2 = call <2 x float> @llvm.floor.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %3 = call <4 x float> @llvm.floor.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %4 = call <8 x float> @llvm.floor.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %5 = call <16 x float> @llvm.floor.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %6 = call @llvm.floor.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %7 = call @llvm.floor.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %8 = call @llvm.floor.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %9 = call @llvm.floor.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.floor.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.floor.v2f64(<2 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.floor.v4f64(<4 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.floor.v8f64(<8 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.floor.v16f64(<16 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.floor.nxv1f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.floor.nxv2f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.floor.nxv4f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.floor.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %11 = call <2 x double> @llvm.floor.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %12 = call <4 x double> @llvm.floor.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %13 = call <8 x double> @llvm.floor.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %14 = call <16 x double> @llvm.floor.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %15 = call @llvm.floor.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %16 = call @llvm.floor.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %17 = call @llvm.floor.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %18 = call @llvm.floor.nxv8f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call float @llvm.floor.f32(float undef) @@ -47,23 +47,23 @@ define void @ceil() { ; CHECK-LABEL: 'ceil' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.ceil.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.ceil.v2f32(<2 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.ceil.v4f32(<4 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.ceil.v8f32(<8 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.ceil.v16f32(<16 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.ceil.nxv2f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.ceil.nxv4f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.ceil.nxv8f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.ceil.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %2 = call <2 x float> @llvm.ceil.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %3 = call <4 x float> @llvm.ceil.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %4 = call <8 x float> @llvm.ceil.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %5 = call <16 x float> @llvm.ceil.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %6 = call @llvm.ceil.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %7 = call @llvm.ceil.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %8 = call @llvm.ceil.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %9 = call @llvm.ceil.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.ceil.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.ceil.v2f64(<2 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.ceil.v4f64(<4 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.ceil.v8f64(<8 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.ceil.v16f64(<16 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.ceil.nxv1f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.ceil.nxv2f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.ceil.nxv4f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.ceil.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %11 = call <2 x double> @llvm.ceil.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %12 = call <4 x double> @llvm.ceil.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %13 = call <8 x double> @llvm.ceil.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %14 = call <16 x double> @llvm.ceil.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %15 = call @llvm.ceil.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %16 = call @llvm.ceil.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %17 = call @llvm.ceil.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %18 = call @llvm.ceil.nxv8f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call float @llvm.ceil.f32(float undef) @@ -90,23 +90,23 @@ define void @trunc() { ; CHECK-LABEL: 'trunc' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.trunc.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.trunc.v2f32(<2 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.trunc.v4f32(<4 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.trunc.v8f32(<8 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.trunc.v16f32(<16 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.trunc.nxv2f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.trunc.nxv4f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.trunc.nxv8f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.trunc.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %2 = call <2 x float> @llvm.trunc.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %3 = call <4 x float> @llvm.trunc.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %4 = call <8 x float> @llvm.trunc.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %5 = call <16 x float> @llvm.trunc.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %6 = call @llvm.trunc.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %7 = call @llvm.trunc.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %8 = call @llvm.trunc.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %9 = call @llvm.trunc.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.trunc.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.trunc.v2f64(<2 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.trunc.v4f64(<4 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.trunc.v8f64(<8 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.trunc.v16f64(<16 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.trunc.nxv1f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.trunc.nxv2f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.trunc.nxv4f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.trunc.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %11 = call <2 x double> @llvm.trunc.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %12 = call <4 x double> @llvm.trunc.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %13 = call <8 x double> @llvm.trunc.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %14 = call <16 x double> @llvm.trunc.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %15 = call @llvm.trunc.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %16 = call @llvm.trunc.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %17 = call @llvm.trunc.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %18 = call @llvm.trunc.nxv8f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call float @llvm.trunc.f32(float undef) @@ -219,23 +219,23 @@ define void @round() { ; CHECK-LABEL: 'round' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.round.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = call <2 x float> @llvm.round.v2f32(<2 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = call <4 x float> @llvm.round.v4f32(<4 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = call <8 x float> @llvm.round.v8f32(<8 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = call <16 x float> @llvm.round.v16f32(<16 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = call @llvm.round.nxv2f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = call @llvm.round.nxv4f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = call @llvm.round.nxv8f32( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = call @llvm.round.nxv16f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %2 = call <2 x float> @llvm.round.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %3 = call <4 x float> @llvm.round.v4f32(<4 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %4 = call <8 x float> @llvm.round.v8f32(<8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %5 = call <16 x float> @llvm.round.v16f32(<16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %6 = call @llvm.round.nxv2f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %7 = call @llvm.round.nxv4f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %8 = call @llvm.round.nxv8f32( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %9 = call @llvm.round.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %10 = call double @llvm.round.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = call <2 x double> @llvm.round.v2f64(<2 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = call <4 x double> @llvm.round.v4f64(<4 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = call <8 x double> @llvm.round.v8f64(<8 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = call <16 x double> @llvm.round.v16f64(<16 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = call @llvm.round.nxv1f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = call @llvm.round.nxv2f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = call @llvm.round.nxv4f64( undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = call @llvm.round.nxv8f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call <2 x double> @llvm.round.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %12 = call <4 x double> @llvm.round.v4f64(<4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %13 = call <8 x double> @llvm.round.v8f64(<8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %14 = call <16 x double> @llvm.round.v16f64(<16 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %15 = call @llvm.round.nxv1f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %16 = call @llvm.round.nxv2f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %17 = call @llvm.round.nxv4f64( undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %18 = call @llvm.round.nxv8f64( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; call float @llvm.round.f32(float undef)