Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
//==- BuiltinsAMDGPU.def - AMDGPU Builtin function database ------*- C++ -*-==//
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 the AMDGPU-specific builtin function database. Users of
10
// this file must define the BUILTIN macro to make use of this information.
11
//
12
// Note: (unsigned) long int type should be avoided in builtin definitions
13
// since it has different size on Linux (64 bit) and Windows (32 bit).
14
// (unsigned) long long int type should also be avoided, which is 64 bit for
15
// C/C++/HIP but is 128 bit for OpenCL. Use `W` as width modifier in builtin
16
// definitions since it is fixed for 64 bit.
17
//===----------------------------------------------------------------------===//
18
 
19
// The format of this database matches clang/Basic/Builtins.def.
20
 
21
#if defined(BUILTIN) && !defined(TARGET_BUILTIN)
22
#   define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BUILTIN(ID, TYPE, ATTRS)
23
#endif
24
//===----------------------------------------------------------------------===//
25
// SI+ only builtins.
26
//===----------------------------------------------------------------------===//
27
 
28
BUILTIN(__builtin_amdgcn_dispatch_ptr, "v*4", "nc")
29
BUILTIN(__builtin_amdgcn_kernarg_segment_ptr, "v*4", "nc")
30
BUILTIN(__builtin_amdgcn_implicitarg_ptr, "v*4", "nc")
31
BUILTIN(__builtin_amdgcn_queue_ptr, "v*4", "nc")
32
 
33
BUILTIN(__builtin_amdgcn_workgroup_id_x, "Ui", "nc")
34
BUILTIN(__builtin_amdgcn_workgroup_id_y, "Ui", "nc")
35
BUILTIN(__builtin_amdgcn_workgroup_id_z, "Ui", "nc")
36
 
37
BUILTIN(__builtin_amdgcn_workitem_id_x, "Ui", "nc")
38
BUILTIN(__builtin_amdgcn_workitem_id_y, "Ui", "nc")
39
BUILTIN(__builtin_amdgcn_workitem_id_z, "Ui", "nc")
40
 
41
BUILTIN(__builtin_amdgcn_workgroup_size_x, "Us", "nc")
42
BUILTIN(__builtin_amdgcn_workgroup_size_y, "Us", "nc")
43
BUILTIN(__builtin_amdgcn_workgroup_size_z, "Us", "nc")
44
 
45
BUILTIN(__builtin_amdgcn_grid_size_x, "Ui", "nc")
46
BUILTIN(__builtin_amdgcn_grid_size_y, "Ui", "nc")
47
BUILTIN(__builtin_amdgcn_grid_size_z, "Ui", "nc")
48
 
49
BUILTIN(__builtin_amdgcn_mbcnt_hi, "UiUiUi", "nc")
50
BUILTIN(__builtin_amdgcn_mbcnt_lo, "UiUiUi", "nc")
51
 
52
TARGET_BUILTIN(__builtin_amdgcn_s_memtime, "WUi", "n", "s-memtime-inst")
53
 
54
//===----------------------------------------------------------------------===//
55
// Instruction builtins.
56
//===----------------------------------------------------------------------===//
57
BUILTIN(__builtin_amdgcn_s_getreg, "UiIi", "n")
58
BUILTIN(__builtin_amdgcn_s_setreg, "vIiUi", "n")
59
BUILTIN(__builtin_amdgcn_s_getpc, "WUi", "n")
60
BUILTIN(__builtin_amdgcn_s_waitcnt, "vIi", "n")
61
BUILTIN(__builtin_amdgcn_s_sendmsg, "vIiUi", "n")
62
BUILTIN(__builtin_amdgcn_s_sendmsghalt, "vIiUi", "n")
63
BUILTIN(__builtin_amdgcn_s_barrier, "v", "n")
64
BUILTIN(__builtin_amdgcn_wave_barrier, "v", "n")
65
BUILTIN(__builtin_amdgcn_sched_barrier, "vIi", "n")
66
BUILTIN(__builtin_amdgcn_sched_group_barrier, "vIiIiIi", "n")
67
BUILTIN(__builtin_amdgcn_iglp_opt, "vIi", "n")
68
BUILTIN(__builtin_amdgcn_s_dcache_inv, "v", "n")
69
BUILTIN(__builtin_amdgcn_buffer_wbinvl1, "v", "n")
70
BUILTIN(__builtin_amdgcn_ds_gws_init, "vUiUi", "n")
71
BUILTIN(__builtin_amdgcn_ds_gws_barrier, "vUiUi", "n")
72
BUILTIN(__builtin_amdgcn_ds_gws_sema_v, "vUi", "n")
73
BUILTIN(__builtin_amdgcn_ds_gws_sema_br, "vUiUi", "n")
74
BUILTIN(__builtin_amdgcn_ds_gws_sema_p, "vUi", "n")
75
BUILTIN(__builtin_amdgcn_fence, "vUicC*", "n")
76
BUILTIN(__builtin_amdgcn_groupstaticsize, "Ui", "n")
77
 
78
BUILTIN(__builtin_amdgcn_atomic_inc32, "UZiUZiD*UZiUicC*", "n")
79
BUILTIN(__builtin_amdgcn_atomic_inc64, "UWiUWiD*UWiUicC*", "n")
80
 
81
BUILTIN(__builtin_amdgcn_atomic_dec32, "UZiUZiD*UZiUicC*", "n")
82
BUILTIN(__builtin_amdgcn_atomic_dec64, "UWiUWiD*UWiUicC*", "n")
83
 
84
// FIXME: Need to disallow constant address space.
85
BUILTIN(__builtin_amdgcn_div_scale, "dddbb*", "n")
86
BUILTIN(__builtin_amdgcn_div_scalef, "fffbb*", "n")
87
BUILTIN(__builtin_amdgcn_div_fmas, "ddddb", "nc")
88
BUILTIN(__builtin_amdgcn_div_fmasf, "ffffb", "nc")
89
BUILTIN(__builtin_amdgcn_div_fixup, "dddd", "nc")
90
BUILTIN(__builtin_amdgcn_div_fixupf, "ffff", "nc")
91
BUILTIN(__builtin_amdgcn_trig_preop, "ddi", "nc")
92
BUILTIN(__builtin_amdgcn_trig_preopf, "ffi", "nc")
93
BUILTIN(__builtin_amdgcn_rcp, "dd", "nc")
94
BUILTIN(__builtin_amdgcn_rcpf, "ff", "nc")
95
BUILTIN(__builtin_amdgcn_sqrt, "dd", "nc")
96
BUILTIN(__builtin_amdgcn_sqrtf, "ff", "nc")
97
BUILTIN(__builtin_amdgcn_rsq, "dd", "nc")
98
BUILTIN(__builtin_amdgcn_rsqf, "ff", "nc")
99
BUILTIN(__builtin_amdgcn_rsq_clamp, "dd", "nc")
100
BUILTIN(__builtin_amdgcn_rsq_clampf, "ff", "nc")
101
BUILTIN(__builtin_amdgcn_sinf, "ff", "nc")
102
BUILTIN(__builtin_amdgcn_cosf, "ff", "nc")
103
BUILTIN(__builtin_amdgcn_log_clampf, "ff", "nc")
104
BUILTIN(__builtin_amdgcn_ldexp, "ddi", "nc")
105
BUILTIN(__builtin_amdgcn_ldexpf, "ffi", "nc")
106
BUILTIN(__builtin_amdgcn_frexp_mant, "dd", "nc")
107
BUILTIN(__builtin_amdgcn_frexp_mantf, "ff", "nc")
108
BUILTIN(__builtin_amdgcn_frexp_exp, "id", "nc")
109
BUILTIN(__builtin_amdgcn_frexp_expf, "if", "nc")
110
BUILTIN(__builtin_amdgcn_fract, "dd", "nc")
111
BUILTIN(__builtin_amdgcn_fractf, "ff", "nc")
112
BUILTIN(__builtin_amdgcn_lerp, "UiUiUiUi", "nc")
113
BUILTIN(__builtin_amdgcn_class, "bdi", "nc")
114
BUILTIN(__builtin_amdgcn_classf, "bfi", "nc")
115
BUILTIN(__builtin_amdgcn_cubeid, "ffff", "nc")
116
BUILTIN(__builtin_amdgcn_cubesc, "ffff", "nc")
117
BUILTIN(__builtin_amdgcn_cubetc, "ffff", "nc")
118
BUILTIN(__builtin_amdgcn_cubema, "ffff", "nc")
119
BUILTIN(__builtin_amdgcn_s_sleep, "vIi", "n")
120
BUILTIN(__builtin_amdgcn_s_incperflevel, "vIi", "n")
121
BUILTIN(__builtin_amdgcn_s_decperflevel, "vIi", "n")
122
BUILTIN(__builtin_amdgcn_s_setprio, "vIs", "n")
123
BUILTIN(__builtin_amdgcn_ds_swizzle, "iiIi", "nc")
124
BUILTIN(__builtin_amdgcn_ds_permute, "iii", "nc")
125
BUILTIN(__builtin_amdgcn_ds_bpermute, "iii", "nc")
126
BUILTIN(__builtin_amdgcn_readfirstlane, "ii", "nc")
127
BUILTIN(__builtin_amdgcn_readlane, "iii", "nc")
128
BUILTIN(__builtin_amdgcn_fmed3f, "ffff", "nc")
129
BUILTIN(__builtin_amdgcn_ds_faddf, "ff*3fIiIiIb", "n")
130
BUILTIN(__builtin_amdgcn_ds_fminf, "ff*3fIiIiIb", "n")
131
BUILTIN(__builtin_amdgcn_ds_fmaxf, "ff*3fIiIiIb", "n")
132
BUILTIN(__builtin_amdgcn_ds_append, "ii*3", "n")
133
BUILTIN(__builtin_amdgcn_ds_consume, "ii*3", "n")
134
BUILTIN(__builtin_amdgcn_alignbit, "UiUiUiUi", "nc")
135
BUILTIN(__builtin_amdgcn_alignbyte, "UiUiUiUi", "nc")
136
BUILTIN(__builtin_amdgcn_ubfe, "UiUiUiUi", "nc")
137
BUILTIN(__builtin_amdgcn_sbfe, "UiUiUiUi", "nc")
138
BUILTIN(__builtin_amdgcn_cvt_pkrtz, "E2hff", "nc")
139
BUILTIN(__builtin_amdgcn_cvt_pknorm_i16, "E2sff", "nc")
140
BUILTIN(__builtin_amdgcn_cvt_pknorm_u16, "E2Usff", "nc")
141
BUILTIN(__builtin_amdgcn_cvt_pk_i16, "E2sii", "nc")
142
BUILTIN(__builtin_amdgcn_cvt_pk_u16, "E2UsUiUi", "nc")
143
BUILTIN(__builtin_amdgcn_cvt_pk_u8_f32, "UifUiUi", "nc")
144
BUILTIN(__builtin_amdgcn_sad_u8, "UiUiUiUi", "nc")
145
BUILTIN(__builtin_amdgcn_msad_u8, "UiUiUiUi", "nc")
146
BUILTIN(__builtin_amdgcn_sad_hi_u8, "UiUiUiUi", "nc")
147
BUILTIN(__builtin_amdgcn_sad_u16, "UiUiUiUi", "nc")
148
BUILTIN(__builtin_amdgcn_qsad_pk_u16_u8, "WUiWUiUiWUi", "nc")
149
BUILTIN(__builtin_amdgcn_mqsad_pk_u16_u8, "WUiWUiUiWUi", "nc")
150
BUILTIN(__builtin_amdgcn_mqsad_u32_u8, "V4UiWUiUiV4Ui", "nc")
151
 
152
//===----------------------------------------------------------------------===//
153
// Ballot builtins.
154
//===----------------------------------------------------------------------===//
155
 
156
TARGET_BUILTIN(__builtin_amdgcn_ballot_w32, "Uib", "nc", "wavefrontsize32")
157
TARGET_BUILTIN(__builtin_amdgcn_ballot_w64, "LUib", "nc", "wavefrontsize64")
158
 
159
// Deprecated intrinsics in favor of __builtin_amdgn_ballot_{w32|w64}
160
BUILTIN(__builtin_amdgcn_uicmp, "WUiUiUiIi", "nc")
161
BUILTIN(__builtin_amdgcn_uicmpl, "WUiWUiWUiIi", "nc")
162
BUILTIN(__builtin_amdgcn_sicmp, "WUiiiIi", "nc")
163
BUILTIN(__builtin_amdgcn_sicmpl, "WUiWiWiIi", "nc")
164
BUILTIN(__builtin_amdgcn_fcmp, "WUiddIi", "nc")
165
BUILTIN(__builtin_amdgcn_fcmpf, "WUiffIi", "nc")
166
 
167
//===----------------------------------------------------------------------===//
168
// Flat addressing builtins.
169
//===----------------------------------------------------------------------===//
170
BUILTIN(__builtin_amdgcn_is_shared, "bvC*0", "nc")
171
BUILTIN(__builtin_amdgcn_is_private, "bvC*0", "nc")
172
 
173
//===----------------------------------------------------------------------===//
174
// CI+ only builtins.
175
//===----------------------------------------------------------------------===//
176
TARGET_BUILTIN(__builtin_amdgcn_s_dcache_inv_vol, "v", "n", "ci-insts")
177
TARGET_BUILTIN(__builtin_amdgcn_buffer_wbinvl1_vol, "v", "n", "ci-insts")
178
TARGET_BUILTIN(__builtin_amdgcn_ds_gws_sema_release_all, "vUi", "n", "ci-insts")
179
 
180
//===----------------------------------------------------------------------===//
181
// Interpolation builtins.
182
//===----------------------------------------------------------------------===//
183
BUILTIN(__builtin_amdgcn_interp_p1_f16, "ffUiUibUi", "nc")
184
BUILTIN(__builtin_amdgcn_interp_p2_f16, "hffUiUibUi", "nc")
185
BUILTIN(__builtin_amdgcn_interp_p1, "ffUiUiUi", "nc")
186
BUILTIN(__builtin_amdgcn_interp_p2, "fffUiUiUi", "nc")
187
BUILTIN(__builtin_amdgcn_interp_mov, "fUiUiUiUi", "nc")
188
 
189
//===----------------------------------------------------------------------===//
190
// VI+ only builtins.
191
//===----------------------------------------------------------------------===//
192
 
193
TARGET_BUILTIN(__builtin_amdgcn_div_fixuph, "hhhh", "nc", "16-bit-insts")
194
TARGET_BUILTIN(__builtin_amdgcn_rcph, "hh", "nc", "16-bit-insts")
195
TARGET_BUILTIN(__builtin_amdgcn_sqrth, "hh", "nc", "16-bit-insts")
196
TARGET_BUILTIN(__builtin_amdgcn_rsqh, "hh", "nc", "16-bit-insts")
197
TARGET_BUILTIN(__builtin_amdgcn_sinh, "hh", "nc", "16-bit-insts")
198
TARGET_BUILTIN(__builtin_amdgcn_cosh, "hh", "nc", "16-bit-insts")
199
TARGET_BUILTIN(__builtin_amdgcn_ldexph, "hhi", "nc", "16-bit-insts")
200
TARGET_BUILTIN(__builtin_amdgcn_frexp_manth, "hh", "nc", "16-bit-insts")
201
TARGET_BUILTIN(__builtin_amdgcn_frexp_exph, "sh", "nc", "16-bit-insts")
202
TARGET_BUILTIN(__builtin_amdgcn_fracth, "hh", "nc", "16-bit-insts")
203
TARGET_BUILTIN(__builtin_amdgcn_classh, "bhi", "nc", "16-bit-insts")
204
TARGET_BUILTIN(__builtin_amdgcn_s_memrealtime, "WUi", "n", "s-memrealtime")
205
TARGET_BUILTIN(__builtin_amdgcn_mov_dpp, "iiIiIiIiIb", "nc", "dpp")
206
TARGET_BUILTIN(__builtin_amdgcn_update_dpp, "iiiIiIiIiIb", "nc", "dpp")
207
TARGET_BUILTIN(__builtin_amdgcn_s_dcache_wb, "v", "n", "gfx8-insts")
208
TARGET_BUILTIN(__builtin_amdgcn_perm, "UiUiUiUi", "nc", "gfx8-insts")
209
 
210
//===----------------------------------------------------------------------===//
211
// GFX9+ only builtins.
212
//===----------------------------------------------------------------------===//
213
 
214
TARGET_BUILTIN(__builtin_amdgcn_fmed3h, "hhhh", "nc", "gfx9-insts")
215
 
216
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_f64, "dd*1d", "t", "gfx90a-insts")
217
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_f32, "ff*1f", "t", "gfx90a-insts")
218
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_v2f16, "V2hV2h*1V2h", "t", "gfx90a-insts")
219
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fmin_f64, "dd*1d", "t", "gfx90a-insts")
220
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fmax_f64, "dd*1d", "t", "gfx90a-insts")
221
 
222
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fadd_f64, "dd*0d", "t", "gfx90a-insts")
223
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fmin_f64, "dd*0d", "t", "gfx90a-insts")
224
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fmax_f64, "dd*0d", "t", "gfx90a-insts")
225
 
226
TARGET_BUILTIN(__builtin_amdgcn_ds_atomic_fadd_f64, "dd*3d", "t", "gfx90a-insts")
227
TARGET_BUILTIN(__builtin_amdgcn_ds_atomic_fadd_f32, "ff*3f", "t", "gfx8-insts")
228
 
229
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fadd_f32, "ff*0f", "t", "gfx940-insts")
230
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fadd_v2f16, "V2hV2h*0V2h", "t", "gfx940-insts")
231
TARGET_BUILTIN(__builtin_amdgcn_flat_atomic_fadd_v2bf16, "V2sV2s*0V2s", "t", "gfx940-insts")
232
TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_v2bf16, "V2sV2s*1V2s", "t", "gfx940-insts")
233
TARGET_BUILTIN(__builtin_amdgcn_ds_atomic_fadd_v2bf16, "V2sV2s*3V2s", "t", "gfx940-insts")
234
 
235
//===----------------------------------------------------------------------===//
236
// Deep learning builtins.
237
//===----------------------------------------------------------------------===//
238
 
239
TARGET_BUILTIN(__builtin_amdgcn_fdot2, "fV2hV2hfIb", "nc", "dot7-insts")
240
TARGET_BUILTIN(__builtin_amdgcn_fdot2_f16_f16, "hV2hV2hh", "nc", "dot9-insts")
241
TARGET_BUILTIN(__builtin_amdgcn_fdot2_bf16_bf16, "sV2sV2ss", "nc", "dot9-insts")
242
TARGET_BUILTIN(__builtin_amdgcn_fdot2_f32_bf16, "fV2sV2sfIb", "nc", "dot9-insts")
243
TARGET_BUILTIN(__builtin_amdgcn_sdot2, "SiV2SsV2SsSiIb", "nc", "dot2-insts")
244
TARGET_BUILTIN(__builtin_amdgcn_udot2, "UiV2UsV2UsUiIb", "nc", "dot2-insts")
245
TARGET_BUILTIN(__builtin_amdgcn_sdot4, "SiSiSiSiIb", "nc", "dot1-insts")
246
TARGET_BUILTIN(__builtin_amdgcn_udot4, "UiUiUiUiIb", "nc", "dot7-insts")
247
TARGET_BUILTIN(__builtin_amdgcn_sudot4, "iIbiIbiiIb", "nc", "dot8-insts")
248
TARGET_BUILTIN(__builtin_amdgcn_sdot8, "SiSiSiSiIb", "nc", "dot1-insts")
249
TARGET_BUILTIN(__builtin_amdgcn_udot8, "UiUiUiUiIb", "nc", "dot7-insts")
250
TARGET_BUILTIN(__builtin_amdgcn_sudot8, "iIbiIbiiIb", "nc", "dot8-insts")
251
 
252
//===----------------------------------------------------------------------===//
253
// GFX10+ only builtins.
254
//===----------------------------------------------------------------------===//
255
TARGET_BUILTIN(__builtin_amdgcn_permlane16, "UiUiUiUiUiIbIb", "nc", "gfx10-insts")
256
TARGET_BUILTIN(__builtin_amdgcn_permlanex16, "UiUiUiUiUiIbIb", "nc", "gfx10-insts")
257
TARGET_BUILTIN(__builtin_amdgcn_mov_dpp8, "UiUiIUi", "nc", "gfx10-insts")
258
 
259
//===----------------------------------------------------------------------===//
260
// Raytracing builtins.
261
// By default the 1st argument is i32 and the 4/5-th arguments are float4.
262
// Postfix l indicates the 1st argument is i64.
263
// Postfix h indicates the 4/5-th arguments are half4.
264
//===----------------------------------------------------------------------===//
265
TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray, "V4UiUifV4fV4fV4fV4Ui", "nc", "gfx10-insts")
266
TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray_h, "V4UiUifV4fV4hV4hV4Ui", "nc", "gfx10-insts")
267
TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray_l, "V4UiWUifV4fV4fV4fV4Ui", "nc", "gfx10-insts")
268
TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray_lh, "V4UiWUifV4fV4hV4hV4Ui", "nc", "gfx10-insts")
269
 
270
 
271
//===----------------------------------------------------------------------===//
272
// GFX11+ only builtins.
273
//===----------------------------------------------------------------------===//
274
 
275
// TODO: This is a no-op in wave32. Should the builtin require wavefrontsize64?
276
TARGET_BUILTIN(__builtin_amdgcn_permlane64, "UiUi", "nc", "gfx11-insts")
277
TARGET_BUILTIN(__builtin_amdgcn_s_wait_event_export_ready, "v", "n", "gfx11-insts")
278
 
279
//===----------------------------------------------------------------------===//
280
// WMMA builtins.
281
// Postfix w32 indicates the builtin requires wavefront size of 32.
282
// Postfix w64 indicates the builtin requires wavefront size of 64.
283
//===----------------------------------------------------------------------===//
284
TARGET_BUILTIN(__builtin_amdgcn_wmma_f32_16x16x16_f16_w32, "V8fV16hV16hV8f", "nc", "gfx11-insts")
285
TARGET_BUILTIN(__builtin_amdgcn_wmma_f32_16x16x16_bf16_w32, "V8fV16sV16sV8f", "nc", "gfx11-insts")
286
TARGET_BUILTIN(__builtin_amdgcn_wmma_f16_16x16x16_f16_w32, "V16hV16hV16hV16hIb", "nc", "gfx11-insts")
287
TARGET_BUILTIN(__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32, "V16sV16sV16sV16sIb", "nc", "gfx11-insts")
288
TARGET_BUILTIN(__builtin_amdgcn_wmma_i32_16x16x16_iu8_w32, "V8iIbV4iIbV4iV8iIb", "nc", "gfx11-insts")
289
TARGET_BUILTIN(__builtin_amdgcn_wmma_i32_16x16x16_iu4_w32, "V8iIbV2iIbV2iV8iIb", "nc", "gfx11-insts")
290
 
291
TARGET_BUILTIN(__builtin_amdgcn_wmma_f32_16x16x16_f16_w64, "V4fV16hV16hV4f", "nc", "gfx11-insts")
292
TARGET_BUILTIN(__builtin_amdgcn_wmma_f32_16x16x16_bf16_w64, "V4fV16sV16sV4f", "nc", "gfx11-insts")
293
TARGET_BUILTIN(__builtin_amdgcn_wmma_f16_16x16x16_f16_w64, "V8hV16hV16hV8hIb", "nc", "gfx11-insts")
294
TARGET_BUILTIN(__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64, "V8sV16sV16sV8sIb", "nc", "gfx11-insts")
295
TARGET_BUILTIN(__builtin_amdgcn_wmma_i32_16x16x16_iu8_w64, "V4iIbV4iIbV4iV4iIb", "nc", "gfx11-insts")
296
TARGET_BUILTIN(__builtin_amdgcn_wmma_i32_16x16x16_iu4_w64, "V4iIbV2iIbV2iV4iIb", "nc", "gfx11-insts")
297
 
298
TARGET_BUILTIN(__builtin_amdgcn_s_sendmsg_rtn, "UiUIi", "n", "gfx11-insts")
299
TARGET_BUILTIN(__builtin_amdgcn_s_sendmsg_rtnl, "UWiUIi", "n", "gfx11-insts")
300
 
301
TARGET_BUILTIN(__builtin_amdgcn_ds_bvh_stack_rtn, "V2UiUiUiV4UiIi", "n", "gfx11-insts")
302
 
303
//===----------------------------------------------------------------------===//
304
// Special builtins.
305
//===----------------------------------------------------------------------===//
306
BUILTIN(__builtin_amdgcn_read_exec, "WUi", "nc")
307
BUILTIN(__builtin_amdgcn_read_exec_lo, "Ui", "nc")
308
BUILTIN(__builtin_amdgcn_read_exec_hi, "Ui", "nc")
309
 
310
BUILTIN(__builtin_amdgcn_endpgm, "v", "nr")
311
 
312
//===----------------------------------------------------------------------===//
313
// R600-NI only builtins.
314
//===----------------------------------------------------------------------===//
315
 
316
BUILTIN(__builtin_r600_implicitarg_ptr, "Uc*7", "nc")
317
 
318
BUILTIN(__builtin_r600_read_tgid_x, "Ui", "nc")
319
BUILTIN(__builtin_r600_read_tgid_y, "Ui", "nc")
320
BUILTIN(__builtin_r600_read_tgid_z, "Ui", "nc")
321
 
322
BUILTIN(__builtin_r600_read_tidig_x, "Ui", "nc")
323
BUILTIN(__builtin_r600_read_tidig_y, "Ui", "nc")
324
BUILTIN(__builtin_r600_read_tidig_z, "Ui", "nc")
325
 
326
BUILTIN(__builtin_r600_recipsqrt_ieee, "dd", "nc")
327
BUILTIN(__builtin_r600_recipsqrt_ieeef, "ff", "nc")
328
 
329
//===----------------------------------------------------------------------===//
330
// MFMA builtins.
331
//===----------------------------------------------------------------------===//
332
 
333
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x1f32, "V32fffV32fIiIiIi", "nc", "mai-insts")
334
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x1f32, "V16fffV16fIiIiIi", "nc", "mai-insts")
335
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_4x4x1f32, "V4fffV4fIiIiIi", "nc", "mai-insts")
336
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x2f32, "V16fffV16fIiIiIi", "nc", "mai-insts")
337
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x4f32, "V4fffV4fIiIiIi", "nc", "mai-insts")
338
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x4f16, "V32fV4hV4hV32fIiIiIi", "nc", "mai-insts")
339
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x4f16, "V16fV4hV4hV16fIiIiIi", "nc", "mai-insts")
340
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_4x4x4f16, "V4fV4hV4hV4fIiIiIi", "nc", "mai-insts")
341
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x8f16, "V16fV4hV4hV16fIiIiIi", "nc", "mai-insts")
342
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x16f16, "V4fV4hV4hV4fIiIiIi", "nc", "mai-insts")
343
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_32x32x4i8, "V32iiiV32iIiIiIi", "nc", "mai-insts")
344
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_16x16x4i8, "V16iiiV16iIiIiIi", "nc", "mai-insts")
345
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_4x4x4i8, "V4iiiV4iIiIiIi", "nc", "mai-insts")
346
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_32x32x8i8, "V16iiiV16iIiIiIi", "nc", "mai-insts")
347
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_16x16x16i8, "V4iiiV4iIiIiIi", "nc", "mai-insts")
348
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x2bf16, "V32fV2sV2sV32fIiIiIi", "nc", "mai-insts")
349
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x2bf16, "V16fV2sV2sV16fIiIiIi", "nc", "mai-insts")
350
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_4x4x2bf16, "V4fV2sV2sV4fIiIiIi", "nc", "mai-insts")
351
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x4bf16, "V16fV2sV2sV16fIiIiIi", "nc", "mai-insts")
352
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x8bf16, "V4fV2sV2sV4fIiIiIi", "nc", "mai-insts")
353
 
354
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x4bf16_1k, "V32fV4sV4sV32fIiIiIi", "nc", "mai-insts")
355
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x4bf16_1k, "V16fV4sV4sV16fIiIiIi", "nc", "mai-insts")
356
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_4x4x4bf16_1k, "V4fV4sV4sV4fIiIiIi", "nc", "mai-insts")
357
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x8bf16_1k, "V16fV4sV4sV16fIiIiIi", "nc", "mai-insts")
358
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x16bf16_1k, "V4fV4sV4sV4fIiIiIi", "nc", "mai-insts")
359
TARGET_BUILTIN(__builtin_amdgcn_mfma_f64_16x16x4f64, "V4dddV4dIiIiIi", "nc", "mai-insts")
360
TARGET_BUILTIN(__builtin_amdgcn_mfma_f64_4x4x4f64, "ddddIiIiIi", "nc", "mai-insts")
361
 
362
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_16x16x32_i8, "V4iWiWiV4iIiIiIi", "nc", "mai-insts")
363
TARGET_BUILTIN(__builtin_amdgcn_mfma_i32_32x32x16_i8, "V16iWiWiV16iIiIiIi", "nc", "mai-insts")
364
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x8_xf32, "V4fV2fV2fV4fIiIiIi", "nc", "mai-insts")
365
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x4_xf32, "V16fV2fV2fV16fIiIiIi", "nc", "mai-insts")
366
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x32_bf8_bf8, "V4fWiWiV4fIiIiIi", "nc", "fp8-insts")
367
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x32_bf8_fp8, "V4fWiWiV4fIiIiIi", "nc", "fp8-insts")
368
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x32_fp8_bf8, "V4fWiWiV4fIiIiIi", "nc", "fp8-insts")
369
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_16x16x32_fp8_fp8, "V4fWiWiV4fIiIiIi", "nc", "fp8-insts")
370
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_bf8_bf8, "V16fWiWiV16fIiIiIi", "nc", "fp8-insts")
371
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_bf8_fp8, "V16fWiWiV16fIiIiIi", "nc", "fp8-insts")
372
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_fp8_bf8, "V16fWiWiV16fIiIiIi", "nc", "fp8-insts")
373
TARGET_BUILTIN(__builtin_amdgcn_mfma_f32_32x32x16_fp8_fp8, "V16fWiWiV16fIiIiIi", "nc", "fp8-insts")
374
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x32_f16, "V4fV4hV8hV4fiIiIi", "nc", "mai-insts")
375
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x16_f16, "V16fV4hV8hV16fiIiIi", "nc", "mai-insts")
376
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x32_bf16, "V4fV4sV8sV4fiIiIi", "nc", "mai-insts")
377
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x16_bf16, "V16fV4sV8sV16fiIiIi", "nc", "mai-insts")
378
TARGET_BUILTIN(__builtin_amdgcn_smfmac_i32_16x16x64_i8, "V4iV2iV4iV4iiIiIi", "nc", "mai-insts")
379
TARGET_BUILTIN(__builtin_amdgcn_smfmac_i32_32x32x32_i8, "V16iV2iV4iV16iiIiIi", "nc", "mai-insts")
380
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x64_bf8_bf8, "V4fV2iV4iV4fiIiIi", "nc", "fp8-insts")
381
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x64_bf8_fp8, "V4fV2iV4iV4fiIiIi", "nc", "fp8-insts")
382
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x64_fp8_bf8, "V4fV2iV4iV4fiIiIi", "nc", "fp8-insts")
383
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_16x16x64_fp8_fp8, "V4fV2iV4iV4fiIiIi", "nc", "fp8-insts")
384
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x32_bf8_bf8, "V16fV2iV4iV16fiIiIi", "nc", "fp8-insts")
385
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x32_bf8_fp8, "V16fV2iV4iV16fiIiIi", "nc", "fp8-insts")
386
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x32_fp8_bf8, "V16fV2iV4iV16fiIiIi", "nc", "fp8-insts")
387
TARGET_BUILTIN(__builtin_amdgcn_smfmac_f32_32x32x32_fp8_fp8, "V16fV2iV4iV16fiIiIi", "nc", "fp8-insts")
388
 
389
TARGET_BUILTIN(__builtin_amdgcn_cvt_f32_bf8, "fiIi", "nc", "fp8-insts")
390
TARGET_BUILTIN(__builtin_amdgcn_cvt_f32_fp8, "fiIi", "nc", "fp8-insts")
391
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_f32_bf8, "V2fiIb", "nc", "fp8-insts")
392
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_f32_fp8, "V2fiIb", "nc", "fp8-insts")
393
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_bf8_f32, "iffiIb", "nc", "fp8-insts")
394
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f32, "iffiIb", "nc", "fp8-insts")
395
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf8_f32, "ifiiIi", "nc", "fp8-insts")
396
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32, "ifiiIi", "nc", "fp8-insts")
397
 
398
#undef BUILTIN
399
#undef TARGET_BUILTIN