[PATCH] D30680: new method TargetTransformInfo::supportsVectorElementLoadStore() for LoopVectorizer

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 22:14:04 PDT 2017


jonpa added a comment.

In https://reviews.llvm.org/D30680#713268, @anemet wrote:

> Sorry about the delay on this but I was working on something related for ARM that may benefit from this as well.  What I need for ARM is something that can communicate to the SLPVectorizer that load-pair and store-pair (of two registers) is efficiently supported on the target.  I am wondering if we can combine the two things if your new hook would take the type and the vectorization width.
>
> What do you think?


Is this also in the context of scalarizing a load / store?

For SystemZ, a scalarized memory access will have to do VF memory operations, but there is no need to extract or insert any of the data elements, as there are vector element load/store instructions.

I am not sure if you mean that there is no scalarization cost and that there is a lowered (halfed) memoryOpCost, or that you mean that you could extract / insert two elements at a time?

In the latter case, I suppose we could use something like getLoadStoreScalarizationDiscount(VF), instead of the current patch.

In the first case, I suppose you should use this new hook, along with adjusting the getMemoryOpCost() method.


https://reviews.llvm.org/D30680





More information about the llvm-commits mailing list