[AArch64][SVE] Custom lowering of floating-point reductions
authorCullen Rhodes <cullen.rhodes@arm.com>
Tue, 21 Apr 2020 10:44:46 +0000 (10:44 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Thu, 30 Apr 2020 10:18:40 +0000 (10:18 +0000)
commit672b62ea21dfe5f9bfb2b0362785f2685be830a0
tree32e666900d279e8c948ee8019a45de55ff83d523
parent058cd8c5be1cb6c74c0cfc154a61ea859e1c8811
[AArch64][SVE] Custom lowering of floating-point reductions

Summary:
This patch implements custom floating-point reduction ISD nodes that
have vector results, which are used to lower the following intrinsics:

    * llvm.aarch64.sve.fadda
    * llvm.aarch64.sve.faddv
    * llvm.aarch64.sve.fmaxv
    * llvm.aarch64.sve.fmaxnmv
    * llvm.aarch64.sve.fminv
    * llvm.aarch64.sve.fminnmv

SVE reduction instructions keep their result within a vector register,
with all other bits set to zero.

Changes in this patch were implemented by Paul Walker and Sander de
Smalen.

Reviewers: sdesmalen, efriedma, rengolin

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D78723
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
llvm/test/CodeGen/AArch64/sve-intrinsics-fp-reduce.ll