[ARM] i16 insert-of-extract to VINS pattern
authorDavid Green <david.green@arm.com>
Mon, 8 Feb 2021 08:41:07 +0000 (08:41 +0000)
committerDavid Green <david.green@arm.com>
Mon, 8 Feb 2021 08:41:07 +0000 (08:41 +0000)
commit1b435eb8f3b71d11976c04bb6b99d6502aed2aab
tree7479c35ee09f6aa9906cb3792f224ad77f214865
parent0c42d87ea8e01f369d9cced7427a5ee0cca7574b
[ARM] i16 insert-of-extract to VINS pattern

This adds another tablegen fold that converts an i16 odd-lane-insert of
an even-lane-extract into a VINS. We extract the existing f32 value from
the destination register and VINS the new value into it. The rest of the
backend then is able to optimize the INSERT_SUBREG / COPY_TO_REGCLASS /
EXTRACT_SUBREG.

Differential Revision: https://reviews.llvm.org/D95456
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-shuffle.ll
llvm/test/CodeGen/Thumb2/mve-vld3.ll
llvm/test/CodeGen/Thumb2/mve-vst3.ll