[llvm] [TLI] ReplaceWithVecLib pass uses CostModel (PR #78688)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 03:18:24 PST 2024
================
@@ -96,15 +102,55 @@ static void replaceWithTLIFunction(Instruction &I, VFInfo &Info,
Replacement->copyFastMathFlags(&I);
}
+/// Returns whether the vector library call \p TLIFunc costs more than the
+/// original instruction \p I.
+static bool isVeclibCallSlower(const TargetLibraryInfo &TLI,
+ const TargetTransformInfo &TTI, Instruction &I,
+ VectorType *VectorTy, CallInst *CI,
+ Function *TLIFunc) {
+ SmallVector<Type *, 4> OpTypes;
+ for (auto &Op : CI ? CI->args() : I.operands())
----------------
huntergr-arm wrote:
Should only need the `I.operands()`;
https://github.com/llvm/llvm-project/pull/78688
More information about the llvm-commits
mailing list