[ARM] Sink add/mul(shufflevector(insertelement())) for MVE instruction selection
authorSam Tebbs <sam.tebbs@arm.com>
Fri, 6 Sep 2019 16:01:32 +0000 (16:01 +0000)
committerSam Tebbs <sam.tebbs@arm.com>
Fri, 6 Sep 2019 16:01:32 +0000 (16:01 +0000)
commitf1cdd95a2fe79fbcd7fd440509a754bc3afaf088
treef36f31741b8883c8c19f035cdc26ee3c9f4ee927
parent8d30c1dcec2a935e0b1cffc26fdc6054ff101f53
[ARM] Sink add/mul(shufflevector(insertelement())) for MVE instruction selection

This patch sinks add/mul(shufflevector(insertelement())) into the basic block in which they are used so that they can then be selected together.

This is useful for various MVE instructions, such as vmla and others that take R registers.

Loop tests have been added to the vmla test file to make sure vmlas are generated in loops.

Differential revision: https://reviews.llvm.org/D66295

llvm-svn: 371218
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-vmla.ll
llvm/test/Transforms/CodeGenPrepare/ARM/sink-add-mul-shufflevector.ll [new file with mode: 0644]