xref: /freebsd/contrib/llvm-project/llvm/lib/Target/VE/VVPNodes.def (revision 0eae32dcef82f6f06de6419a0d623d7def0cc8f6)
1e8d8bef9SDimitry Andric//===-- VVPNodes.def - Lists & properties of VE Vector Predication Nodes --===//
2e8d8bef9SDimitry Andric//
3e8d8bef9SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e8d8bef9SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
5e8d8bef9SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e8d8bef9SDimitry Andric//
7e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
8e8d8bef9SDimitry Andric//
9e8d8bef9SDimitry Andric// This file defines all VVP_* SDNodes and their properties
10e8d8bef9SDimitry Andric//
11e8d8bef9SDimitry Andric//===----------------------------------------------------------------------===//
12e8d8bef9SDimitry Andric
13e8d8bef9SDimitry Andric/// HANDLE_VP_TO_VVP(VPOPC, VVPOPC)
14e8d8bef9SDimitry Andric/// \p  VPOPC is the VP_* SDNode opcode.
15e8d8bef9SDimitry Andric/// \p  VVPOPC is the VVP_* SDNode opcode.
16e8d8bef9SDimitry Andric#ifndef HANDLE_VP_TO_VVP
17e8d8bef9SDimitry Andric#define HANDLE_VP_TO_VVP(VPOPC, VVPOPC)
18e8d8bef9SDimitry Andric#endif
19e8d8bef9SDimitry Andric
20e8d8bef9SDimitry Andric/// ADD_VVP_OP(VVPNAME,SDNAME)
21e8d8bef9SDimitry Andric/// \p VVPName is a VVP SDNode operator.
22e8d8bef9SDimitry Andric/// \p SDNAME is the generic SD opcode corresponding to \p VVPName.
23e8d8bef9SDimitry Andric#ifndef ADD_VVP_OP
24e8d8bef9SDimitry Andric#define ADD_VVP_OP(X, Y)
25e8d8bef9SDimitry Andric#endif
26e8d8bef9SDimitry Andric
27e8d8bef9SDimitry Andric/// ADD_BINARY_VVP_OP(VVPNAME,SDNAME)
28e8d8bef9SDimitry Andric/// \p VVPName is a VVP Binary operator.
29e8d8bef9SDimitry Andric/// \p SDNAME is the generic SD opcode corresponding to \p VVPName.
30e8d8bef9SDimitry Andric#ifndef ADD_BINARY_VVP_OP
31*0eae32dcSDimitry Andric#define ADD_BINARY_VVP_OP(VVPNAME,VPNAME,SDNAME) \
32*0eae32dcSDimitry Andric            ADD_VVP_OP(VVPNAME,SDNAME) \
33*0eae32dcSDimitry Andric            HANDLE_VP_TO_VVP(VPNAME, VVPNAME)
34*0eae32dcSDimitry Andric#endif
35*0eae32dcSDimitry Andric
36*0eae32dcSDimitry Andric#ifndef ADD_BINARY_VVP_OP_COMPACT
37*0eae32dcSDimitry Andric#define ADD_BINARY_VVP_OP_COMPACT(NAME) \
38*0eae32dcSDimitry Andric    ADD_BINARY_VVP_OP(VVP_##NAME,VP_##NAME,NAME)
39e8d8bef9SDimitry Andric#endif
40e8d8bef9SDimitry Andric
41e8d8bef9SDimitry Andric// Integer arithmetic.
42*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(ADD)
43*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(SUB)
44*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(MUL)
45*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(UDIV)
46*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(SDIV)
47e8d8bef9SDimitry Andric
48*0eae32dcSDimitry AndricADD_BINARY_VVP_OP(VVP_SRA,VP_ASHR,SRA)
49*0eae32dcSDimitry AndricADD_BINARY_VVP_OP(VVP_SRL,VP_LSHR,SRL)
50*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(SHL)
51e8d8bef9SDimitry Andric
52*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(AND)
53*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(OR)
54*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(XOR)
55*0eae32dcSDimitry Andric
56*0eae32dcSDimitry Andric// FP arithmetic.
57*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(FADD)
58*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(FSUB)
59*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(FMUL)
60*0eae32dcSDimitry AndricADD_BINARY_VVP_OP_COMPACT(FDIV)
61*0eae32dcSDimitry Andric
62e8d8bef9SDimitry Andric#undef ADD_BINARY_VVP_OP
63*0eae32dcSDimitry Andric#undef ADD_BINARY_VVP_OP_COMPACT
64e8d8bef9SDimitry Andric#undef ADD_VVP_OP
65*0eae32dcSDimitry Andric#undef HANDLE_VP_TO_VVP
66