[ARM] Sink splats to vector float instructions
authorDavid Green <david.green@arm.com>
Wed, 25 Mar 2020 11:35:53 +0000 (11:35 +0000)
committerDavid Green <david.green@arm.com>
Thu, 26 Mar 2020 09:02:18 +0000 (09:02 +0000)
commit37b9cc8f29e993ba9894402dd87f9c4be83cb8f6
tree0e013846ba3c90b35d92a655e3e254de25da36ae
parent7af74ee89a01bbba230bbf18bb1cb455b5f056b0
[ARM] Sink splats to vector float instructions

Some MVE floating point instructions have gpr register variants that take
the scalar gpr value and splat them to all lanes. In order to accept
them in loops, the shuffle_vector and insert need to be sunk down into
the loop, next to the instruction so that ISel can see the whole
pattern.

This does that sinking for FAdd, FSub, FMul and FCmp. The patterns for
mul are slightly more constrained as there are no fms variants taking
register arguments.

Differential Revision: https://reviews.llvm.org/D76023
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-float16regloops.ll
llvm/test/CodeGen/Thumb2/mve-float32regloops.ll
llvm/test/CodeGen/Thumb2/mve-pred-threshold.ll