[SVE] Custom ISel for fixed length extract/insert_subvector.
authorPaul Walker <paul.walker@arm.com>
Wed, 8 Jul 2020 09:10:16 +0000 (09:10 +0000)
committerPaul Walker <paul.walker@arm.com>
Wed, 8 Jul 2020 09:49:28 +0000 (09:49 +0000)
commitfb75451775f83c04d53e4e94bb4bd298ea9a882f
tree130be967ea8e4a3c0bd90d1caf037f53f5c0c8b8
parente9f943429c895e4d6d29505fab2fad365fe2766e
[SVE] Custom ISel for fixed length extract/insert_subvector.

We use extact_subvector and insert_subvector to "cast" between
fixed length and scalable vectors.  This patch adds custom c++
based ISel for the following cases:

  fixed_vector = ISD::EXTRACT_SUBVECTOR scalable_vector, 0
  scalable_vector = ISD::INSERT_SUBVECTOR undef(scalable_vector), fixed_vector, 0

Which result in either EXTRACT_SUBREG/INSERT_SUBREG for NEON sized
vectors or COPY_TO_REGCLASS otherwise.

Differential Revision: https://reviews.llvm.org/D82871
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/test/CodeGen/AArch64/sve-fixed-length-subvector.ll [new file with mode: 0644]