[ARM] Move add(VMLALVA(A, X, Y), B) to VMLALVA(add(A, B), X, Y)
authorDavid Green <david.green@arm.com>
Wed, 14 Jul 2021 19:06:49 +0000 (20:06 +0100)
committerDavid Green <david.green@arm.com>
Wed, 14 Jul 2021 19:06:49 +0000 (20:06 +0100)
commit31b8f400066c3998edc5650300301c1219468ef2
treef784d7dac299bc51a0b828766eb58dbcf0c79541
parent14362bf1b2589f8a769709be599f24ab7eee6d6e
[ARM] Move add(VMLALVA(A, X, Y), B) to VMLALVA(add(A, B), X, Y)

For i64 reductions we currently try and convert add(VMLALV(X, Y), B) to
VMLALVA(B, X, Y), incorporating the addition into the VMLALVA. If we
have an add of an existing VMLALVA, this patch pushes the add up above
the VMLALVA so that it may potentially be simplified further, for
example being folded into another VMLALV.

Differential Revision: https://reviews.llvm.org/D105686
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll