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