[llvm-branch-commits] [llvm] [AArch64] SLP can vectorize frem (PR #82488)
Alexey Bataev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 22 05:30:05 PST 2024
================
@@ -869,6 +870,18 @@ TargetTransformInfo::getOperandInfo(const Value *V) {
return {OpInfo, OpProps};
}
+InstructionCost TargetTransformInfo::getVecLibCallCost(
+ const int OpCode, const TargetLibraryInfo *TLI, VectorType *VecTy,
+ TTI::TargetCostKind CostKind) {
+ Type *ScalarTy = VecTy->getScalarType();
+ LibFunc Func;
+ if (TLI->getLibFunc(OpCode, ScalarTy, Func) &&
+ TLI->isFunctionVectorizable(TLI->getName(Func), VecTy->getElementCount()))
----------------
alexey-bataev wrote:
Yes, and what I'm saying that TTI should handle this since this is target-specific lowering.
If you don't want to propagate TLI, then just copy the legality checks from TLI to TTI and the cost estimation for this specific lowering to the getArithmeticInstructionCost function. This is what we usually do in similar cases for other targets.
https://github.com/llvm/llvm-project/pull/82488
More information about the llvm-branch-commits
mailing list