10b57cec5SDimitry Andric//===- TargetGlobalISel.td - Common code for GlobalISel ----*- tablegen -*-===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric// 90b57cec5SDimitry Andric// This file defines the target-independent interfaces used to support 100b57cec5SDimitry Andric// SelectionDAG instruction selection patterns (specified in 110b57cec5SDimitry Andric// TargetSelectionDAG.td) when generating GlobalISel instruction selectors. 120b57cec5SDimitry Andric// 130b57cec5SDimitry Andric// This is intended as a compatibility layer, to enable reuse of target 140b57cec5SDimitry Andric// descriptions written for SelectionDAG without requiring explicit GlobalISel 150b57cec5SDimitry Andric// support. It will eventually supersede SelectionDAG patterns. 160b57cec5SDimitry Andric// 170b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric// Declare that a generic Instruction is 'equivalent' to an SDNode, that is, 200b57cec5SDimitry Andric// SelectionDAG patterns involving the SDNode can be transformed to match the 210b57cec5SDimitry Andric// Instruction instead. 220b57cec5SDimitry Andricclass GINodeEquiv<Instruction i, SDNode node> { 230b57cec5SDimitry Andric Instruction I = i; 240b57cec5SDimitry Andric SDNode Node = node; 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric // SelectionDAG has separate nodes for atomic and non-atomic memory operations 270b57cec5SDimitry Andric // (ISD::LOAD, ISD::ATOMIC_LOAD, ISD::STORE, ISD::ATOMIC_STORE) but GlobalISel 280b57cec5SDimitry Andric // stores this information in the MachineMemoryOperand. 29e8d8bef9SDimitry Andric bit CheckMMOIsNonAtomic = false; 30e8d8bef9SDimitry Andric bit CheckMMOIsAtomic = false; 310b57cec5SDimitry Andric 320b57cec5SDimitry Andric // SelectionDAG has one node for all loads and uses predicates to 330b57cec5SDimitry Andric // differentiate them. GlobalISel on the other hand uses separate opcodes. 340b57cec5SDimitry Andric // When this is true, the resulting opcode is G_LOAD/G_SEXTLOAD/G_ZEXTLOAD 350b57cec5SDimitry Andric // depending on the predicates on the node. 360b57cec5SDimitry Andric Instruction IfSignExtend = ?; 370b57cec5SDimitry Andric Instruction IfZeroExtend = ?; 388bcb0991SDimitry Andric 398bcb0991SDimitry Andric // SelectionDAG has one setcc for all compares. This differentiates 408bcb0991SDimitry Andric // for G_ICMP and G_FCMP. 418bcb0991SDimitry Andric Instruction IfFloatingPoint = ?; 425f757f3fSDimitry Andric 435f757f3fSDimitry Andric // SelectionDAG does not differentiate between convergent and non-convergent 445f757f3fSDimitry Andric // intrinsics. This specifies an alternate opcode for a convergent intrinsic. 455f757f3fSDimitry Andric Instruction IfConvergent = ?; 460b57cec5SDimitry Andric} 470b57cec5SDimitry Andric 480b57cec5SDimitry Andric// These are defined in the same order as the G_* instructions. 490b57cec5SDimitry Andricdef : GINodeEquiv<G_ANYEXT, anyext>; 500b57cec5SDimitry Andricdef : GINodeEquiv<G_SEXT, sext>; 510b57cec5SDimitry Andricdef : GINodeEquiv<G_ZEXT, zext>; 520b57cec5SDimitry Andricdef : GINodeEquiv<G_TRUNC, trunc>; 530b57cec5SDimitry Andricdef : GINodeEquiv<G_BITCAST, bitconvert>; 540b57cec5SDimitry Andric// G_INTTOPTR - SelectionDAG has no equivalent. 550b57cec5SDimitry Andric// G_PTRTOINT - SelectionDAG has no equivalent. 560b57cec5SDimitry Andricdef : GINodeEquiv<G_CONSTANT, imm>; 57fe6060f1SDimitry Andric// timm must not be materialized and therefore has no GlobalISel equivalent 580b57cec5SDimitry Andricdef : GINodeEquiv<G_FCONSTANT, fpimm>; 598bcb0991SDimitry Andricdef : GINodeEquiv<G_IMPLICIT_DEF, undef>; 60e8d8bef9SDimitry Andricdef : GINodeEquiv<G_FRAME_INDEX, frameindex>; 61e8d8bef9SDimitry Andricdef : GINodeEquiv<G_BLOCK_ADDR, blockaddress>; 62bdd1243dSDimitry Andricdef : GINodeEquiv<G_PTR_ADD, ptradd>; 630b57cec5SDimitry Andricdef : GINodeEquiv<G_ADD, add>; 640b57cec5SDimitry Andricdef : GINodeEquiv<G_SUB, sub>; 650b57cec5SDimitry Andricdef : GINodeEquiv<G_MUL, mul>; 660b57cec5SDimitry Andricdef : GINodeEquiv<G_UMULH, mulhu>; 670b57cec5SDimitry Andricdef : GINodeEquiv<G_SMULH, mulhs>; 680b57cec5SDimitry Andricdef : GINodeEquiv<G_SDIV, sdiv>; 690b57cec5SDimitry Andricdef : GINodeEquiv<G_UDIV, udiv>; 700b57cec5SDimitry Andricdef : GINodeEquiv<G_SREM, srem>; 710b57cec5SDimitry Andricdef : GINodeEquiv<G_UREM, urem>; 720b57cec5SDimitry Andricdef : GINodeEquiv<G_AND, and>; 730b57cec5SDimitry Andricdef : GINodeEquiv<G_OR, or>; 740b57cec5SDimitry Andricdef : GINodeEquiv<G_XOR, xor>; 750b57cec5SDimitry Andricdef : GINodeEquiv<G_SHL, shl>; 760b57cec5SDimitry Andricdef : GINodeEquiv<G_LSHR, srl>; 770b57cec5SDimitry Andricdef : GINodeEquiv<G_ASHR, sra>; 785ffd83dbSDimitry Andricdef : GINodeEquiv<G_SADDSAT, saddsat>; 795ffd83dbSDimitry Andricdef : GINodeEquiv<G_UADDSAT, uaddsat>; 805ffd83dbSDimitry Andricdef : GINodeEquiv<G_SSUBSAT, ssubsat>; 815ffd83dbSDimitry Andricdef : GINodeEquiv<G_USUBSAT, usubsat>; 82e8d8bef9SDimitry Andricdef : GINodeEquiv<G_SSHLSAT, sshlsat>; 83e8d8bef9SDimitry Andricdef : GINodeEquiv<G_USHLSAT, ushlsat>; 84e8d8bef9SDimitry Andricdef : GINodeEquiv<G_SMULFIX, smulfix>; 85e8d8bef9SDimitry Andricdef : GINodeEquiv<G_UMULFIX, umulfix>; 86e8d8bef9SDimitry Andricdef : GINodeEquiv<G_SMULFIXSAT, smulfixsat>; 87e8d8bef9SDimitry Andricdef : GINodeEquiv<G_UMULFIXSAT, umulfixsat>; 88e8d8bef9SDimitry Andricdef : GINodeEquiv<G_SDIVFIX, sdivfix>; 89e8d8bef9SDimitry Andricdef : GINodeEquiv<G_UDIVFIX, udivfix>; 90e8d8bef9SDimitry Andricdef : GINodeEquiv<G_SDIVFIXSAT, sdivfixsat>; 91e8d8bef9SDimitry Andricdef : GINodeEquiv<G_UDIVFIXSAT, udivfixsat>; 920b57cec5SDimitry Andricdef : GINodeEquiv<G_SELECT, select>; 93*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_SELECT, vselect>; 940b57cec5SDimitry Andricdef : GINodeEquiv<G_FNEG, fneg>; 950b57cec5SDimitry Andricdef : GINodeEquiv<G_FPEXT, fpextend>; 960b57cec5SDimitry Andricdef : GINodeEquiv<G_FPTRUNC, fpround>; 970b57cec5SDimitry Andricdef : GINodeEquiv<G_FPTOSI, fp_to_sint>; 980b57cec5SDimitry Andricdef : GINodeEquiv<G_FPTOUI, fp_to_uint>; 990b57cec5SDimitry Andricdef : GINodeEquiv<G_SITOFP, sint_to_fp>; 1000b57cec5SDimitry Andricdef : GINodeEquiv<G_UITOFP, uint_to_fp>; 1010b57cec5SDimitry Andricdef : GINodeEquiv<G_FADD, fadd>; 1020b57cec5SDimitry Andricdef : GINodeEquiv<G_FSUB, fsub>; 1030b57cec5SDimitry Andricdef : GINodeEquiv<G_FMA, fma>; 1048bcb0991SDimitry Andricdef : GINodeEquiv<G_FMAD, fmad>; 1050b57cec5SDimitry Andricdef : GINodeEquiv<G_FMUL, fmul>; 1060b57cec5SDimitry Andricdef : GINodeEquiv<G_FDIV, fdiv>; 1070b57cec5SDimitry Andricdef : GINodeEquiv<G_FREM, frem>; 1080b57cec5SDimitry Andricdef : GINodeEquiv<G_FPOW, fpow>; 1090b57cec5SDimitry Andricdef : GINodeEquiv<G_FEXP2, fexp2>; 1105f757f3fSDimitry Andricdef : GINodeEquiv<G_FEXP10, fexp10>; 1110b57cec5SDimitry Andricdef : GINodeEquiv<G_FLOG2, flog2>; 11206c3fb27SDimitry Andricdef : GINodeEquiv<G_FLDEXP, fldexp>; 1130b57cec5SDimitry Andricdef : GINodeEquiv<G_FCANONICALIZE, fcanonicalize>; 114bdd1243dSDimitry Andricdef : GINodeEquiv<G_IS_FPCLASS, is_fpclass>; 1155f757f3fSDimitry Andric 1165f757f3fSDimitry Andricdef : GINodeEquiv<G_INTRINSIC, intrinsic_wo_chain> { 1175f757f3fSDimitry Andric let IfConvergent = G_INTRINSIC_CONVERGENT; 1185f757f3fSDimitry Andric} 1195f757f3fSDimitry Andric 120297eecfbSDimitry Andricdef : GINodeEquiv<G_GET_FPENV, get_fpenv>; 121297eecfbSDimitry Andricdef : GINodeEquiv<G_SET_FPENV, set_fpenv>; 122297eecfbSDimitry Andricdef : GINodeEquiv<G_RESET_FPENV, reset_fpenv>; 1235f757f3fSDimitry Andricdef : GINodeEquiv<G_GET_FPMODE, get_fpmode>; 1245f757f3fSDimitry Andricdef : GINodeEquiv<G_SET_FPMODE, set_fpmode>; 1255f757f3fSDimitry Andricdef : GINodeEquiv<G_RESET_FPMODE, reset_fpmode>; 1265f757f3fSDimitry Andric 1270b57cec5SDimitry Andric// ISD::INTRINSIC_VOID can also be handled with G_INTRINSIC_W_SIDE_EFFECTS. 1285f757f3fSDimitry Andriclet IfConvergent = G_INTRINSIC_CONVERGENT_W_SIDE_EFFECTS in { 1290b57cec5SDimitry Andric def : GINodeEquiv<G_INTRINSIC_W_SIDE_EFFECTS, intrinsic_void>; 1300b57cec5SDimitry Andric def : GINodeEquiv<G_INTRINSIC_W_SIDE_EFFECTS, intrinsic_w_chain>; 1315f757f3fSDimitry Andric} 1325f757f3fSDimitry Andric 1330b57cec5SDimitry Andricdef : GINodeEquiv<G_BR, br>; 134*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_BRCOND, brcond>; 1350b57cec5SDimitry Andricdef : GINodeEquiv<G_BSWAP, bswap>; 1368bcb0991SDimitry Andricdef : GINodeEquiv<G_BITREVERSE, bitreverse>; 1375ffd83dbSDimitry Andricdef : GINodeEquiv<G_FSHL, fshl>; 1385ffd83dbSDimitry Andricdef : GINodeEquiv<G_FSHR, fshr>; 1390b57cec5SDimitry Andricdef : GINodeEquiv<G_CTLZ, ctlz>; 1400b57cec5SDimitry Andricdef : GINodeEquiv<G_CTTZ, cttz>; 1410b57cec5SDimitry Andricdef : GINodeEquiv<G_CTLZ_ZERO_UNDEF, ctlz_zero_undef>; 1420b57cec5SDimitry Andricdef : GINodeEquiv<G_CTTZ_ZERO_UNDEF, cttz_zero_undef>; 1430b57cec5SDimitry Andricdef : GINodeEquiv<G_CTPOP, ctpop>; 144e8d8bef9SDimitry Andricdef : GINodeEquiv<G_EXTRACT_VECTOR_ELT, extractelt>; 145*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_INSERT_VECTOR_ELT, vector_insert>; 1460b57cec5SDimitry Andricdef : GINodeEquiv<G_CONCAT_VECTORS, concat_vectors>; 147480093f4SDimitry Andricdef : GINodeEquiv<G_BUILD_VECTOR, build_vector>; 1480b57cec5SDimitry Andricdef : GINodeEquiv<G_FCEIL, fceil>; 1490b57cec5SDimitry Andricdef : GINodeEquiv<G_FCOS, fcos>; 1500b57cec5SDimitry Andricdef : GINodeEquiv<G_FSIN, fsin>; 151*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FTAN, ftan>; 152*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FACOS, facos>; 153*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FASIN, fasin>; 154*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FATAN, fatan>; 155*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FCOSH, fcosh>; 156*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FSINH, fsinh>; 157*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_FTANH, ftanh>; 1580b57cec5SDimitry Andricdef : GINodeEquiv<G_FABS, fabs>; 1590b57cec5SDimitry Andricdef : GINodeEquiv<G_FSQRT, fsqrt>; 1600b57cec5SDimitry Andricdef : GINodeEquiv<G_FFLOOR, ffloor>; 1610b57cec5SDimitry Andricdef : GINodeEquiv<G_FRINT, frint>; 1620b57cec5SDimitry Andricdef : GINodeEquiv<G_FNEARBYINT, fnearbyint>; 163480093f4SDimitry Andricdef : GINodeEquiv<G_INTRINSIC_TRUNC, ftrunc>; 164480093f4SDimitry Andricdef : GINodeEquiv<G_INTRINSIC_ROUND, fround>; 1655f757f3fSDimitry Andricdef : GINodeEquiv<G_INTRINSIC_ROUNDEVEN, froundeven>; 166e8d8bef9SDimitry Andricdef : GINodeEquiv<G_INTRINSIC_LRINT, lrint>; 167*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_INTRINSIC_LLRINT, llrint>; 1688bcb0991SDimitry Andricdef : GINodeEquiv<G_FCOPYSIGN, fcopysign>; 1690b57cec5SDimitry Andricdef : GINodeEquiv<G_SMIN, smin>; 1700b57cec5SDimitry Andricdef : GINodeEquiv<G_SMAX, smax>; 1710b57cec5SDimitry Andricdef : GINodeEquiv<G_UMIN, umin>; 1720b57cec5SDimitry Andricdef : GINodeEquiv<G_UMAX, umax>; 173e8d8bef9SDimitry Andricdef : GINodeEquiv<G_ABS, abs>; 1748bcb0991SDimitry Andricdef : GINodeEquiv<G_FMINNUM, fminnum>; 1758bcb0991SDimitry Andricdef : GINodeEquiv<G_FMAXNUM, fmaxnum>; 1768bcb0991SDimitry Andricdef : GINodeEquiv<G_FMINNUM_IEEE, fminnum_ieee>; 1778bcb0991SDimitry Andricdef : GINodeEquiv<G_FMAXNUM_IEEE, fmaxnum_ieee>; 178972a253aSDimitry Andricdef : GINodeEquiv<G_FMAXIMUM, fmaximum>; 179972a253aSDimitry Andricdef : GINodeEquiv<G_FMINIMUM, fminimum>; 180480093f4SDimitry Andricdef : GINodeEquiv<G_READCYCLECOUNTER, readcyclecounter>; 181*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_READSTEADYCOUNTER, readsteadycounter>; 182fe6060f1SDimitry Andricdef : GINodeEquiv<G_ROTR, rotr>; 183fe6060f1SDimitry Andricdef : GINodeEquiv<G_ROTL, rotl>; 184349cc55cSDimitry Andricdef : GINodeEquiv<G_LROUND, lround>; 185349cc55cSDimitry Andricdef : GINodeEquiv<G_LLROUND, llround>; 18606c3fb27SDimitry Andricdef : GINodeEquiv<G_VECREDUCE_FADD, vecreduce_fadd>; 1875f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_FMAX, vecreduce_fmax>; 1885f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_FMIN, vecreduce_fmin>; 1895f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_FMAXIMUM, vecreduce_fmaximum>; 1905f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_FMINIMUM, vecreduce_fminimum>; 1915f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_UMIN, vecreduce_umin>; 1925f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_UMAX, vecreduce_umax>; 1935f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_SMIN, vecreduce_smin>; 1945f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_SMAX, vecreduce_smax>; 1955f757f3fSDimitry Andricdef : GINodeEquiv<G_VECREDUCE_ADD, vecreduce_add>; 196*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_VECTOR_COMPRESS, vector_compress>; 1970b57cec5SDimitry Andric 1985ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FADD, strict_fadd>; 1995ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FSUB, strict_fsub>; 2005ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FMUL, strict_fmul>; 2015ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FDIV, strict_fdiv>; 2025ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FREM, strict_frem>; 2035ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FMA, strict_fma>; 2045ffd83dbSDimitry Andricdef : GINodeEquiv<G_STRICT_FSQRT, strict_fsqrt>; 20506c3fb27SDimitry Andricdef : GINodeEquiv<G_STRICT_FLDEXP, strict_fldexp>; 2065ffd83dbSDimitry Andric 2070b57cec5SDimitry Andric// Broadly speaking G_LOAD is equivalent to ISD::LOAD but there are some 2080b57cec5SDimitry Andric// complications that tablegen must take care of. For example, Predicates such 2090b57cec5SDimitry Andric// as isSignExtLoad require that this is not a perfect 1:1 mapping since a 2100b57cec5SDimitry Andric// sign-extending load is (G_SEXTLOAD x) in GlobalISel. Additionally, 2110b57cec5SDimitry Andric// G_LOAD handles both atomic and non-atomic loads where as SelectionDAG had 2120b57cec5SDimitry Andric// separate nodes for them. This GINodeEquiv maps the non-atomic loads to 2130b57cec5SDimitry Andric// G_LOAD with a non-atomic MachineMemOperand. 2140b57cec5SDimitry Andricdef : GINodeEquiv<G_LOAD, ld> { 215e8d8bef9SDimitry Andric let CheckMMOIsNonAtomic = true; 2160b57cec5SDimitry Andric let IfSignExtend = G_SEXTLOAD; 2170b57cec5SDimitry Andric let IfZeroExtend = G_ZEXTLOAD; 2180b57cec5SDimitry Andric} 2198bcb0991SDimitry Andric 2208bcb0991SDimitry Andricdef : GINodeEquiv<G_ICMP, setcc> { 2218bcb0991SDimitry Andric let IfFloatingPoint = G_FCMP; 2228bcb0991SDimitry Andric} 2238bcb0991SDimitry Andric 2240b57cec5SDimitry Andric// Broadly speaking G_STORE is equivalent to ISD::STORE but there are some 2250b57cec5SDimitry Andric// complications that tablegen must take care of. For example, predicates such 2260b57cec5SDimitry Andric// as isTruncStore require that this is not a perfect 1:1 mapping since a 2270b57cec5SDimitry Andric// truncating store is (G_STORE (G_TRUNCATE x)) in GlobalISel. Additionally, 2280b57cec5SDimitry Andric// G_STORE handles both atomic and non-atomic stores where as SelectionDAG had 2290b57cec5SDimitry Andric// separate nodes for them. This GINodeEquiv maps the non-atomic stores to 2300b57cec5SDimitry Andric// G_STORE with a non-atomic MachineMemOperand. 231e8d8bef9SDimitry Andricdef : GINodeEquiv<G_STORE, st> { let CheckMMOIsNonAtomic = true; } 2325f757f3fSDimitry Andricdef : GINodeEquiv<G_STORE, atomic_store> { 2335f757f3fSDimitry Andric let CheckMMOIsNonAtomic = false; 2345f757f3fSDimitry Andric let CheckMMOIsAtomic = true; 2355f757f3fSDimitry Andric} 2360b57cec5SDimitry Andric 2378bcb0991SDimitry Andricdef : GINodeEquiv<G_LOAD, atomic_load> { 238e8d8bef9SDimitry Andric let CheckMMOIsNonAtomic = false; 239e8d8bef9SDimitry Andric let CheckMMOIsAtomic = true; 240753f127fSDimitry Andric let IfSignExtend = G_SEXTLOAD; 241753f127fSDimitry Andric let IfZeroExtend = G_ZEXTLOAD; 242e8d8bef9SDimitry Andric} 243e8d8bef9SDimitry Andric 2440b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMIC_CMPXCHG, atomic_cmp_swap>; 2450b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_XCHG, atomic_swap>; 2460b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_ADD, atomic_load_add>; 2470b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_SUB, atomic_load_sub>; 2480b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_AND, atomic_load_and>; 2490b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_NAND, atomic_load_nand>; 2500b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_OR, atomic_load_or>; 2510b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_XOR, atomic_load_xor>; 2520b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_MIN, atomic_load_min>; 2530b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_MAX, atomic_load_max>; 2540b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_UMIN, atomic_load_umin>; 2550b57cec5SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_UMAX, atomic_load_umax>; 2568bcb0991SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_FADD, atomic_load_fadd>; 2578bcb0991SDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_FSUB, atomic_load_fsub>; 258753f127fSDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_FMAX, atomic_load_fmax>; 259753f127fSDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_FMIN, atomic_load_fmin>; 260bdd1243dSDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_UINC_WRAP, atomic_load_uinc_wrap>; 261bdd1243dSDimitry Andricdef : GINodeEquiv<G_ATOMICRMW_UDEC_WRAP, atomic_load_udec_wrap>; 2620b57cec5SDimitry Andricdef : GINodeEquiv<G_FENCE, atomic_fence>; 2631db9f3b2SDimitry Andricdef : GINodeEquiv<G_PREFETCH, prefetch>; 264*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_TRAP, trap>; 265*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_DEBUGTRAP, debugtrap>; 266*0fca6ea1SDimitry Andricdef : GINodeEquiv<G_UBSANTRAP, ubsantrap>; 2670b57cec5SDimitry Andric 2680b57cec5SDimitry Andric// Specifies the GlobalISel equivalents for SelectionDAG's ComplexPattern. 2690b57cec5SDimitry Andric// Should be used on defs that subclass GIComplexOperandMatcher<>. 2700b57cec5SDimitry Andricclass GIComplexPatternEquiv<ComplexPattern seldag> { 2710b57cec5SDimitry Andric ComplexPattern SelDAGEquivalent = seldag; 2720b57cec5SDimitry Andric} 2730b57cec5SDimitry Andric 2740b57cec5SDimitry Andric// Specifies the GlobalISel equivalents for SelectionDAG's SDNodeXForm. 2750b57cec5SDimitry Andric// Should be used on defs that subclass GICustomOperandRenderer<>. 2760b57cec5SDimitry Andricclass GISDNodeXFormEquiv<SDNodeXForm seldag> { 2770b57cec5SDimitry Andric SDNodeXForm SelDAGEquivalent = seldag; 2780b57cec5SDimitry Andric} 279