[llvm-branch-commits] [llvm] [AArch64] SLP can vectorize frem (PR #82488)
Paul Walker via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 21 10:24:59 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()))
----------------
paulwalker-arm wrote:
This seems to be surreptitiously adding another mechanism to check for the presence of a vector math routine. Under what circumstance do you need to check for the cost of something that might not exist? I would expect TLI to be queried directly as part of a transformation and once they've concluded a vector math call exists then they'd simply query the cost of the call.
https://github.com/llvm/llvm-project/pull/82488
More information about the llvm-branch-commits
mailing list