[ARM] Generate VDUP(Const) from constant buildvectors
authorDavid Green <david.green@arm.com>
Tue, 8 Jun 2021 19:51:33 +0000 (20:51 +0100)
committerDavid Green <david.green@arm.com>
Tue, 8 Jun 2021 19:51:33 +0000 (20:51 +0100)
commitd7853bae941006cece63013f09d524e72bbbec45
treea059f87177bf64d66cdcf87480fda5ba10fdb3eb
parentdc0c3fe5f35eb5fc8d5b36bb79761fb374a87269
[ARM] Generate VDUP(Const) from constant buildvectors

If we cannot otherwise use a VMOVimm/VMOVFPimm/VMVNimm, fall back to
producing a VDUP(const) as opposed to a constant pool load. This will at
least be smaller codesize and can allow the VDUP to be folded into other
instructions.

Differential Revision: https://reviews.llvm.org/D103808
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/predicated-liveout-unknown-lanes.ll
llvm/test/CodeGen/Thumb2/mve-fp16convertloops.ll
llvm/test/CodeGen/Thumb2/mve-gather-scatter-tailpred.ll
llvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll
llvm/test/CodeGen/Thumb2/mve-shifts.ll
llvm/test/CodeGen/Thumb2/mve-vmovimm.ll
llvm/test/CodeGen/Thumb2/mve-vmvnimm.ll