[PATCH] D94883: [CodeGen][SelectionDAG]Add new intrinsic experimental.vector.reverse

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 24 03:39:37 PST 2021


paulwalker-arm added a comment.

In D94883#2515136 <https://reviews.llvm.org/D94883#2515136>, @fhahn wrote:

> Taking a step back, are there plans to use the intrinsics for fixed vectors?

I'd like to say yes but at this stage it is too early to say.  What we definitely need is a unified interface so that transforms can be written without needing to worry about the type of vector.  If a pass uses an IRBuilder then great, we can hide the "do I create a shufflevector or intrinsic" code behind suitably names functions (e.g. craeteVectorSplice()...).  For passes that want to create a node directly then we'd recommend just creating an intrinsic call with the expectation that those working with fixed length vectors are transformed to shufflevector sufficiently early to maintain existing code quality.

Once we're at a stage where the expected shuffle optimisations apply equally well to the intrinsic variants, there's consensus of how LLVM will represent step vector like constants and ultimately the final decision on if/how shufflevector can operate on scalable vectors, we should be in a position to determine whether it is worth unifying shuffles paths (i.e. minimise the use of shufflevector).

Just an extra note to say that whilst the above is true for the intrinsics, it doesn't necessarily hold for the ISD nodes, where I believe the common case will be to rely on VECTOR_SHUFFLE to implement the vector intrinsics that operate on fixed length vectors.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94883/new/

https://reviews.llvm.org/D94883



More information about the llvm-commits mailing list