@@ -925,51 +925,6 @@ void VPWidenCallRecipe::execute(VPTransformState &State) {
925
925
}
926
926
}
927
927
928
- InstructionCost VPWidenCallRecipe::computeCost (ElementCount VF,
929
- VPCostContext &Ctx) const {
930
- TTI::TargetCostKind CostKind = TTI::TCK_RecipThroughput;
931
- if (Variant) {
932
- return Ctx.TTI .getCallInstrCost (nullptr , Variant->getReturnType (),
933
- Variant->getFunctionType ()->params (),
934
- CostKind);
935
- }
936
-
937
- FastMathFlags FMF;
938
- // TODO: Manage flags via VPRecipeWithIRFlags.
939
- if (auto *FPMO = dyn_cast_or_null<FPMathOperator>(getUnderlyingValue ()))
940
- FMF = FPMO->getFastMathFlags ();
941
-
942
- // Some backends analyze intrinsic arguments to determine cost. Use the
943
- // underlying value for the operand if it has one. Otherwise try to use the
944
- // operand of the underlying call instruction, if there is one. Otherwise
945
- // clear Arguments.
946
- // TODO: Rework TTI interface to be independent of concrete IR values.
947
- SmallVector<const Value *> Arguments;
948
- for (const auto &[Idx, Op] : enumerate(operands ())) {
949
- auto *V = Op->getUnderlyingValue ();
950
- if (!V) {
951
- if (auto *UI = dyn_cast_or_null<CallBase>(getUnderlyingValue ())) {
952
- Arguments.push_back (UI->getArgOperand (Idx));
953
- continue ;
954
- }
955
- Arguments.clear ();
956
- break ;
957
- }
958
- Arguments.push_back (V);
959
- }
960
-
961
- Type *RetTy =
962
- ToVectorTy (Ctx.Types .inferScalarType (this ->getVPSingleValue ()), VF);
963
- SmallVector<Type *> ParamTys;
964
- for (unsigned I = 0 ; I != getNumOperands (); ++I)
965
- ParamTys.push_back (
966
- ToVectorTy (Ctx.Types .inferScalarType (getOperand (I)), VF));
967
-
968
- IntrinsicCostAttributes CostAttrs (VectorIntrinsicID, RetTy, Arguments,
969
- ParamTys, FMF);
970
- return Ctx.TTI .getIntrinsicInstrCost (CostAttrs, CostKind);
971
- }
972
-
973
928
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
974
929
void VPWidenCallRecipe::print (raw_ostream &O, const Twine &Indent,
975
930
VPSlotTracker &SlotTracker) const {
0 commit comments