[ARM] Always use reductions intrinsics under MVE
authorDavid Green <david.green@arm.com>
Fri, 12 Jun 2020 10:35:03 +0000 (11:35 +0100)
committerDavid Green <david.green@arm.com>
Fri, 12 Jun 2020 18:21:17 +0000 (19:21 +0100)
commit46529978bfb3a05297db95c213c72556f3efeec3
treeee5d6680760ce1f40eb8d5f0edec34b7afdac252
parent4bf1124edab5cb489bdf21c05b083a95d263015e
[ARM] Always use reductions intrinsics under MVE

Similar to a recent change to the X86 backend, this changes things so
that we always produce a reduction intrinsics for all reduction types,
not just the legal ones. This gives a better chance in the backend to
custom lower them to something more suitable for MVE. Especially for
something like fadd the in-order reduction produced during DAG lowering
is already better than the shuffles produced in the midend, and we can
do even better with a bit of custom lowering.

Differential Revision: https://reviews.llvm.org/D81398
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Transforms/LoopVectorize/ARM/mve-reduction-types.ll