[SVE][Codegen] Lower legal min & max operations
authorKerry McLaughlin <kerry.mclaughlin@arm.com>
Mon, 4 May 2020 10:18:50 +0000 (11:18 +0100)
committerKerry McLaughlin <kerry.mclaughlin@arm.com>
Mon, 4 May 2020 10:19:19 +0000 (11:19 +0100)
commit19f5da9c1d698653f942b504544a73b85b1e703c
tree281c5ff1e8a64f74209731f4e9bc65883eb16dd9
parente737847b8fc36b6526ad6c7ceb65d0bd07358497
[SVE][Codegen] Lower legal min & max operations

Summary:
This patch adds AArch64ISD nodes for [S|U]MIN_PRED
and [S|U]MAX_PRED, and lowers both SVE intrinsics and
IR operations for min and max to these nodes.

There are two forms of these instructions for SVE: a predicated
form and an immediate (unpredicated) form. The patterns
which existed for the latter have been updated to match a
predicated node with an immediate and map this
to the immediate instruction.

Reviewers: sdesmalen, efriedma, dancgr, rengolin

Reviewed By: efriedma

Subscribers: huihuiz, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79087
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
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/llvm-ir-to-intrinsic.ll
llvm/test/CodeGen/AArch64/sve-intrinsics-int-arith-imm.ll