[llvm] [NFC][Scalarizer][TargetTransformInfo] Add `isVectorIntrinsicWithOverloadTypeAtArg` api (PR #114849)

Finn Plummer via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 14:15:52 PST 2024


================
@@ -110,15 +110,17 @@ static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
 
   // OloadTys collects types used in scalar intrinsic overload name.
   SmallVector<Type *, 3> OloadTys;
-  if (!RetTy->isVoidTy() && isVectorIntrinsicWithOverloadTypeAtArg(IID, -1))
+  if (!RetTy->isVoidTy() &&
+      isVectorIntrinsicWithOverloadTypeAtArg(IID, -1, /*TTI=*/nullptr))
----------------
inbelic wrote:

Regarding adding a dependency on the `TargetTransformInfo` analysis pass to retrieve TTI. There is currently no code path that would execute and actually use `TTI` in the `VectorUtils.cpp` function. While I don't expect the pass is expensive to do, it is currently completely unnecessary work regardless.  So I think it is okay to defer until there is an actual use case. Which as mentioned, seems unlikely.

https://github.com/llvm/llvm-project/pull/114849


More information about the llvm-commits mailing list