[llvm] [TLI] ReplaceWithVecLib pass uses CostModel (PR #78688)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 03:17:28 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,
----------------
huntergr-arm wrote:
I think you can just pass the instruction and re-cast it here instead of passing both.
https://github.com/llvm/llvm-project/pull/78688
More information about the llvm-commits
mailing list