OSDN Git Service

[ARM] Extra MVE VMLAV reduction patterns
authorDavid Green <david.green@arm.com>
Fri, 29 May 2020 13:45:08 +0000 (14:45 +0100)
committerDavid Green <david.green@arm.com>
Fri, 29 May 2020 15:23:24 +0000 (16:23 +0100)
commit747c574b94595c6209185c87e79f51bff46fd4d8
treea08e18a23b0670bf30fc00964f393616f2ada091
parent34cfed24ebd3a2a9f286877d142a68dbf2c42c96
[ARM] Extra MVE VMLAV reduction patterns

These patterns for i8 and i16 VMLA's were missing. They end up from
legalized vector.reduce.add.v8i16 and vector.reduce.add.v16i8, and
although the instruction works differently (the mul and add are
performed in a higher precision), I believe it is OK because only an
i8/i16 are demanded from them, and so the results will be the same. At
least, they pass any testing I can think to run on them.

There are some tests that end up looking worse, but are quite artificial
due to passing half vector types through a call boundary. I would not
expect the vmull to realistically come up like that, and a vmlava is
likely better a lot of the time.

Differential Revision: https://reviews.llvm.org/D80524
llvm/lib/Target/ARM/ARMInstrMVE.td
llvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll