[ARM] Add MVE insert-of-extract pattern
authorDavid Green <david.green@arm.com>
Tue, 2 Feb 2021 15:15:04 +0000 (15:15 +0000)
committerDavid Green <david.green@arm.com>
Tue, 2 Feb 2021 15:15:04 +0000 (15:15 +0000)
commit3a5adf84834a2b6fad57214278e4ec743977356c
tree691fa7a07b3dbd088f7f5a830050a72da9e8f62c
parent903a153409b8640aac30fa0b46b9a99ad90fe786
[ARM] Add MVE insert-of-extract pattern

A v4i32 insert of an extract can become a simple lane move, as opposed
to round-tripping via a GPR. This adds a patterns that turns an v4i32
insert-extract pair into a EXTRACT_SUBREG/INSERT_SUBREG, with the
required COPY_TO_REGCLASS. These get better optimized into a simple lane
move by the rest of the backend.

Differential Revision: https://reviews.llvm.org/D95428
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-vecreduce-add.ll