| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 1 | //===-- AMDGPUInstrInfo.td - AMDGPU DAG nodes --------------*- tablegen -*-===// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
|  | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
|  | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file contains DAG node defintions for the AMDGPU target. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
|  | 14 | //===----------------------------------------------------------------------===// | 
|  | 15 | // AMDGPU DAG Profiles | 
|  | 16 | //===----------------------------------------------------------------------===// | 
|  | 17 |  | 
|  | 18 | def AMDGPUDTIntTernaryOp : SDTypeProfile<1, 3, [ | 
|  | 19 | SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>, SDTCisInt<3> | 
|  | 20 | ]>; | 
|  | 21 |  | 
| Matt Arsenault | a0050b0 | 2014-06-19 01:19:19 +0000 | [diff] [blame] | 22 | def AMDGPUTrigPreOp : SDTypeProfile<1, 2, | 
|  | 23 | [SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisInt<2>] | 
|  | 24 | >; | 
|  | 25 |  | 
| Matt Arsenault | 2e7cc48 | 2014-08-15 17:30:25 +0000 | [diff] [blame] | 26 | def AMDGPULdExpOp : SDTypeProfile<1, 2, | 
|  | 27 | [SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisInt<2>] | 
|  | 28 | >; | 
|  | 29 |  | 
| Matt Arsenault | 4831ce5 | 2015-01-06 23:00:37 +0000 | [diff] [blame] | 30 | def AMDGPUFPClassOp : SDTypeProfile<1, 2, | 
|  | 31 | [SDTCisInt<0>, SDTCisFP<1>, SDTCisInt<2>] | 
|  | 32 | >; | 
|  | 33 |  | 
| Matt Arsenault | a0050b0 | 2014-06-19 01:19:19 +0000 | [diff] [blame] | 34 | def AMDGPUDivScaleOp : SDTypeProfile<2, 3, | 
|  | 35 | [SDTCisFP<0>, SDTCisInt<1>, SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>, SDTCisSameAs<0, 4>] | 
|  | 36 | >; | 
|  | 37 |  | 
| Matt Arsenault | 1bc9d95 | 2015-02-14 04:22:00 +0000 | [diff] [blame] | 38 | // float, float, float, vcc | 
|  | 39 | def AMDGPUFmasOp : SDTypeProfile<1, 4, | 
|  | 40 | [SDTCisFP<0>, SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>, SDTCisInt<4>] | 
|  | 41 | >; | 
|  | 42 |  | 
| Matt Arsenault | 03006fd | 2016-07-19 16:27:56 +0000 | [diff] [blame] | 43 | def AMDGPUKillSDT : SDTypeProfile<0, 1, [SDTCisInt<0>]>; | 
|  | 44 |  | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 45 | //===----------------------------------------------------------------------===// | 
|  | 46 | // AMDGPU DAG Nodes | 
|  | 47 | // | 
|  | 48 |  | 
| Jan Vesely | fbcb754 | 2016-05-13 20:39:18 +0000 | [diff] [blame] | 49 | def AMDGPUconstdata_ptr : SDNode< | 
|  | 50 | "AMDGPUISD::CONST_DATA_PTR", SDTypeProfile <1, 1, [SDTCisVT<0, iPTR>, | 
|  | 51 | SDTCisVT<0, iPTR>]> | 
|  | 52 | >; | 
|  | 53 |  | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 54 | // This argument to this node is a dword address. | 
|  | 55 | def AMDGPUdwordaddr : SDNode<"AMDGPUISD::DWORDADDR", SDTIntUnaryOp>; | 
|  | 56 |  | 
| Matt Arsenault | ad14ce8 | 2014-07-19 18:44:39 +0000 | [diff] [blame] | 57 | def AMDGPUcos : SDNode<"AMDGPUISD::COS_HW", SDTFPUnaryOp>; | 
|  | 58 | def AMDGPUsin : SDNode<"AMDGPUISD::SIN_HW", SDTFPUnaryOp>; | 
|  | 59 |  | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 60 | // out = a - floor(a) | 
|  | 61 | def AMDGPUfract : SDNode<"AMDGPUISD::FRACT", SDTFPUnaryOp>; | 
|  | 62 |  | 
| Matt Arsenault | a0050b0 | 2014-06-19 01:19:19 +0000 | [diff] [blame] | 63 | // out = 1.0 / a | 
|  | 64 | def AMDGPUrcp : SDNode<"AMDGPUISD::RCP", SDTFPUnaryOp>; | 
|  | 65 |  | 
|  | 66 | // out = 1.0 / sqrt(a) | 
|  | 67 | def AMDGPUrsq : SDNode<"AMDGPUISD::RSQ", SDTFPUnaryOp>; | 
|  | 68 |  | 
| Matt Arsenault | 257d48d | 2014-06-24 22:13:39 +0000 | [diff] [blame] | 69 | // out = 1.0 / sqrt(a) | 
| Matt Arsenault | 32fc527 | 2016-07-26 16:45:45 +0000 | [diff] [blame^] | 70 | def AMDGPUrcp_legacy : SDNode<"AMDGPUISD::RCP_LEGACY", SDTFPUnaryOp>; | 
| Matt Arsenault | 257d48d | 2014-06-24 22:13:39 +0000 | [diff] [blame] | 71 | def AMDGPUrsq_legacy : SDNode<"AMDGPUISD::RSQ_LEGACY", SDTFPUnaryOp>; | 
|  | 72 |  | 
|  | 73 | // out = 1.0 / sqrt(a) result clamped to +/- max_float. | 
| Matt Arsenault | 79963e8 | 2016-02-13 01:03:00 +0000 | [diff] [blame] | 74 | def AMDGPUrsq_clamp : SDNode<"AMDGPUISD::RSQ_CLAMP", SDTFPUnaryOp>; | 
| Matt Arsenault | 257d48d | 2014-06-24 22:13:39 +0000 | [diff] [blame] | 75 |  | 
| Matt Arsenault | 2e7cc48 | 2014-08-15 17:30:25 +0000 | [diff] [blame] | 76 | def AMDGPUldexp : SDNode<"AMDGPUISD::LDEXP", AMDGPULdExpOp>; | 
|  | 77 |  | 
| Matt Arsenault | 4831ce5 | 2015-01-06 23:00:37 +0000 | [diff] [blame] | 78 | def AMDGPUfp_class : SDNode<"AMDGPUISD::FP_CLASS", AMDGPUFPClassOp>; | 
|  | 79 |  | 
| Matt Arsenault | da59f3d | 2014-11-13 23:03:09 +0000 | [diff] [blame] | 80 | // out = max(a, b) a and b are floats, where a nan comparison fails. | 
|  | 81 | // This is not commutative because this gives the second operand: | 
|  | 82 | //   x < nan ? x : nan -> nan | 
|  | 83 | //   nan < x ? nan : x -> x | 
|  | 84 | def AMDGPUfmax_legacy : SDNode<"AMDGPUISD::FMAX_LEGACY", SDTFPBinOp, | 
| Matt Arsenault | 145d571 | 2014-12-12 02:30:33 +0000 | [diff] [blame] | 85 | [] | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 86 | >; | 
|  | 87 |  | 
| Matt Arsenault | 32fc527 | 2016-07-26 16:45:45 +0000 | [diff] [blame^] | 88 | def AMDGPUfmul_legacy : SDNode<"AMDGPUISD::FMUL_LEGACY", SDTFPBinOp, | 
|  | 89 | [SDNPCommutative, SDNPAssociative] | 
|  | 90 | >; | 
|  | 91 |  | 
| Matt Arsenault | 5d47d4a | 2014-06-12 21:15:44 +0000 | [diff] [blame] | 92 | def AMDGPUclamp : SDNode<"AMDGPUISD::CLAMP", SDTFPTernaryOp, []>; | 
|  | 93 |  | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 94 | // out = max(a, b) a and b are signed ints | 
|  | 95 | def AMDGPUsmax : SDNode<"AMDGPUISD::SMAX", SDTIntBinOp, | 
|  | 96 | [SDNPCommutative, SDNPAssociative] | 
|  | 97 | >; | 
|  | 98 |  | 
|  | 99 | // out = max(a, b) a and b are unsigned ints | 
|  | 100 | def AMDGPUumax : SDNode<"AMDGPUISD::UMAX", SDTIntBinOp, | 
|  | 101 | [SDNPCommutative, SDNPAssociative] | 
|  | 102 | >; | 
|  | 103 |  | 
| Matt Arsenault | da59f3d | 2014-11-13 23:03:09 +0000 | [diff] [blame] | 104 | // out = min(a, b) a and b are floats, where a nan comparison fails. | 
|  | 105 | def AMDGPUfmin_legacy : SDNode<"AMDGPUISD::FMIN_LEGACY", SDTFPBinOp, | 
| Matt Arsenault | 145d571 | 2014-12-12 02:30:33 +0000 | [diff] [blame] | 106 | [] | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 107 | >; | 
|  | 108 |  | 
| Matt Arsenault | cc3c2b3 | 2014-11-14 20:08:52 +0000 | [diff] [blame] | 109 | // FIXME: TableGen doesn't like commutative instructions with more | 
|  | 110 | // than 2 operands. | 
|  | 111 | // out = max(a, b, c) a, b and c are floats | 
|  | 112 | def AMDGPUfmax3 : SDNode<"AMDGPUISD::FMAX3", SDTFPTernaryOp, | 
|  | 113 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 114 | >; | 
|  | 115 |  | 
|  | 116 | // out = max(a, b, c) a, b, and c are signed ints | 
|  | 117 | def AMDGPUsmax3 : SDNode<"AMDGPUISD::SMAX3", AMDGPUDTIntTernaryOp, | 
|  | 118 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 119 | >; | 
|  | 120 |  | 
|  | 121 | // out = max(a, b, c) a, b and c are unsigned ints | 
|  | 122 | def AMDGPUumax3 : SDNode<"AMDGPUISD::UMAX3", AMDGPUDTIntTernaryOp, | 
|  | 123 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 124 | >; | 
|  | 125 |  | 
|  | 126 | // out = min(a, b, c) a, b and c are floats | 
|  | 127 | def AMDGPUfmin3 : SDNode<"AMDGPUISD::FMIN3", SDTFPTernaryOp, | 
|  | 128 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 129 | >; | 
|  | 130 |  | 
|  | 131 | // out = min(a, b, c) a, b and c are signed ints | 
|  | 132 | def AMDGPUsmin3 : SDNode<"AMDGPUISD::SMIN3", AMDGPUDTIntTernaryOp, | 
|  | 133 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 134 | >; | 
|  | 135 |  | 
|  | 136 | // out = min(a, b) a and b are unsigned ints | 
|  | 137 | def AMDGPUumin3 : SDNode<"AMDGPUISD::UMIN3", AMDGPUDTIntTernaryOp, | 
|  | 138 | [/*SDNPCommutative, SDNPAssociative*/] | 
|  | 139 | >; | 
| Matt Arsenault | 364a674 | 2014-06-11 17:50:44 +0000 | [diff] [blame] | 140 |  | 
| Jan Vesely | 808fff5 | 2015-04-30 17:15:56 +0000 | [diff] [blame] | 141 | // out = (src0 + src1 > 0xFFFFFFFF) ? 1 : 0 | 
|  | 142 | def AMDGPUcarry : SDNode<"AMDGPUISD::CARRY", SDTIntBinOp, []>; | 
|  | 143 |  | 
|  | 144 | // out = (src1 > src0) ? 1 : 0 | 
|  | 145 | def AMDGPUborrow : SDNode<"AMDGPUISD::BORROW", SDTIntBinOp, []>; | 
|  | 146 |  | 
|  | 147 |  | 
| Matt Arsenault | 364a674 | 2014-06-11 17:50:44 +0000 | [diff] [blame] | 148 | def AMDGPUcvt_f32_ubyte0 : SDNode<"AMDGPUISD::CVT_F32_UBYTE0", | 
|  | 149 | SDTIntToFPOp, []>; | 
|  | 150 | def AMDGPUcvt_f32_ubyte1 : SDNode<"AMDGPUISD::CVT_F32_UBYTE1", | 
|  | 151 | SDTIntToFPOp, []>; | 
|  | 152 | def AMDGPUcvt_f32_ubyte2 : SDNode<"AMDGPUISD::CVT_F32_UBYTE2", | 
|  | 153 | SDTIntToFPOp, []>; | 
|  | 154 | def AMDGPUcvt_f32_ubyte3 : SDNode<"AMDGPUISD::CVT_F32_UBYTE3", | 
|  | 155 | SDTIntToFPOp, []>; | 
|  | 156 |  | 
|  | 157 |  | 
| Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 158 | // urecip - This operation is a helper for integer division, it returns the | 
|  | 159 | // result of 1 / a as a fractional unsigned integer. | 
|  | 160 | // out = (2^32 / a) + e | 
|  | 161 | // e is rounding error | 
|  | 162 | def AMDGPUurecip : SDNode<"AMDGPUISD::URECIP", SDTIntUnaryOp>; | 
|  | 163 |  | 
| Matt Arsenault | a0050b0 | 2014-06-19 01:19:19 +0000 | [diff] [blame] | 164 | // Special case divide preop and flags. | 
|  | 165 | def AMDGPUdiv_scale : SDNode<"AMDGPUISD::DIV_SCALE", AMDGPUDivScaleOp>; | 
|  | 166 |  | 
|  | 167 | //  Special case divide FMA with scale and flags (src0 = Quotient, | 
|  | 168 | //  src1 = Denominator, src2 = Numerator). | 
| Matt Arsenault | 1bc9d95 | 2015-02-14 04:22:00 +0000 | [diff] [blame] | 169 | def AMDGPUdiv_fmas : SDNode<"AMDGPUISD::DIV_FMAS", AMDGPUFmasOp>; | 
| Matt Arsenault | a0050b0 | 2014-06-19 01:19:19 +0000 | [diff] [blame] | 170 |  | 
|  | 171 | // Single or double precision division fixup. | 
|  | 172 | // Special case divide fixup and flags(src0 = Quotient, src1 = | 
|  | 173 | // Denominator, src2 = Numerator). | 
|  | 174 | def AMDGPUdiv_fixup : SDNode<"AMDGPUISD::DIV_FIXUP", SDTFPTernaryOp>; | 
|  | 175 |  | 
|  | 176 | // Look Up 2.0 / pi src0 with segment select src1[4:0] | 
|  | 177 | def AMDGPUtrig_preop : SDNode<"AMDGPUISD::TRIG_PREOP", AMDGPUTrigPreOp>; | 
|  | 178 |  | 
| Tom Stellard | f3b2a1e | 2013-02-06 17:32:29 +0000 | [diff] [blame] | 179 | def AMDGPUregister_load : SDNode<"AMDGPUISD::REGISTER_LOAD", | 
|  | 180 | SDTypeProfile<1, 2, [SDTCisPtrTy<1>, SDTCisInt<2>]>, | 
|  | 181 | [SDNPHasChain, SDNPMayLoad]>; | 
|  | 182 |  | 
|  | 183 | def AMDGPUregister_store : SDNode<"AMDGPUISD::REGISTER_STORE", | 
|  | 184 | SDTypeProfile<0, 3, [SDTCisPtrTy<1>, SDTCisInt<2>]>, | 
|  | 185 | [SDNPHasChain, SDNPMayStore]>; | 
| Tom Stellard | d3ee8c1 | 2013-08-16 01:12:06 +0000 | [diff] [blame] | 186 |  | 
| Tom Stellard | f3d166a | 2013-08-26 15:05:49 +0000 | [diff] [blame] | 187 | // MSKOR instructions are atomic memory instructions used mainly for storing | 
|  | 188 | // 8-bit and 16-bit values.  The definition is: | 
|  | 189 | // | 
|  | 190 | // MSKOR(dst, mask, src) MEM[dst] = ((MEM[dst] & ~mask) | src) | 
|  | 191 | // | 
|  | 192 | // src0: vec4(src, 0, 0, mask) | 
| Matt Arsenault | da59f3d | 2014-11-13 23:03:09 +0000 | [diff] [blame] | 193 | // src1: dst - rat offset (aka pointer) in dwords | 
| Tom Stellard | d3ee8c1 | 2013-08-16 01:12:06 +0000 | [diff] [blame] | 194 | def AMDGPUstore_mskor : SDNode<"AMDGPUISD::STORE_MSKOR", | 
|  | 195 | SDTypeProfile<0, 2, []>, | 
|  | 196 | [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>; | 
| Tom Stellard | 4d566b2 | 2013-11-27 21:23:20 +0000 | [diff] [blame] | 197 |  | 
| Tom Stellard | 354a43c | 2016-04-01 18:27:37 +0000 | [diff] [blame] | 198 | def AMDGPUatomic_cmp_swap : SDNode<"AMDGPUISD::ATOMIC_CMP_SWAP", | 
|  | 199 | SDTypeProfile<1, 2, [SDTCisPtrTy<1>, SDTCisVec<2>]>, | 
|  | 200 | [SDNPHasChain, SDNPMayStore, SDNPMayLoad, | 
|  | 201 | SDNPMemOperand]>; | 
|  | 202 |  | 
| Tom Stellard | 4d566b2 | 2013-11-27 21:23:20 +0000 | [diff] [blame] | 203 | def AMDGPUround : SDNode<"ISD::FROUND", | 
|  | 204 | SDTypeProfile<1, 1, [SDTCisFP<0>, SDTCisSameAs<0,1>]>>; | 
| Matt Arsenault | fae0298 | 2014-03-17 18:58:11 +0000 | [diff] [blame] | 205 |  | 
|  | 206 | def AMDGPUbfe_u32 : SDNode<"AMDGPUISD::BFE_U32", AMDGPUDTIntTernaryOp>; | 
|  | 207 | def AMDGPUbfe_i32 : SDNode<"AMDGPUISD::BFE_I32", AMDGPUDTIntTernaryOp>; | 
| Matt Arsenault | b345836 | 2014-03-31 18:21:13 +0000 | [diff] [blame] | 208 | def AMDGPUbfi : SDNode<"AMDGPUISD::BFI", AMDGPUDTIntTernaryOp>; | 
|  | 209 | def AMDGPUbfm : SDNode<"AMDGPUISD::BFM", SDTIntBinOp>; | 
| Matt Arsenault | fae0298 | 2014-03-17 18:58:11 +0000 | [diff] [blame] | 210 |  | 
| Matt Arsenault | de5fbe9 | 2016-01-11 17:02:00 +0000 | [diff] [blame] | 211 | def AMDGPUffbh_u32 : SDNode<"AMDGPUISD::FFBH_U32", SDTIntUnaryOp>; | 
| Matt Arsenault | c96e1de | 2016-07-18 18:35:05 +0000 | [diff] [blame] | 212 | def AMDGPUffbh_i32 : SDNode<"AMDGPUISD::FFBH_I32", SDTIntUnaryOp>; | 
| Matt Arsenault | de5fbe9 | 2016-01-11 17:02:00 +0000 | [diff] [blame] | 213 |  | 
| Tom Stellard | 50122a5 | 2014-04-07 19:45:41 +0000 | [diff] [blame] | 214 | // Signed and unsigned 24-bit mulitply.  The highest 8-bits are ignore when | 
|  | 215 | // performing the mulitply.  The result is a 32-bit value. | 
|  | 216 | def AMDGPUmul_u24 : SDNode<"AMDGPUISD::MUL_U24", SDTIntBinOp, | 
|  | 217 | [SDNPCommutative] | 
|  | 218 | >; | 
|  | 219 | def AMDGPUmul_i24 : SDNode<"AMDGPUISD::MUL_I24", SDTIntBinOp, | 
|  | 220 | [SDNPCommutative] | 
|  | 221 | >; | 
| Matt Arsenault | eb26020 | 2014-05-22 18:00:15 +0000 | [diff] [blame] | 222 |  | 
|  | 223 | def AMDGPUmad_u24 : SDNode<"AMDGPUISD::MAD_U24", AMDGPUDTIntTernaryOp, | 
|  | 224 | [] | 
|  | 225 | >; | 
|  | 226 | def AMDGPUmad_i24 : SDNode<"AMDGPUISD::MAD_I24", AMDGPUDTIntTernaryOp, | 
|  | 227 | [] | 
|  | 228 | >; | 
| Tom Stellard | bc5b537 | 2014-06-13 16:38:59 +0000 | [diff] [blame] | 229 |  | 
| Matt Arsenault | f639c32 | 2016-01-28 20:53:42 +0000 | [diff] [blame] | 230 | def AMDGPUsmed3 : SDNode<"AMDGPUISD::SMED3", AMDGPUDTIntTernaryOp, | 
|  | 231 | [] | 
|  | 232 | >; | 
|  | 233 |  | 
|  | 234 | def AMDGPUumed3 : SDNode<"AMDGPUISD::UMED3", AMDGPUDTIntTernaryOp, | 
|  | 235 | [] | 
|  | 236 | >; | 
|  | 237 |  | 
|  | 238 | def AMDGPUfmed3 : SDNode<"AMDGPUISD::FMED3", SDTFPTernaryOp, []>; | 
|  | 239 |  | 
| Tom Stellard | fc92e77 | 2015-05-12 14:18:14 +0000 | [diff] [blame] | 240 | def AMDGPUsendmsg : SDNode<"AMDGPUISD::SENDMSG", | 
|  | 241 | SDTypeProfile<0, 1, [SDTCisInt<0>]>, | 
|  | 242 | [SDNPHasChain, SDNPInGlue]>; | 
|  | 243 |  | 
| Tom Stellard | 2a9d947 | 2015-05-12 15:00:46 +0000 | [diff] [blame] | 244 | def AMDGPUinterp_mov : SDNode<"AMDGPUISD::INTERP_MOV", | 
|  | 245 | SDTypeProfile<1, 3, [SDTCisFP<0>]>, | 
|  | 246 | [SDNPInGlue]>; | 
|  | 247 |  | 
|  | 248 | def AMDGPUinterp_p1 : SDNode<"AMDGPUISD::INTERP_P1", | 
|  | 249 | SDTypeProfile<1, 3, [SDTCisFP<0>]>, | 
|  | 250 | [SDNPInGlue, SDNPOutGlue]>; | 
|  | 251 |  | 
|  | 252 | def AMDGPUinterp_p2 : SDNode<"AMDGPUISD::INTERP_P2", | 
|  | 253 | SDTypeProfile<1, 4, [SDTCisFP<0>]>, | 
|  | 254 | [SDNPInGlue]>; | 
|  | 255 |  | 
| Matt Arsenault | 03006fd | 2016-07-19 16:27:56 +0000 | [diff] [blame] | 256 | def AMDGPUkill : SDNode<"AMDGPUISD::KILL", AMDGPUKillSDT, | 
|  | 257 | [SDNPHasChain, SDNPSideEffect]>; | 
|  | 258 |  | 
| Tom Stellard | bc5b537 | 2014-06-13 16:38:59 +0000 | [diff] [blame] | 259 | //===----------------------------------------------------------------------===// | 
|  | 260 | // Flow Control Profile Types | 
|  | 261 | //===----------------------------------------------------------------------===// | 
|  | 262 | // Branch instruction where second and third are basic blocks | 
|  | 263 | def SDTIL_BRCond : SDTypeProfile<0, 2, [ | 
|  | 264 | SDTCisVT<0, OtherVT> | 
|  | 265 | ]>; | 
|  | 266 |  | 
|  | 267 | //===----------------------------------------------------------------------===// | 
|  | 268 | // Flow Control DAG Nodes | 
|  | 269 | //===----------------------------------------------------------------------===// | 
|  | 270 | def IL_brcond      : SDNode<"AMDGPUISD::BRANCH_COND", SDTIL_BRCond, [SDNPHasChain]>; | 
|  | 271 |  | 
|  | 272 | //===----------------------------------------------------------------------===// | 
|  | 273 | // Call/Return DAG Nodes | 
|  | 274 | //===----------------------------------------------------------------------===// | 
| Matt Arsenault | 9babdf4 | 2016-06-22 20:15:28 +0000 | [diff] [blame] | 275 | def AMDGPUendpgm : SDNode<"AMDGPUISD::ENDPGM", SDTNone, | 
|  | 276 | [SDNPHasChain, SDNPOptInGlue]>; | 
|  | 277 |  | 
|  | 278 | def AMDGPUreturn : SDNode<"AMDGPUISD::RETURN", SDTNone, | 
| Marek Olsak | 8a0f335 | 2016-01-13 17:23:04 +0000 | [diff] [blame] | 279 | [SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>; |