[AArch64][SVE] Add hadd and rhadd support
authorDavid Green <david.green@arm.com>
Wed, 14 Dec 2022 09:24:54 +0000 (09:24 +0000)
committerDavid Green <david.green@arm.com>
Wed, 14 Dec 2022 09:24:54 +0000 (09:24 +0000)
commit1da4d5aafad74a3d9a3b893335249c9e5b4a7ab9
tree695fd2f727e4ddd9d0490ef373b6db2e7b4a95c1
parent339a7687e1c036a5f91c9d5391523b93e2e76cd3
[AArch64][SVE] Add hadd and rhadd support

This adds basic HADD and RHADD support for SVE, by marking the AVGFLOOR
and AVGCEIL as custom and converting those to HADD_PRED/RHADD_PRED
AArch64 nodes. Both the existing intrinsics and the _PRED nodes are then
lowered to the _ZPmZ instructions.

Differential Revision: https://reviews.llvm.org/D131875
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/test/CodeGen/AArch64/sve2-hadd.ll