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

Chris B via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 17:15:21 PST 2024


llvm-beanz wrote:

> @llvm-beanz I think I misunderstood what you were asking. We aren't implementing the TTI for all of `VectorUtils`.
I was not asking you to do that. I understand this is just one method.

> We don't have tests for target intrinsics that are vectorizable. Maybe one day it makes sense to add them for SPIRV? But for DirectX keeping these changes in the Scalairzer is our path forward. It looks like @inbelic did update all the Scalairzer uses.

I'm also unsure how this relates to my comment.

This change partially moves `isVectorIntrinsicWithOverloadTypeAtArg` from VectorUtils to TTI. It doesn't completely move it, it just half moves it... That seems like a really odd place to leave the code. The SLPVectorizer or VPlanRecipes not having TTI is a solvable problem.

It seems to me that we should have one way to query `isVectorIntrinsicWithOverloadTypeAtArg` across all passes, not two.

(cc @bogner)

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


More information about the llvm-commits mailing list