[PATCH] D126201: [WIP] Very early work to enable isel of fixed length vector extracts from scalable vectors.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 07:33:08 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/include/llvm/Target/TargetSelectionDAG.td:698
+// Extract/Insert fixed length subvector form scalable vector.
+def extract_subvector2 : SDNode<"ISD::EXTRACT_SUBVECTOR", SDTSubVecExtract2, []>;
+
----------------
david-arm wrote:
> paulwalker-arm wrote:
> > Created new variant because `SDTSubVecExtract` does not support missed datatypes.  Changing `SDTSubVecExtract` causes LLVM not to build because many isel patterns need updating.  Not 100% sure this is the way to go, just depends on how many isel patterns need to be changed.
> I imagine you'll need a new ISD enum too, i.e. ISD::EXTRACT_SUBVECTOR2 because otherwise it may alias with `def extract_subvector`?
To be honest I think updating `SDTSubVecExtract` is the way to go, but if I do continue with the current route it shouldn't matter because the two definitions will have mutually exclusive type requirements [1] so a 1-1 mapping will be maintained.

[1] extract_subvector requires `A.isScalable() == B.isScalable()`, whereas the new def will require `A.isScalable() != B.isScalable()`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126201



More information about the llvm-commits mailing list