[ARM] Convert VDUPLANE to VDUP under MVE
authorDavid Green <david.green@arm.com>
Sat, 9 May 2020 14:17:50 +0000 (15:17 +0100)
committerDavid Green <david.green@arm.com>
Sat, 9 May 2020 17:58:13 +0000 (18:58 +0100)
commit6eee2d9b5bdd5dacb2669c0b8f5a76cb64f363e3
tree2e4bb22a2ed9326338cd4107638535a9af286c2a
parent0e49ac73eaf554ad4135f51b03ea4eadaebf0466
[ARM] Convert VDUPLANE to VDUP under MVE

Unlike Neon, MVE does not have a way of duplicating from a vector lane,
so a VDUPLANE currently selects to a VDUP(move_from_lane(..)). This
forces that to be done earlier as a dag combine to allow other folds to
happen.

It converts to a VDUP(EXTRACT). On FP16 this is then folded to a
VGETLANEu to prevent it from creating a vmovx;vmovhr pair, using a
single move_from_reg instead.

Differential Revision: https://reviews.llvm.org/D79606
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/LowOverheadLoops/fast-fp-loops.ll
llvm/test/CodeGen/Thumb2/mve-pred-shuffle.ll
llvm/test/CodeGen/Thumb2/mve-vdup.ll
llvm/test/CodeGen/Thumb2/mve-vecreduce-fminmax.ll
llvm/test/CodeGen/Thumb2/mve-vld3.ll
llvm/test/CodeGen/Thumb2/mve-vld4.ll
llvm/test/CodeGen/Thumb2/mve-vst3.ll