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
//===- IntrinsicsNVVM.td - Defines NVVM intrinsics ---------*- tablegen -*-===//
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 of the NVVM-specific intrinsics for use with NVPTX.
10
//
11
//===----------------------------------------------------------------------===//
12
 
13
// The following intrinsics were once defined here, but are now auto-upgraded
14
// to target-generic LLVM intrinsics.
15
//
16
//   * llvm.nvvm.brev32  --> llvm.bitreverse.i32
17
//   * llvm.nvvm.brev64  --> llvm.bitreverse.i64
18
//   * llvm.nvvm.clz.i   --> llvm.ctlz.i32
19
//   * llvm.nvvm.clz.ll  --> trunc i64 llvm.ctlz.i64(x) to i32
20
//   * llvm.nvvm.popc.i  --> llvm.ctpop.i32
21
//   * llvm.nvvm.popc.ll --> trunc i64 llvm.ctpop.i64 to i32
22
//   * llvm.nvvm.abs.i   --> select(x >= -x, x, -x)
23
//   * llvm.nvvm.abs.ll  --> ibid.
24
//   * llvm.nvvm.max.i   --> select(x sge y, x, y)
25
//   * llvm.nvvm.max.ll  --> ibid.
26
//   * llvm.nvvm.max.ui  --> select(x uge y, x, y)
27
//   * llvm.nvvm.max.ull --> ibid.
28
//   * llvm.nvvm.max.i   --> select(x sle y, x, y)
29
//   * llvm.nvvm.max.ll  --> ibid.
30
//   * llvm.nvvm.max.ui  --> select(x ule y, x, y)
31
//   * llvm.nvvm.max.ull --> ibid.
32
//   * llvm.nvvm.h2f     --> llvm.convert.to.fp16.f32
33
 
34
def llvm_global_i8ptr_ty  : LLVMQualPointerType<llvm_i8_ty, 1>;  // (global)i8*
35
def llvm_shared_i8ptr_ty  : LLVMQualPointerType<llvm_i8_ty, 3>;  // (shared)i8*
36
def llvm_i64ptr_ty        : LLVMPointerType<llvm_i64_ty>;        // i64*
37
def llvm_any_i64ptr_ty    : LLVMAnyPointerType<llvm_i64_ty>;     // (space)i64*
38
def llvm_shared_i64ptr_ty : LLVMQualPointerType<llvm_i64_ty, 3>; // (shared)i64*
39
 
40
//
41
// MISC
42
//
43
 
44
// Helper class that represents a 'fragment' of an NVPTX *MMA instruction.
45
// Geom: m<M>n<N>k<K>. E.g. m8n32k16
46
// Frag: [a|b|c|d] ([x1|x2|x4] for ldmatrix)
47
// PtxEltType: PTX type for the element.
48
class WMMA_REGS<string Geom, string Frag, string PtxEltType> {
49
  string geom = Geom;
50
  string frag = Frag;
51
  string ptx_elt_type = PtxEltType;
52
  string gft = Geom#":"#Frag#":"#ptx_elt_type;
53
  string ft = frag#":"#ptx_elt_type;
54
  list<LLVMType> regs = !cond(
55
    // mma fp ops use smaller fragments than wmma fp ops
56
    !eq(gft,"m8n8k4:a:f16") : !listsplat(llvm_v2f16_ty, 2),
57
    !eq(gft,"m8n8k4:b:f16") : !listsplat(llvm_v2f16_ty, 2),
58
    !eq(gft,"m16n8k8:a:f16") : !listsplat(llvm_v2f16_ty, 2),
59
    !eq(gft,"m16n8k8:b:f16") : [llvm_v2f16_ty],
60
    !eq(gft,"m16n8k8:c:f16") : !listsplat(llvm_v2f16_ty, 2),
61
    !eq(gft,"m16n8k8:d:f16") : !listsplat(llvm_v2f16_ty, 2),
62
    !eq(gft,"m16n8k8:c:f32") : !listsplat(llvm_float_ty, 4),
63
    !eq(gft,"m16n8k8:d:f32") : !listsplat(llvm_float_ty, 4),
64
    !eq(gft,"m16n8k16:a:f16") : !listsplat(llvm_v2f16_ty, 4),
65
    !eq(gft,"m16n8k16:b:f16") : !listsplat(llvm_v2f16_ty, 2),
66
    !eq(gft,"m16n8k16:c:f16") : !listsplat(llvm_v2f16_ty, 2),
67
    !eq(gft,"m16n8k16:d:f16") : !listsplat(llvm_v2f16_ty, 2),
68
    !eq(gft,"m16n8k16:c:f32") : !listsplat(llvm_float_ty, 4),
69
    !eq(gft,"m16n8k16:d:f32") : !listsplat(llvm_float_ty, 4),
70
    !eq(gft,"m16n8k4:c:f32") : !listsplat(llvm_float_ty, 4),
71
    !eq(gft,"m16n8k4:d:f32") : !listsplat(llvm_float_ty, 4),
72
 
73
    // wmma fp16 -> fp16/fp32 @  m16n16k16/m8n32k16/m32n8k16
74
    // All other supported geometries use the same fragment format for f32 and
75
    // f16, so we only need to consider {fragment, type}.
76
    !eq(ft,"a:f16") : !listsplat(llvm_v2f16_ty, 8),
77
    !eq(ft,"b:f16") : !listsplat(llvm_v2f16_ty, 8),
78
    !eq(ft,"c:f16") : !listsplat(llvm_v2f16_ty, 4),
79
    !eq(ft,"d:f16") : !listsplat(llvm_v2f16_ty, 4),
80
    !eq(ft,"c:f32") : !listsplat(llvm_float_ty, 8),
81
    !eq(ft,"d:f32") : !listsplat(llvm_float_ty, 8),
82
 
83
    // wmma tf32 -> s32 @ m16n16k8
84
    !eq(gft,"m16n16k8:a:tf32") : !listsplat(llvm_i32_ty, 4),
85
    !eq(gft,"m16n16k8:b:tf32") : !listsplat(llvm_i32_ty, 4),
86
 
87
    // mma tf32 -> s32 @ m16n16k8/m16n8k8
88
    !eq(gft,"m16n8k4:a:tf32") : !listsplat(llvm_i32_ty, 2),
89
    !eq(gft,"m16n8k4:b:tf32") : [llvm_i32_ty],
90
    !eq(gft,"m16n8k8:a:tf32") : !listsplat(llvm_i32_ty, 4),
91
    !eq(gft,"m16n8k8:b:tf32") : !listsplat(llvm_i32_ty, 2),
92
 
93
    !eq(gft,"m8n8k4:a:f64") : [llvm_double_ty],
94
    !eq(gft,"m8n8k4:b:f64") : [llvm_double_ty],
95
    !eq(gft,"m8n8k4:c:f64") : !listsplat(llvm_double_ty, 2),
96
    !eq(gft,"m8n8k4:d:f64") : !listsplat(llvm_double_ty, 2),
97
 
98
    // wmma bf16 -> s32 @ m16n16k16/m8n32k16/m32n8k16
99
    !eq(gft,"m16n16k16:a:bf16") : !listsplat(llvm_i32_ty, 4),
100
    !eq(gft,"m16n16k16:b:bf16") : !listsplat(llvm_i32_ty, 4),
101
    !eq(gft,"m8n32k16:a:bf16") : !listsplat(llvm_i32_ty, 2),
102
    !eq(gft,"m8n32k16:b:bf16") : !listsplat(llvm_i32_ty, 8),
103
    !eq(gft,"m32n8k16:a:bf16") : !listsplat(llvm_i32_ty, 8),
104
    !eq(gft,"m32n8k16:b:bf16") : !listsplat(llvm_i32_ty, 2),
105
 
106
    // mma bf16 -> s32 @ m16n8k16/m16n8k8
107
    !eq(gft,"m16n8k16:a:bf16") : !listsplat(llvm_i32_ty, 4),
108
    !eq(gft,"m16n8k16:b:bf16") : !listsplat(llvm_i32_ty, 2),
109
    !eq(gft,"m16n8k8:a:bf16") : !listsplat(llvm_i32_ty, 2),
110
    !eq(gft,"m16n8k8:b:bf16") : [llvm_i32_ty],
111
 
112
    // wmma u8/s8 -> s32 @ m16n16k16/m8n32k16/m32n8k16
113
    !eq(gft,"m16n16k16:a:u8") : !listsplat(llvm_i32_ty, 2),
114
    !eq(gft,"m16n16k16:a:s8") : !listsplat(llvm_i32_ty, 2),
115
    !eq(gft,"m16n16k16:b:u8") : !listsplat(llvm_i32_ty, 2),
116
    !eq(gft,"m16n16k16:b:s8") : !listsplat(llvm_i32_ty, 2),
117
    !eq(gft,"m16n16k16:c:s32") : !listsplat(llvm_i32_ty, 8),
118
    !eq(gft,"m16n16k16:d:s32") : !listsplat(llvm_i32_ty, 8),
119
 
120
    !eq(gft,"m8n32k16:a:u8") : [llvm_i32_ty],
121
    !eq(gft,"m8n32k16:a:s8") : [llvm_i32_ty],
122
    !eq(gft,"m8n32k16:b:u8") : !listsplat(llvm_i32_ty, 4),
123
    !eq(gft,"m8n32k16:b:s8") : !listsplat(llvm_i32_ty, 4),
124
    !eq(gft,"m8n32k16:c:s32") : !listsplat(llvm_i32_ty, 8),
125
    !eq(gft,"m8n32k16:d:s32") : !listsplat(llvm_i32_ty, 8),
126
 
127
    !eq(gft,"m32n8k16:a:u8") : !listsplat(llvm_i32_ty, 4),
128
    !eq(gft,"m32n8k16:a:s8") : !listsplat(llvm_i32_ty, 4),
129
    !eq(gft,"m32n8k16:b:u8") : [llvm_i32_ty],
130
    !eq(gft,"m32n8k16:b:s8") : [llvm_i32_ty],
131
    !eq(gft,"m32n8k16:c:s32") : !listsplat(llvm_i32_ty, 8),
132
    !eq(gft,"m32n8k16:d:s32") : !listsplat(llvm_i32_ty, 8),
133
 
134
    // mma u8/s8 -> s32 @ m8n8k16/m16n8k16/m16n8k32
135
    !eq(gft,"m8n8k16:a:u8") : [llvm_i32_ty],
136
    !eq(gft,"m8n8k16:a:s8") : [llvm_i32_ty],
137
    !eq(gft,"m8n8k16:b:u8") : [llvm_i32_ty],
138
    !eq(gft,"m8n8k16:b:s8") : [llvm_i32_ty],
139
    !eq(gft,"m8n8k16:c:s32") : !listsplat(llvm_i32_ty, 2),
140
    !eq(gft,"m8n8k16:d:s32") : !listsplat(llvm_i32_ty, 2),
141
 
142
    !eq(gft,"m16n8k16:a:u8") : !listsplat(llvm_i32_ty, 2),
143
    !eq(gft,"m16n8k16:a:s8") : !listsplat(llvm_i32_ty, 2),
144
    !eq(gft,"m16n8k16:b:u8") : [llvm_i32_ty],
145
    !eq(gft,"m16n8k16:b:s8") : [llvm_i32_ty],
146
    !eq(gft,"m16n8k16:c:s32") : !listsplat(llvm_i32_ty, 4),
147
    !eq(gft,"m16n8k16:d:s32") : !listsplat(llvm_i32_ty, 4),
148
 
149
    !eq(gft,"m16n8k32:a:u8") : !listsplat(llvm_i32_ty, 4),
150
    !eq(gft,"m16n8k32:a:s8") : !listsplat(llvm_i32_ty, 4),
151
    !eq(gft,"m16n8k32:b:u8") : !listsplat(llvm_i32_ty, 2),
152
    !eq(gft,"m16n8k32:b:s8") : !listsplat(llvm_i32_ty, 2),
153
    !eq(gft,"m16n8k32:c:s32") : !listsplat(llvm_i32_ty, 4),
154
    !eq(gft,"m16n8k32:d:s32") : !listsplat(llvm_i32_ty, 4),
155
 
156
    // wmma/mma u4/s4 -> s32 @ m8n8k32 (u4/s4)
157
    !eq(gft,"m8n8k32:a:u4") : [llvm_i32_ty],
158
    !eq(gft,"m8n8k32:a:s4") : [llvm_i32_ty],
159
    !eq(gft,"m8n8k32:b:u4") : [llvm_i32_ty],
160
    !eq(gft,"m8n8k32:b:s4") : [llvm_i32_ty],
161
    !eq(gft,"m8n8k32:c:s32") : !listsplat(llvm_i32_ty, 2),
162
    !eq(gft,"m8n8k32:d:s32") : !listsplat(llvm_i32_ty, 2),
163
 
164
    !eq(gft,"m16n8k32:a:u4") : !listsplat(llvm_i32_ty, 2),
165
    !eq(gft,"m16n8k32:a:s4") : !listsplat(llvm_i32_ty, 2),
166
    !eq(gft,"m16n8k32:b:u4") : [llvm_i32_ty],
167
    !eq(gft,"m16n8k32:b:s4") : [llvm_i32_ty],
168
    !eq(gft,"m16n8k32:c:s32") : !listsplat(llvm_i32_ty, 4),
169
    !eq(gft,"m16n8k32:d:s32") : !listsplat(llvm_i32_ty, 4),
170
 
171
    !eq(gft,"m16n8k64:a:u4") : !listsplat(llvm_i32_ty, 4),
172
    !eq(gft,"m16n8k64:a:s4") : !listsplat(llvm_i32_ty, 4),
173
    !eq(gft,"m16n8k64:b:u4") : !listsplat(llvm_i32_ty, 2),
174
    !eq(gft,"m16n8k64:b:s4") : !listsplat(llvm_i32_ty, 2),
175
    !eq(gft,"m16n8k64:c:s32") : !listsplat(llvm_i32_ty, 4),
176
    !eq(gft,"m16n8k64:d:s32") : !listsplat(llvm_i32_ty, 4),
177
 
178
    // wmma/mma b1 -> s32 @ m8n8k128(b1)
179
    !eq(gft,"m8n8k128:a:b1") : [llvm_i32_ty],
180
    !eq(gft,"m8n8k128:b:b1") : [llvm_i32_ty],
181
    !eq(gft,"m8n8k128:c:s32") : !listsplat(llvm_i32_ty, 2),
182
    !eq(gft,"m8n8k128:d:s32") : !listsplat(llvm_i32_ty, 2),
183
 
184
    !eq(gft,"m16n8k128:a:b1") : !listsplat(llvm_i32_ty, 2),
185
    !eq(gft,"m16n8k128:b:b1") : [llvm_i32_ty],
186
    !eq(gft,"m16n8k128:c:s32") : !listsplat(llvm_i32_ty, 4),
187
    !eq(gft,"m16n8k128:d:s32") : !listsplat(llvm_i32_ty, 4),
188
 
189
    !eq(gft,"m16n8k256:a:b1") : !listsplat(llvm_i32_ty, 4),
190
    !eq(gft,"m16n8k256:b:b1") : !listsplat(llvm_i32_ty, 2),
191
    !eq(gft,"m16n8k256:c:s32") : !listsplat(llvm_i32_ty, 4),
192
    !eq(gft,"m16n8k256:d:s32") : !listsplat(llvm_i32_ty, 4),
193
 
194
    // ldmatrix b16 -> s32 @ m8n8
195
    !eq(gft,"m8n8:x1:b16") : !listsplat(llvm_i32_ty, 1),
196
    !eq(gft,"m8n8:x2:b16") : !listsplat(llvm_i32_ty, 2),
197
    !eq(gft,"m8n8:x4:b16") : !listsplat(llvm_i32_ty, 4),
198
  );
199
}
200
 
201
class WMMA_NAME_LDST<string Op, WMMA_REGS Frag, string Layout, int WithStride> {
202
  string intr = "llvm.nvvm.wmma."
203
                # Frag.geom
204
                # "." # Op
205
                # "." # Frag.frag
206
                # "." # Layout
207
                # !if(WithStride, ".stride", "")
208
                # "." # Frag.ptx_elt_type
209
                ;
210
  // TODO(tra): record name should ideally use the same field order as the intrinsic.
211
  // E.g. string record = !subst("llvm", "int",
212
  //                      !subst(".", "_", llvm));
213
  string record = "int_nvvm_wmma_"
214
                # Frag.geom
215
                # "_" # Op
216
                # "_" # Frag.frag
217
                # "_" # Frag.ptx_elt_type
218
                # "_" # Layout
219
                # !if(WithStride, "_stride", "");
220
}
221
 
222
class MMA_SIGNATURE<WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
223
  list<WMMA_REGS> id_frags = !cond(
224
     // FP16 ops are identified by accumulator & result type.
225
     !eq(A.ptx_elt_type, "f16") : [D, C],
226
     // other ops are identified by input types.
227
     !ne(A.ptx_elt_type, B.ptx_elt_type): [A, B],
228
     true: [A]
229
     );
230
   string ret = !foldl("", id_frags, a, b, !strconcat(a, ".", b.ptx_elt_type));
231
}
232
 
233
class WMMA_NAME<string ALayout, string BLayout, int Satfinite, string Rnd, string b1op,
234
                WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
235
  string signature = MMA_SIGNATURE<A, B, C, D>.ret;
236
  string llvm = "llvm.nvvm.wmma."
237
                # A.geom
238
                # ".mma"
239
                # b1op
240
                # "." # ALayout
241
                # "." # BLayout
242
                # !if(!ne(Rnd, ""), !strconcat(".", Rnd), "")
243
                # signature
244
                # !if(Satfinite, ".satfinite", "");
245
 
246
  string record = !subst(".", "_",
247
                  !subst("llvm.", "int_", llvm));
248
}
249
 
250
class MMA_NAME<string ALayout, string BLayout, int Satfinite, string b1op,
251
               WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D> {
252
  string signature = MMA_SIGNATURE<A, B, C, D>.ret;
253
  string llvm = "llvm.nvvm.mma"
254
                # b1op
255
                # "." # A.geom
256
                # "." # ALayout
257
                # "." # BLayout
258
                # !if(Satfinite, ".satfinite", "")
259
                # signature;
260
  string record = !subst(".", "_",
261
                  !subst("llvm.", "int_", llvm));
262
}
263
 
264
class LDMATRIX_NAME<WMMA_REGS Frag, int Trans> {
265
  string intr = "llvm.nvvm.ldmatrix.sync.aligned"
266
                # "." # Frag.geom
267
                # "." # Frag.frag
268
                # !if(Trans, ".trans", "")
269
                # "." # Frag.ptx_elt_type
270
                ;
271
  string record = !subst(".", "_",
272
                  !subst("llvm.", "int_", intr));
273
}
274
 
275
// Generates list of 4-tuples of WMMA_REGS representing a valid MMA op.
276
//   Geom: list of supported geometries.
277
//   TypeN: PTX type of the corresponding fragment's element.
278
//   TypeB and TypeD may be empty if it must match that of TypeA or TypeC.
279
class MMA_OPS<list<string> Geom, list<string> TypeA, list<string> TypeB,
280
            list<string> TypeC, list<string> TypeD> {
281
  list<list<WMMA_REGS>> ret =
282
     !foldl([]<list<WMMA_REGS>>, Geom, t1, geom, !listconcat(t1,
283
     !foldl([]<list<WMMA_REGS>>, TypeA, t2, type_a, !listconcat(t2,
284
     !foldl([]<list<WMMA_REGS>>, !if(!size(TypeB), TypeB, [type_a]), t3, type_b, !listconcat(t3,
285
     !foldl([]<list<WMMA_REGS>>, TypeC, t4, type_c, !listconcat(t4,
286
     !foldl([]<list<WMMA_REGS>>, !if(!size(TypeD), TypeD, [type_c]), t5, type_d, !listconcat(t5,
287
            [[WMMA_REGS<geom, "a", type_a>,
288
              WMMA_REGS<geom, "b", type_b>,
289
              WMMA_REGS<geom, "c", type_c>,
290
              WMMA_REGS<geom, "d", type_d>]]))))))))));
291
   // Debugging aid for readable representation of the list above.
292
   list<list<string>> ops = !foreach(x, ret, [x[0].gft, x[1].gft, x[2].gft, x[3].gft]);
293
}
294
 
295
class MMA_LDST_OPS<list<string> Geom, list<string> Frags, list<string> Types> {
296
  list<WMMA_REGS> ret =
297
     !foldl([]<WMMA_REGS>, Geom, t1, geom, !listconcat(t1,
298
     !foldl([]<WMMA_REGS>, Frags, t2, frag, !listconcat(t2,
299
     !foldl([]<WMMA_REGS>, Types, t3, type, !listconcat(t3,
300
            [WMMA_REGS<geom, frag, type>]))))));
301
   // Debugging aid for readable representation of the list above.
302
   list<string> ops = !foreach(x, ret, x.gft);
303
}
304
 
305
class LDMATRIX_OPS<list<string> Geom, list<string> Frags, list<string> Types> {
306
  list<WMMA_REGS> ret =
307
     !foldl([]<WMMA_REGS>, Geom, t1, geom, !listconcat(t1,
308
     !foldl([]<WMMA_REGS>, Frags, t2, frag, !listconcat(t2,
309
     !foldl([]<WMMA_REGS>, Types, t3, type, !listconcat(t3,
310
            [WMMA_REGS<geom, frag, type>]))))));
311
   // Debugging aid for readable representation of the list above.
312
   list<string> ops = !foreach(x, ret, x.gft);
313
}
314
 
315
// Creates list of valid combinations of fragments. This is the main list that
316
// drives generation of corresponding intrinsics and instructions.
317
class NVVM_MMA_OPS {
318
  list<list<WMMA_REGS>> tf32_wmma_ops = MMA_OPS<
319
            ["m16n16k8"],
320
            ["tf32"], [], ["f32"], []>.ret;
321
  list<list<WMMA_REGS>> bf16_wmma_ops = MMA_OPS<
322
            ["m16n16k16", "m32n8k16", "m8n32k16"],
323
            ["bf16"], [], ["f32"], []>.ret;
324
  list<list<WMMA_REGS>> f64_wmma_ops = MMA_OPS<
325
            ["m8n8k4"],
326
            ["f64"], [], ["f64"], []>.ret;
327
  list<list<WMMA_REGS>> fp_wmma_ops = MMA_OPS<
328
            ["m16n16k16", "m32n8k16", "m8n32k16"],
329
            ["f16"], [], ["f16", "f32"], ["f16", "f32"]>.ret;
330
  list<list<WMMA_REGS>> int_wmma_ops = MMA_OPS<
331
            ["m16n16k16", "m32n8k16", "m8n32k16"],
332
            ["s8", "u8"], [], ["s32"], []>.ret;
333
  list<list<WMMA_REGS>> subint_wmma_ops = MMA_OPS<
334
            ["m8n8k32"],
335
            ["s4", "u4"], [], ["s32"], []>.ret;
336
  list<list<WMMA_REGS>> bit_wmma_ops = MMA_OPS<
337
            ["m8n8k128"],
338
            ["b1"], [], ["s32"], []>.ret;
339
  list<list<WMMA_REGS>> all_wmma_ops = !listconcat(
340
            tf32_wmma_ops, bf16_wmma_ops, f64_wmma_ops,
341
            fp_wmma_ops, int_wmma_ops, subint_wmma_ops, bit_wmma_ops);
342
 
343
  list<list<WMMA_REGS>> tf32_mma_ops = MMA_OPS<
344
            ["m16n8k4", "m16n8k8"],
345
            ["tf32"], [], ["f32"], []>.ret;
346
  list<list<WMMA_REGS>> bf16_mma_ops = MMA_OPS<
347
            ["m16n8k16", "m16n8k8"],
348
            ["bf16"], [], ["f32"], []>.ret;
349
  list<list<WMMA_REGS>> f64_mma_ops = MMA_OPS<
350
            ["m8n8k4"],
351
            ["f64"], [], ["f64"], []>.ret;
352
  list<list<WMMA_REGS>> fp_mma_ops = MMA_OPS<
353
            ["m8n8k4", "m16n8k8", "m16n8k16"],
354
            ["f16"], [], ["f16", "f32"], ["f16", "f32"]>.ret;
355
  list<list<WMMA_REGS>> int_mma_ops = MMA_OPS<
356
            ["m8n8k16", "m16n8k16", "m16n8k32"],
357
            ["s8", "u8"], ["s8", "u8"], ["s32"], []>.ret;
358
  list<list<WMMA_REGS>> subint_mma_ops = MMA_OPS<
359
            ["m8n8k32", "m16n8k32", "m16n8k64"],
360
            ["s4", "u4"], ["s4", "u4"], ["s32"], []>.ret;
361
  list<list<WMMA_REGS>> bit_mma_ops = MMA_OPS<
362
            ["m8n8k128", "m16n8k128", "m16n8k256"],
363
            ["b1"], [], ["s32"], []>.ret;
364
  list<list<WMMA_REGS>> all_mma_ops = !listconcat(
365
            tf32_mma_ops, bf16_mma_ops, f64_mma_ops,
366
            fp_mma_ops, int_mma_ops, subint_mma_ops, bit_mma_ops);
367
 
368
  list<WMMA_REGS> ldst_ab_ops = MMA_LDST_OPS<
369
            ["m16n16k16", "m32n8k16", "m8n32k16"],
370
            ["a", "b"], ["f16", "u8", "s8", "bf16"]>.ret;
371
  list<WMMA_REGS> ldst_cd_ops = MMA_LDST_OPS<
372
            ["m16n16k16", "m32n8k16", "m8n32k16"],
373
            ["c", "d"], ["f16", "f32", "s32"]>.ret;
374
  list<WMMA_REGS> ldst_tf32_ab_ops = MMA_LDST_OPS<
375
            ["m16n16k8"],
376
            ["a", "b"], ["tf32"]>.ret;
377
  list<WMMA_REGS> ldst_tf32_cd_ops = MMA_LDST_OPS<
378
            ["m16n16k8"],
379
            ["c", "d"], ["f32"]>.ret;
380
  list<WMMA_REGS> ldst_f64_abcd_ops = MMA_LDST_OPS<
381
            ["m8n8k4"],
382
            ["a", "b", "c", "d"], ["f64"]>.ret;
383
  list<WMMA_REGS> ldst_subint_ab_ops = MMA_LDST_OPS<
384
            ["m8n8k32"], ["a", "b"], ["s4","u4"]>.ret;
385
  list<WMMA_REGS> ldst_bit_ab_ops = MMA_LDST_OPS<
386
            ["m8n8k128"], ["a", "b"], ["b1"]>.ret;
387
  list<WMMA_REGS> ldst_subint_cd_ops = MMA_LDST_OPS<
388
            ["m8n8k32", "m8n8k128"],  ["c", "d"], ["s32"]>.ret;
389
  list<WMMA_REGS> all_ldst_ops = !listconcat(ldst_ab_ops, ldst_cd_ops,
390
                                             ldst_tf32_ab_ops,
391
                                             ldst_tf32_cd_ops,
392
                                             ldst_f64_abcd_ops,
393
                                             ldst_subint_ab_ops,
394
                                             ldst_bit_ab_ops,
395
                                             ldst_subint_cd_ops);
396
  // Separate A/B/C fragments (loads) from D (stores).
397
  list<WMMA_REGS> all_ld_ops = !filter(op, all_ldst_ops, !ne(op.frag, "d"));
398
  list<WMMA_REGS> all_st_ops = !filter(op, all_ldst_ops, !eq(op.frag, "d"));
399
 
400
  list<WMMA_REGS> ldmatrix_b16_ops = LDMATRIX_OPS<
401
    ["m8n8"], ["x1", "x2", "x4"], ["b16"]>.ret;
402
  list<WMMA_REGS> all_ldmatrix_ops = ldmatrix_b16_ops;
403
}
404
 
405
def NVVM_MMA_OPS : NVVM_MMA_OPS;
406
 
407
// Returns true if this combination of fragment and layout for WMMA load/store
408
// ops is supported; false otherwise.
409
// E.g.
410
// if NVVM_WMMA_LDST_SUPPORTED<...>.ret then
411
//   def : FOO<>; // The record will only be defined for supported ops.
412
//
413
class NVVM_WMMA_LDST_SUPPORTED<WMMA_REGS frag, string layout> {
414
  string f = frag.frag;
415
  string t = frag.ptx_elt_type;
416
 
417
  bit ret = !cond(
418
    // Sub-int load and store requires A fragment to be of row layout and B
419
    // fragments to be of column layout.
420
    !and(!or(!eq(t, "b1"),
421
             !eq(t, "u4"),
422
             !eq(t, "s4")),
423
         !or(!and(!eq(f, "a"),
424
                  !ne(layout, "row")),
425
             !and(!eq(f, "b"),
426
                  !ne(layout, "col")))) : false,
427
    true: true
428
  );
429
}
430
 
431
// Returns true if this combination of layout/satf/rnd for WMMA ops is
432
// supported; false otherwise.
433
// E.g.
434
// if NVVM_WMMA_SUPPORTED<...>.ret then
435
//   def : FOO<>; // The record will only be defined for supported ops.
436
//
437
class NVVM_WMMA_SUPPORTED<list<WMMA_REGS> frags, string layout_a, string layout_b, int satf, string rnd> {
438
  // WMMA ops check both layouts.
439
  string layout = layout_a # ":" # layout_b;
440
  string t = frags[0].ptx_elt_type;
441
 
442
  bit ret = !cond(
443
    // only f64 wmma functions support rnd options
444
    // any non f64 type that uses a rnd value is invalid
445
    !and(!ne(t, "f64"), !ne(rnd, "")) : false,
446
 
447
    // satf is only valid for select types
448
    !and(!eq(satf, 1),
449
         !ne(t, "s8"),
450
         !ne(t, "u8"),
451
         !ne(t, "s4"),
452
         !ne(t, "u4"),
453
         !ne(t, "f16")): false,
454
 
455
    // Sub-int wmma requires row/column layout
456
    !and(!or(!eq(t, "s4"),
457
             !eq(t, "u4"),
458
             !eq(t, "b1")),
459
         !ne(layout, "row:col")) : false,
460
    true: true
461
  );
462
}
463
 
464
class NVVM_MMA_B1OPS<list<WMMA_REGS> frags> {
465
  list<string> ret = !cond(
466
    !eq(frags[0].ptx_elt_type, "b1") : [".xor.popc", ".and.popc"],
467
    true: [""]
468
  );
469
}
470
 
471
// Returns true if this combination of layout/satf for MMA ops is supported;
472
// false otherwise.
473
// E.g.
474
// if NVVM_MMA_SUPPORTED<...>.ret then
475
//   def : FOO<>; // The record will only be defined for supported ops.
476
//
477
class NVVM_MMA_SUPPORTED<list<WMMA_REGS> frags, string layout_a, string layout_b, int satf> {
478
  // MMA ops check both layouts.
479
  string layout = layout_a # ":" # layout_b;
480
  string a_type = frags[0].ptx_elt_type;
481
  string b_type = frags[1].ptx_elt_type;
482
  string c_type = frags[2].ptx_elt_type;
483
  string d_type = frags[3].ptx_elt_type;
484
  string geom = frags[0].geom;
485
 
486
  // gcd is a shortcut used to identify instructions that depend on
487
  // geom+frag_c+frag_d.
488
  string gcd = geom # ":" # c_type # d_type;
489
  bit ret = !cond(
490
 
491
    // Limit satf to valid types
492
    !and(!eq(satf, 1),
493
         !ne(a_type, "s8"),
494
         !ne(a_type, "u8"),
495
         !ne(a_type, "s4"),
496
         !ne(a_type, "u4")): false,
497
 
498
    // m8n8k4 has no C=f32 D=f16 variant.
499
    !eq(gcd, "m8n8k4:f32f16"): false,
500
 
501
    // only m8n8k4 for f16 does not require row:col layout
502
    !and(!ne(layout, "row:col"),
503
         !or(!ne(geom, "m8n8k4"),
504
             !ne(a_type, "f16"))) : false,
505
 
506
    // m16n8k8 requires A and B to be the same type and C and D to be the same
507
    // type.
508
    !and(!eq(geom, "m16n8k8"),
509
         !or(!ne(a_type, b_type),
510
             !ne(c_type, d_type))): false,
511
 
512
    // m16n8k8 requires C and D to be the same type.
513
    !and(!eq(geom, "m16n8k8"),
514
         !ne(c_type, d_type)): false,
515
 
516
    // All other are OK.
517
    true: true
518
  );
519
}
520
 
521
// Returns true if the fragment is valid for ldmatrix ops is supported;
522
// false otherwise.
523
// E.g.
524
// if NVVM_LDMATRIX_SUPPORTED<...>.ret then
525
//   def : FOO<>; // The record will only be defined for supported ops.
526
//
527
class NVVM_LDMATRIX_SUPPORTED<WMMA_REGS frag> {
528
  string g = frag.geom;
529
  string t = frag.ptx_elt_type;
530
 
531
  bit ret = !cond(
532
    // Only currently support m8n8 and b16
533
    !and(!eq(g, "m8n8"), !eq(t, "b16")): true,
534
    true: false
535
  );
536
}
537
 
538
class SHFL_INFO<bit sync, string mode, string type, bit return_pred> {
539
  string Suffix = !if(sync, "sync_", "")
540
                  # mode # "_"
541
                  # type
542
                  # !if(return_pred, "p", "");
543
 
544
  string Name = "int_nvvm_shfl_" # Suffix;
545
  string Builtin = "__nvvm_shfl_" # Suffix;
546
  string IntrName = "llvm.nvvm.shfl." # !subst("_",".", Suffix);
547
  bit withGccBuiltin = !not(return_pred);
548
  bit withoutGccBuiltin = return_pred;
549
  LLVMType OpType = !cond(
550
    !eq(type,"i32"): llvm_i32_ty,
551
    !eq(type,"f32"): llvm_float_ty);
552
  list<LLVMType> RetTy = !if(return_pred, [OpType, llvm_i1_ty], [OpType]);
553
  list<LLVMType> ArgsTy = !if(sync,
554
    [llvm_i32_ty, OpType, llvm_i32_ty, llvm_i32_ty],
555
    [OpType, llvm_i32_ty, llvm_i32_ty]);
556
}
557
 
558
let TargetPrefix = "nvvm" in {
559
  def int_nvvm_prmt : ClangBuiltin<"__nvvm_prmt">,
560
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
561
        [IntrNoMem, IntrSpeculatable]>;
562
 
563
//
564
// Min Max
565
//
566
 
567
  foreach operation = ["min", "max"] in {
568
    def int_nvvm_f # operation # _d :
569
      ClangBuiltin<!strconcat("__nvvm_f", operation, "_d")>,
570
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
571
        [IntrNoMem, IntrSpeculatable, Commutative]>;
572
 
573
    foreach variant = ["_f", "_ftz_f", "_nan_f", "_ftz_nan_f",
574
      "_xorsign_abs_f", "_ftz_xorsign_abs_f", "_nan_xorsign_abs_f",
575
      "_ftz_nan_xorsign_abs_f"] in {
576
      def int_nvvm_f # operation # variant :
577
        ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
578
        DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
579
          [IntrNoMem, IntrSpeculatable, Commutative]>;
580
    }
581
 
582
    foreach variant = ["_f16", "_ftz_f16", "_nan_f16", "_ftz_nan_f16",
583
      "_xorsign_abs_f16", "_ftz_xorsign_abs_f16", "_nan_xorsign_abs_f16",
584
      "_ftz_nan_xorsign_abs_f16"] in {
585
      def int_nvvm_f # operation # variant :
586
        ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
587
        DefaultAttrsIntrinsic<[llvm_half_ty], [llvm_half_ty, llvm_half_ty],
588
          [IntrNoMem, IntrSpeculatable, Commutative]>;
589
    }
590
 
591
    foreach variant = ["_f16x2", "_ftz_f16x2", "_nan_f16x2",
592
      "_ftz_nan_f16x2", "_xorsign_abs_f16x2", "_ftz_xorsign_abs_f16x2",
593
      "_nan_xorsign_abs_f16x2", "_ftz_nan_xorsign_abs_f16x2"] in {
594
      def int_nvvm_f # operation # variant :
595
        ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
596
        DefaultAttrsIntrinsic<[llvm_v2f16_ty], [llvm_v2f16_ty, llvm_v2f16_ty],
597
          [IntrNoMem, IntrSpeculatable, Commutative]>;
598
    }
599
 
600
    foreach variant = ["_bf16", "_nan_bf16", "_xorsign_abs_bf16",
601
      "_nan_xorsign_abs_bf16"] in {
602
      def int_nvvm_f # operation # variant :
603
        ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
604
        DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty],
605
          [IntrNoMem, IntrSpeculatable, Commutative]>;
606
    }
607
 
608
    foreach variant = ["_bf16x2", "_nan_bf16x2", "_xorsign_abs_bf16x2",
609
      "_nan_xorsign_abs_bf16x2"] in {
610
      def int_nvvm_f # operation # variant :
611
        ClangBuiltin<!strconcat("__nvvm_f", operation, variant)>,
612
        DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
613
          [IntrNoMem, IntrSpeculatable, Commutative]>;
614
    }
615
  }
616
 
617
//
618
// Multiplication
619
//
620
 
621
  def int_nvvm_mulhi_i : ClangBuiltin<"__nvvm_mulhi_i">,
622
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
623
        [IntrNoMem, IntrSpeculatable, Commutative]>;
624
  def int_nvvm_mulhi_ui : ClangBuiltin<"__nvvm_mulhi_ui">,
625
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
626
        [IntrNoMem, IntrSpeculatable, Commutative]>;
627
 
628
  def int_nvvm_mulhi_ll : ClangBuiltin<"__nvvm_mulhi_ll">,
629
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
630
        [IntrNoMem, IntrSpeculatable, Commutative]>;
631
  def int_nvvm_mulhi_ull : ClangBuiltin<"__nvvm_mulhi_ull">,
632
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
633
        [IntrNoMem, IntrSpeculatable, Commutative]>;
634
 
635
  def int_nvvm_mul_rn_ftz_f : ClangBuiltin<"__nvvm_mul_rn_ftz_f">,
636
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
637
        [IntrNoMem, IntrSpeculatable, Commutative]>;
638
  def int_nvvm_mul_rn_f : ClangBuiltin<"__nvvm_mul_rn_f">,
639
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
640
        [IntrNoMem, IntrSpeculatable, Commutative]>;
641
  def int_nvvm_mul_rz_ftz_f : ClangBuiltin<"__nvvm_mul_rz_ftz_f">,
642
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
643
        [IntrNoMem, IntrSpeculatable, Commutative]>;
644
  def int_nvvm_mul_rz_f : ClangBuiltin<"__nvvm_mul_rz_f">,
645
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
646
        [IntrNoMem, IntrSpeculatable, Commutative]>;
647
  def int_nvvm_mul_rm_ftz_f : ClangBuiltin<"__nvvm_mul_rm_ftz_f">,
648
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
649
        [IntrNoMem, IntrSpeculatable, Commutative]>;
650
  def int_nvvm_mul_rm_f : ClangBuiltin<"__nvvm_mul_rm_f">,
651
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
652
        [IntrNoMem, IntrSpeculatable, Commutative]>;
653
  def int_nvvm_mul_rp_ftz_f : ClangBuiltin<"__nvvm_mul_rp_ftz_f">,
654
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
655
        [IntrNoMem, IntrSpeculatable, Commutative]>;
656
  def int_nvvm_mul_rp_f : ClangBuiltin<"__nvvm_mul_rp_f">,
657
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
658
        [IntrNoMem, IntrSpeculatable, Commutative]>;
659
 
660
  def int_nvvm_mul_rn_d : ClangBuiltin<"__nvvm_mul_rn_d">,
661
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
662
        [IntrNoMem, IntrSpeculatable, Commutative]>;
663
  def int_nvvm_mul_rz_d : ClangBuiltin<"__nvvm_mul_rz_d">,
664
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
665
        [IntrNoMem, IntrSpeculatable, Commutative]>;
666
  def int_nvvm_mul_rm_d : ClangBuiltin<"__nvvm_mul_rm_d">,
667
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
668
        [IntrNoMem, IntrSpeculatable, Commutative]>;
669
  def int_nvvm_mul_rp_d : ClangBuiltin<"__nvvm_mul_rp_d">,
670
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
671
        [IntrNoMem, IntrSpeculatable, Commutative]>;
672
 
673
  def int_nvvm_mul24_i : ClangBuiltin<"__nvvm_mul24_i">,
674
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
675
        [IntrNoMem, IntrSpeculatable, Commutative]>;
676
  def int_nvvm_mul24_ui : ClangBuiltin<"__nvvm_mul24_ui">,
677
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
678
        [IntrNoMem, IntrSpeculatable, Commutative]>;
679
 
680
//
681
// Div
682
//
683
 
684
  def int_nvvm_div_approx_ftz_f : ClangBuiltin<"__nvvm_div_approx_ftz_f">,
685
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
686
        [IntrNoMem]>;
687
  def int_nvvm_div_approx_f : ClangBuiltin<"__nvvm_div_approx_f">,
688
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
689
        [IntrNoMem]>;
690
 
691
  def int_nvvm_div_rn_ftz_f : ClangBuiltin<"__nvvm_div_rn_ftz_f">,
692
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
693
        [IntrNoMem]>;
694
  def int_nvvm_div_rn_f : ClangBuiltin<"__nvvm_div_rn_f">,
695
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
696
        [IntrNoMem]>;
697
 
698
  def int_nvvm_div_rz_ftz_f : ClangBuiltin<"__nvvm_div_rz_ftz_f">,
699
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
700
        [IntrNoMem]>;
701
  def int_nvvm_div_rz_f : ClangBuiltin<"__nvvm_div_rz_f">,
702
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
703
        [IntrNoMem]>;
704
 
705
  def int_nvvm_div_rm_ftz_f : ClangBuiltin<"__nvvm_div_rm_ftz_f">,
706
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
707
        [IntrNoMem]>;
708
  def int_nvvm_div_rm_f : ClangBuiltin<"__nvvm_div_rm_f">,
709
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
710
        [IntrNoMem]>;
711
 
712
  def int_nvvm_div_rp_ftz_f : ClangBuiltin<"__nvvm_div_rp_ftz_f">,
713
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
714
        [IntrNoMem]>;
715
  def int_nvvm_div_rp_f : ClangBuiltin<"__nvvm_div_rp_f">,
716
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
717
        [IntrNoMem]>;
718
 
719
  def int_nvvm_div_rn_d : ClangBuiltin<"__nvvm_div_rn_d">,
720
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
721
        [IntrNoMem]>;
722
  def int_nvvm_div_rz_d : ClangBuiltin<"__nvvm_div_rz_d">,
723
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
724
        [IntrNoMem]>;
725
  def int_nvvm_div_rm_d : ClangBuiltin<"__nvvm_div_rm_d">,
726
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
727
        [IntrNoMem]>;
728
  def int_nvvm_div_rp_d : ClangBuiltin<"__nvvm_div_rp_d">,
729
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
730
        [IntrNoMem]>;
731
 
732
//
733
// Sad
734
//
735
 
736
  def int_nvvm_sad_i : ClangBuiltin<"__nvvm_sad_i">,
737
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
738
        [IntrNoMem, Commutative]>;
739
  def int_nvvm_sad_ui : ClangBuiltin<"__nvvm_sad_ui">,
740
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
741
        [IntrNoMem, Commutative]>;
742
 
743
//
744
// Floor  Ceil
745
//
746
 
747
  def int_nvvm_floor_ftz_f : ClangBuiltin<"__nvvm_floor_ftz_f">,
748
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
749
  def int_nvvm_floor_f : ClangBuiltin<"__nvvm_floor_f">,
750
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
751
  def int_nvvm_floor_d : ClangBuiltin<"__nvvm_floor_d">,
752
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
753
 
754
  def int_nvvm_ceil_ftz_f : ClangBuiltin<"__nvvm_ceil_ftz_f">,
755
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
756
  def int_nvvm_ceil_f : ClangBuiltin<"__nvvm_ceil_f">,
757
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
758
  def int_nvvm_ceil_d : ClangBuiltin<"__nvvm_ceil_d">,
759
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
760
 
761
//
762
// Abs
763
//
764
 
765
  def int_nvvm_fabs_ftz_f : ClangBuiltin<"__nvvm_fabs_ftz_f">,
766
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
767
  def int_nvvm_fabs_f : ClangBuiltin<"__nvvm_fabs_f">,
768
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
769
  def int_nvvm_fabs_d : ClangBuiltin<"__nvvm_fabs_d">,
770
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
771
 
772
//
773
// Abs, Neg bf16, bf16x2
774
//
775
 
776
  foreach unary = ["abs", "neg"] in {
777
    def int_nvvm_ # unary # _bf16 :
778
      ClangBuiltin<!strconcat("__nvvm_", unary, "_bf16")>,
779
      DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem]>;
780
    def int_nvvm_ # unary # _bf16x2 :
781
      ClangBuiltin<!strconcat("__nvvm_", unary, "_bf16x2")>,
782
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
783
  }
784
 
785
//
786
// Round
787
//
788
 
789
  def int_nvvm_round_ftz_f : ClangBuiltin<"__nvvm_round_ftz_f">,
790
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
791
  def int_nvvm_round_f : ClangBuiltin<"__nvvm_round_f">,
792
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
793
 
794
  def int_nvvm_round_d : ClangBuiltin<"__nvvm_round_d">,
795
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
796
 
797
//
798
// Trunc
799
//
800
 
801
  def int_nvvm_trunc_ftz_f : ClangBuiltin<"__nvvm_trunc_ftz_f">,
802
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
803
  def int_nvvm_trunc_f : ClangBuiltin<"__nvvm_trunc_f">,
804
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
805
 
806
  def int_nvvm_trunc_d : ClangBuiltin<"__nvvm_trunc_d">,
807
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
808
 
809
//
810
// Saturate
811
//
812
 
813
  def int_nvvm_saturate_ftz_f : ClangBuiltin<"__nvvm_saturate_ftz_f">,
814
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
815
  def int_nvvm_saturate_f : ClangBuiltin<"__nvvm_saturate_f">,
816
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
817
 
818
  def int_nvvm_saturate_d : ClangBuiltin<"__nvvm_saturate_d">,
819
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
820
 
821
//
822
// Exp2  Log2
823
//
824
 
825
  def int_nvvm_ex2_approx_ftz_f : ClangBuiltin<"__nvvm_ex2_approx_ftz_f">,
826
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
827
  def int_nvvm_ex2_approx_f : ClangBuiltin<"__nvvm_ex2_approx_f">,
828
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
829
  def int_nvvm_ex2_approx_d : ClangBuiltin<"__nvvm_ex2_approx_d">,
830
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
831
  def int_nvvm_ex2_approx_f16 : ClangBuiltin<"__nvvm_ex2_approx_f16">,
832
      DefaultAttrsIntrinsic<[llvm_half_ty], [llvm_half_ty], [IntrNoMem]>;
833
  def int_nvvm_ex2_approx_f16x2 : ClangBuiltin<"__nvvm_ex2_approx_f16x2">,
834
      DefaultAttrsIntrinsic<[llvm_v2f16_ty], [llvm_v2f16_ty], [IntrNoMem]>;
835
 
836
  def int_nvvm_lg2_approx_ftz_f : ClangBuiltin<"__nvvm_lg2_approx_ftz_f">,
837
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
838
  def int_nvvm_lg2_approx_f : ClangBuiltin<"__nvvm_lg2_approx_f">,
839
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
840
  def int_nvvm_lg2_approx_d : ClangBuiltin<"__nvvm_lg2_approx_d">,
841
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
842
 
843
//
844
// Sin  Cos
845
//
846
 
847
  def int_nvvm_sin_approx_ftz_f : ClangBuiltin<"__nvvm_sin_approx_ftz_f">,
848
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
849
  def int_nvvm_sin_approx_f : ClangBuiltin<"__nvvm_sin_approx_f">,
850
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
851
 
852
  def int_nvvm_cos_approx_ftz_f : ClangBuiltin<"__nvvm_cos_approx_ftz_f">,
853
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
854
  def int_nvvm_cos_approx_f : ClangBuiltin<"__nvvm_cos_approx_f">,
855
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
856
 
857
//
858
// Fma
859
//
860
 
861
  foreach variant = ["_rn_f16", "_rn_ftz_f16", "_rn_sat_f16",
862
    "_rn_ftz_sat_f16", "_rn_relu_f16", "_rn_ftz_relu_f16"] in {
863
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
864
        DefaultAttrsIntrinsic<[llvm_half_ty],
865
          [llvm_half_ty, llvm_half_ty, llvm_half_ty],
866
          [IntrNoMem, IntrSpeculatable]>;
867
  }
868
 
869
  foreach variant = ["_rn_f16x2", "_rn_ftz_f16x2", "_rn_sat_f16x2",
870
    "_rn_ftz_sat_f16x2", "_rn_relu_f16x2", "_rn_ftz_relu_f16x2"] in {
871
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
872
      DefaultAttrsIntrinsic<[llvm_v2f16_ty],
873
        [llvm_v2f16_ty, llvm_v2f16_ty, llvm_v2f16_ty],
874
        [IntrNoMem, IntrSpeculatable]>;
875
  }
876
 
877
  foreach variant = ["_rn_bf16", "_rn_relu_bf16"] in {
878
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
879
      DefaultAttrsIntrinsic<[llvm_i16_ty],
880
        [llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
881
        [IntrNoMem, IntrSpeculatable]>;
882
  }
883
 
884
  foreach variant = ["_rn_bf16x2", "_rn_relu_bf16x2"] in {
885
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
886
      DefaultAttrsIntrinsic<[llvm_i32_ty],
887
        [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
888
        [IntrNoMem, IntrSpeculatable]>;
889
  }
890
 
891
  foreach variant = ["_rn_ftz_f", "_rn_f", "_rz_ftz_f", "_rz_f", "_rm_ftz_f",
892
    "_rm_f", "_rp_ftz_f", "_rp_f"] in {
893
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
894
      DefaultAttrsIntrinsic<[llvm_float_ty],
895
        [llvm_float_ty, llvm_float_ty, llvm_float_ty],
896
        [IntrNoMem, IntrSpeculatable]>;
897
  }
898
 
899
  foreach variant = ["_rn_d", "_rz_d", "_rm_d", "_rp_d"] in {
900
    def int_nvvm_fma # variant : ClangBuiltin<!strconcat("__nvvm_fma", variant)>,
901
      DefaultAttrsIntrinsic<[llvm_double_ty],
902
        [llvm_double_ty, llvm_double_ty, llvm_double_ty],
903
        [IntrNoMem, IntrSpeculatable]>;
904
  }
905
 
906
//
907
// Rcp
908
//
909
 
910
  def int_nvvm_rcp_rn_ftz_f : ClangBuiltin<"__nvvm_rcp_rn_ftz_f">,
911
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
912
  def int_nvvm_rcp_rn_f : ClangBuiltin<"__nvvm_rcp_rn_f">,
913
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
914
  def int_nvvm_rcp_rz_ftz_f : ClangBuiltin<"__nvvm_rcp_rz_ftz_f">,
915
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
916
  def int_nvvm_rcp_rz_f : ClangBuiltin<"__nvvm_rcp_rz_f">,
917
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
918
  def int_nvvm_rcp_rm_ftz_f : ClangBuiltin<"__nvvm_rcp_rm_ftz_f">,
919
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
920
  def int_nvvm_rcp_rm_f : ClangBuiltin<"__nvvm_rcp_rm_f">,
921
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
922
  def int_nvvm_rcp_rp_ftz_f : ClangBuiltin<"__nvvm_rcp_rp_ftz_f">,
923
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
924
  def int_nvvm_rcp_rp_f : ClangBuiltin<"__nvvm_rcp_rp_f">,
925
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
926
 
927
  def int_nvvm_rcp_rn_d : ClangBuiltin<"__nvvm_rcp_rn_d">,
928
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
929
  def int_nvvm_rcp_rz_d : ClangBuiltin<"__nvvm_rcp_rz_d">,
930
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
931
  def int_nvvm_rcp_rm_d : ClangBuiltin<"__nvvm_rcp_rm_d">,
932
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
933
  def int_nvvm_rcp_rp_d : ClangBuiltin<"__nvvm_rcp_rp_d">,
934
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
935
 
936
  def int_nvvm_rcp_approx_ftz_f : ClangBuiltin<"__nvvm_rcp_approx_ftz_f">,
937
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
938
  def int_nvvm_rcp_approx_ftz_d : ClangBuiltin<"__nvvm_rcp_approx_ftz_d">,
939
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
940
 
941
//
942
// Sqrt
943
//
944
 
945
  def int_nvvm_sqrt_f : ClangBuiltin<"__nvvm_sqrt_f">,
946
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
947
  def int_nvvm_sqrt_rn_ftz_f : ClangBuiltin<"__nvvm_sqrt_rn_ftz_f">,
948
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
949
  def int_nvvm_sqrt_rn_f : ClangBuiltin<"__nvvm_sqrt_rn_f">,
950
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
951
  def int_nvvm_sqrt_rz_ftz_f : ClangBuiltin<"__nvvm_sqrt_rz_ftz_f">,
952
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
953
  def int_nvvm_sqrt_rz_f : ClangBuiltin<"__nvvm_sqrt_rz_f">,
954
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
955
  def int_nvvm_sqrt_rm_ftz_f : ClangBuiltin<"__nvvm_sqrt_rm_ftz_f">,
956
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
957
  def int_nvvm_sqrt_rm_f : ClangBuiltin<"__nvvm_sqrt_rm_f">,
958
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
959
  def int_nvvm_sqrt_rp_ftz_f : ClangBuiltin<"__nvvm_sqrt_rp_ftz_f">,
960
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
961
  def int_nvvm_sqrt_rp_f : ClangBuiltin<"__nvvm_sqrt_rp_f">,
962
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
963
  def int_nvvm_sqrt_approx_ftz_f : ClangBuiltin<"__nvvm_sqrt_approx_ftz_f">,
964
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
965
  def int_nvvm_sqrt_approx_f : ClangBuiltin<"__nvvm_sqrt_approx_f">,
966
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
967
 
968
  def int_nvvm_sqrt_rn_d : ClangBuiltin<"__nvvm_sqrt_rn_d">,
969
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
970
  def int_nvvm_sqrt_rz_d : ClangBuiltin<"__nvvm_sqrt_rz_d">,
971
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
972
  def int_nvvm_sqrt_rm_d : ClangBuiltin<"__nvvm_sqrt_rm_d">,
973
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
974
  def int_nvvm_sqrt_rp_d : ClangBuiltin<"__nvvm_sqrt_rp_d">,
975
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
976
 
977
//
978
// Rsqrt
979
//
980
 
981
  def int_nvvm_rsqrt_approx_ftz_f : ClangBuiltin<"__nvvm_rsqrt_approx_ftz_f">,
982
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
983
  def int_nvvm_rsqrt_approx_f : ClangBuiltin<"__nvvm_rsqrt_approx_f">,
984
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>;
985
  def int_nvvm_rsqrt_approx_d : ClangBuiltin<"__nvvm_rsqrt_approx_d">,
986
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>;
987
 
988
//
989
// Add
990
//
991
 
992
  def int_nvvm_add_rn_ftz_f : ClangBuiltin<"__nvvm_add_rn_ftz_f">,
993
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
994
        [IntrNoMem, IntrSpeculatable, Commutative]>;
995
  def int_nvvm_add_rn_f : ClangBuiltin<"__nvvm_add_rn_f">,
996
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
997
        [IntrNoMem, IntrSpeculatable, Commutative]>;
998
  def int_nvvm_add_rz_ftz_f : ClangBuiltin<"__nvvm_add_rz_ftz_f">,
999
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1000
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1001
  def int_nvvm_add_rz_f : ClangBuiltin<"__nvvm_add_rz_f">,
1002
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1003
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1004
  def int_nvvm_add_rm_ftz_f : ClangBuiltin<"__nvvm_add_rm_ftz_f">,
1005
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1006
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1007
  def int_nvvm_add_rm_f : ClangBuiltin<"__nvvm_add_rm_f">,
1008
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1009
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1010
  def int_nvvm_add_rp_ftz_f : ClangBuiltin<"__nvvm_add_rp_ftz_f">,
1011
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1012
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1013
  def int_nvvm_add_rp_f : ClangBuiltin<"__nvvm_add_rp_f">,
1014
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty],
1015
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1016
 
1017
  def int_nvvm_add_rn_d : ClangBuiltin<"__nvvm_add_rn_d">,
1018
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
1019
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1020
  def int_nvvm_add_rz_d : ClangBuiltin<"__nvvm_add_rz_d">,
1021
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
1022
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1023
  def int_nvvm_add_rm_d : ClangBuiltin<"__nvvm_add_rm_d">,
1024
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
1025
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1026
  def int_nvvm_add_rp_d : ClangBuiltin<"__nvvm_add_rp_d">,
1027
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty],
1028
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1029
 
1030
//
1031
// Convert
1032
//
1033
 
1034
  def int_nvvm_d2f_rn_ftz : ClangBuiltin<"__nvvm_d2f_rn_ftz">,
1035
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1036
  def int_nvvm_d2f_rn : ClangBuiltin<"__nvvm_d2f_rn">,
1037
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1038
  def int_nvvm_d2f_rz_ftz : ClangBuiltin<"__nvvm_d2f_rz_ftz">,
1039
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1040
  def int_nvvm_d2f_rz : ClangBuiltin<"__nvvm_d2f_rz">,
1041
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1042
  def int_nvvm_d2f_rm_ftz : ClangBuiltin<"__nvvm_d2f_rm_ftz">,
1043
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1044
  def int_nvvm_d2f_rm : ClangBuiltin<"__nvvm_d2f_rm">,
1045
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1046
  def int_nvvm_d2f_rp_ftz : ClangBuiltin<"__nvvm_d2f_rp_ftz">,
1047
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1048
  def int_nvvm_d2f_rp : ClangBuiltin<"__nvvm_d2f_rp">,
1049
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1050
 
1051
  def int_nvvm_d2i_rn : ClangBuiltin<"__nvvm_d2i_rn">,
1052
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1053
  def int_nvvm_d2i_rz : ClangBuiltin<"__nvvm_d2i_rz">,
1054
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1055
  def int_nvvm_d2i_rm : ClangBuiltin<"__nvvm_d2i_rm">,
1056
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1057
  def int_nvvm_d2i_rp : ClangBuiltin<"__nvvm_d2i_rp">,
1058
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1059
 
1060
  def int_nvvm_d2ui_rn : ClangBuiltin<"__nvvm_d2ui_rn">,
1061
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1062
  def int_nvvm_d2ui_rz : ClangBuiltin<"__nvvm_d2ui_rz">,
1063
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1064
  def int_nvvm_d2ui_rm : ClangBuiltin<"__nvvm_d2ui_rm">,
1065
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1066
  def int_nvvm_d2ui_rp : ClangBuiltin<"__nvvm_d2ui_rp">,
1067
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1068
 
1069
  def int_nvvm_i2d_rn : ClangBuiltin<"__nvvm_i2d_rn">,
1070
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1071
  def int_nvvm_i2d_rz : ClangBuiltin<"__nvvm_i2d_rz">,
1072
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1073
  def int_nvvm_i2d_rm : ClangBuiltin<"__nvvm_i2d_rm">,
1074
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1075
  def int_nvvm_i2d_rp : ClangBuiltin<"__nvvm_i2d_rp">,
1076
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1077
 
1078
  def int_nvvm_ui2d_rn : ClangBuiltin<"__nvvm_ui2d_rn">,
1079
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1080
  def int_nvvm_ui2d_rz : ClangBuiltin<"__nvvm_ui2d_rz">,
1081
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1082
  def int_nvvm_ui2d_rm : ClangBuiltin<"__nvvm_ui2d_rm">,
1083
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1084
  def int_nvvm_ui2d_rp : ClangBuiltin<"__nvvm_ui2d_rp">,
1085
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1086
 
1087
  def int_nvvm_f2i_rn_ftz : ClangBuiltin<"__nvvm_f2i_rn_ftz">,
1088
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1089
  def int_nvvm_f2i_rn : ClangBuiltin<"__nvvm_f2i_rn">,
1090
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1091
  def int_nvvm_f2i_rz_ftz : ClangBuiltin<"__nvvm_f2i_rz_ftz">,
1092
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1093
  def int_nvvm_f2i_rz : ClangBuiltin<"__nvvm_f2i_rz">,
1094
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1095
  def int_nvvm_f2i_rm_ftz : ClangBuiltin<"__nvvm_f2i_rm_ftz">,
1096
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1097
  def int_nvvm_f2i_rm : ClangBuiltin<"__nvvm_f2i_rm">,
1098
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1099
  def int_nvvm_f2i_rp_ftz : ClangBuiltin<"__nvvm_f2i_rp_ftz">,
1100
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1101
  def int_nvvm_f2i_rp : ClangBuiltin<"__nvvm_f2i_rp">,
1102
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1103
 
1104
  def int_nvvm_f2ui_rn_ftz : ClangBuiltin<"__nvvm_f2ui_rn_ftz">,
1105
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1106
  def int_nvvm_f2ui_rn : ClangBuiltin<"__nvvm_f2ui_rn">,
1107
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1108
  def int_nvvm_f2ui_rz_ftz : ClangBuiltin<"__nvvm_f2ui_rz_ftz">,
1109
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1110
  def int_nvvm_f2ui_rz : ClangBuiltin<"__nvvm_f2ui_rz">,
1111
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1112
  def int_nvvm_f2ui_rm_ftz : ClangBuiltin<"__nvvm_f2ui_rm_ftz">,
1113
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1114
  def int_nvvm_f2ui_rm : ClangBuiltin<"__nvvm_f2ui_rm">,
1115
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1116
  def int_nvvm_f2ui_rp_ftz : ClangBuiltin<"__nvvm_f2ui_rp_ftz">,
1117
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1118
  def int_nvvm_f2ui_rp : ClangBuiltin<"__nvvm_f2ui_rp">,
1119
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1120
 
1121
  def int_nvvm_i2f_rn : ClangBuiltin<"__nvvm_i2f_rn">,
1122
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1123
  def int_nvvm_i2f_rz : ClangBuiltin<"__nvvm_i2f_rz">,
1124
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1125
  def int_nvvm_i2f_rm : ClangBuiltin<"__nvvm_i2f_rm">,
1126
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1127
  def int_nvvm_i2f_rp : ClangBuiltin<"__nvvm_i2f_rp">,
1128
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1129
 
1130
  def int_nvvm_ui2f_rn : ClangBuiltin<"__nvvm_ui2f_rn">,
1131
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1132
  def int_nvvm_ui2f_rz : ClangBuiltin<"__nvvm_ui2f_rz">,
1133
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1134
  def int_nvvm_ui2f_rm : ClangBuiltin<"__nvvm_ui2f_rm">,
1135
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1136
  def int_nvvm_ui2f_rp : ClangBuiltin<"__nvvm_ui2f_rp">,
1137
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1138
 
1139
  def int_nvvm_lohi_i2d : ClangBuiltin<"__nvvm_lohi_i2d">,
1140
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i32_ty, llvm_i32_ty],
1141
        [IntrNoMem, IntrSpeculatable, Commutative]>;
1142
 
1143
  def int_nvvm_d2i_lo : ClangBuiltin<"__nvvm_d2i_lo">,
1144
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1145
  def int_nvvm_d2i_hi : ClangBuiltin<"__nvvm_d2i_hi">,
1146
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1147
 
1148
  def int_nvvm_f2ll_rn_ftz : ClangBuiltin<"__nvvm_f2ll_rn_ftz">,
1149
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1150
  def int_nvvm_f2ll_rn : ClangBuiltin<"__nvvm_f2ll_rn">,
1151
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1152
  def int_nvvm_f2ll_rz_ftz : ClangBuiltin<"__nvvm_f2ll_rz_ftz">,
1153
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1154
  def int_nvvm_f2ll_rz : ClangBuiltin<"__nvvm_f2ll_rz">,
1155
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1156
  def int_nvvm_f2ll_rm_ftz : ClangBuiltin<"__nvvm_f2ll_rm_ftz">,
1157
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1158
  def int_nvvm_f2ll_rm : ClangBuiltin<"__nvvm_f2ll_rm">,
1159
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1160
  def int_nvvm_f2ll_rp_ftz : ClangBuiltin<"__nvvm_f2ll_rp_ftz">,
1161
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1162
  def int_nvvm_f2ll_rp : ClangBuiltin<"__nvvm_f2ll_rp">,
1163
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1164
 
1165
  def int_nvvm_f2ull_rn_ftz : ClangBuiltin<"__nvvm_f2ull_rn_ftz">,
1166
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1167
  def int_nvvm_f2ull_rn : ClangBuiltin<"__nvvm_f2ull_rn">,
1168
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1169
  def int_nvvm_f2ull_rz_ftz : ClangBuiltin<"__nvvm_f2ull_rz_ftz">,
1170
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1171
  def int_nvvm_f2ull_rz : ClangBuiltin<"__nvvm_f2ull_rz">,
1172
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1173
  def int_nvvm_f2ull_rm_ftz : ClangBuiltin<"__nvvm_f2ull_rm_ftz">,
1174
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1175
  def int_nvvm_f2ull_rm : ClangBuiltin<"__nvvm_f2ull_rm">,
1176
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1177
  def int_nvvm_f2ull_rp_ftz : ClangBuiltin<"__nvvm_f2ull_rp_ftz">,
1178
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1179
  def int_nvvm_f2ull_rp : ClangBuiltin<"__nvvm_f2ull_rp">,
1180
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1181
 
1182
  def int_nvvm_d2ll_rn : ClangBuiltin<"__nvvm_d2ll_rn">,
1183
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1184
  def int_nvvm_d2ll_rz : ClangBuiltin<"__nvvm_d2ll_rz">,
1185
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1186
  def int_nvvm_d2ll_rm : ClangBuiltin<"__nvvm_d2ll_rm">,
1187
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1188
  def int_nvvm_d2ll_rp : ClangBuiltin<"__nvvm_d2ll_rp">,
1189
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1190
 
1191
  def int_nvvm_d2ull_rn : ClangBuiltin<"__nvvm_d2ull_rn">,
1192
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1193
  def int_nvvm_d2ull_rz : ClangBuiltin<"__nvvm_d2ull_rz">,
1194
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1195
  def int_nvvm_d2ull_rm : ClangBuiltin<"__nvvm_d2ull_rm">,
1196
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1197
  def int_nvvm_d2ull_rp : ClangBuiltin<"__nvvm_d2ull_rp">,
1198
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1199
 
1200
  def int_nvvm_ll2f_rn : ClangBuiltin<"__nvvm_ll2f_rn">,
1201
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1202
  def int_nvvm_ll2f_rz : ClangBuiltin<"__nvvm_ll2f_rz">,
1203
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1204
  def int_nvvm_ll2f_rm : ClangBuiltin<"__nvvm_ll2f_rm">,
1205
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1206
  def int_nvvm_ll2f_rp : ClangBuiltin<"__nvvm_ll2f_rp">,
1207
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1208
  def int_nvvm_ull2f_rn : ClangBuiltin<"__nvvm_ull2f_rn">,
1209
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1210
  def int_nvvm_ull2f_rz : ClangBuiltin<"__nvvm_ull2f_rz">,
1211
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1212
  def int_nvvm_ull2f_rm : ClangBuiltin<"__nvvm_ull2f_rm">,
1213
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1214
  def int_nvvm_ull2f_rp : ClangBuiltin<"__nvvm_ull2f_rp">,
1215
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1216
 
1217
  def int_nvvm_ll2d_rn : ClangBuiltin<"__nvvm_ll2d_rn">,
1218
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1219
  def int_nvvm_ll2d_rz : ClangBuiltin<"__nvvm_ll2d_rz">,
1220
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1221
  def int_nvvm_ll2d_rm : ClangBuiltin<"__nvvm_ll2d_rm">,
1222
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1223
  def int_nvvm_ll2d_rp : ClangBuiltin<"__nvvm_ll2d_rp">,
1224
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1225
  def int_nvvm_ull2d_rn : ClangBuiltin<"__nvvm_ull2d_rn">,
1226
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1227
  def int_nvvm_ull2d_rz : ClangBuiltin<"__nvvm_ull2d_rz">,
1228
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1229
  def int_nvvm_ull2d_rm : ClangBuiltin<"__nvvm_ull2d_rm">,
1230
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1231
  def int_nvvm_ull2d_rp : ClangBuiltin<"__nvvm_ull2d_rp">,
1232
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1233
 
1234
  def int_nvvm_f2h_rn_ftz : ClangBuiltin<"__nvvm_f2h_rn_ftz">,
1235
      DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1236
  def int_nvvm_f2h_rn : ClangBuiltin<"__nvvm_f2h_rn">,
1237
      DefaultAttrsIntrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1238
 
1239
  def int_nvvm_ff2bf16x2_rn : ClangBuiltin<"__nvvm_ff2bf16x2_rn">,
1240
       Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1241
  def int_nvvm_ff2bf16x2_rn_relu : ClangBuiltin<"__nvvm_ff2bf16x2_rn_relu">,
1242
      Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1243
  def int_nvvm_ff2bf16x2_rz : ClangBuiltin<"__nvvm_ff2bf16x2_rz">,
1244
      Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1245
  def int_nvvm_ff2bf16x2_rz_relu : ClangBuiltin<"__nvvm_ff2bf16x2_rz_relu">,
1246
      Intrinsic<[llvm_i32_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem]>;
1247
 
1248
  def int_nvvm_ff2f16x2_rn : ClangBuiltin<"__nvvm_ff2f16x2_rn">,
1249
      Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1250
  def int_nvvm_ff2f16x2_rn_relu : ClangBuiltin<"__nvvm_ff2f16x2_rn_relu">,
1251
      Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1252
  def int_nvvm_ff2f16x2_rz : ClangBuiltin<"__nvvm_ff2f16x2_rz">,
1253
      Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1254
  def int_nvvm_ff2f16x2_rz_relu : ClangBuiltin<"__nvvm_ff2f16x2_rz_relu">,
1255
      Intrinsic<[llvm_v2f16_ty], [llvm_float_ty, llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1256
 
1257
  def int_nvvm_f2bf16_rn : ClangBuiltin<"__nvvm_f2bf16_rn">,
1258
      Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1259
  def int_nvvm_f2bf16_rn_relu : ClangBuiltin<"__nvvm_f2bf16_rn_relu">,
1260
      Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1261
  def int_nvvm_f2bf16_rz : ClangBuiltin<"__nvvm_f2bf16_rz">,
1262
      Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1263
  def int_nvvm_f2bf16_rz_relu : ClangBuiltin<"__nvvm_f2bf16_rz_relu">,
1264
       Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1265
 
1266
  def int_nvvm_f2tf32_rna : ClangBuiltin<"__nvvm_f2tf32_rna">,
1267
      Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrNoCallback]>;
1268
 
1269
//
1270
// Bitcast
1271
//
1272
 
1273
  def int_nvvm_bitcast_f2i : ClangBuiltin<"__nvvm_bitcast_f2i">,
1274
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem, IntrSpeculatable]>;
1275
  def int_nvvm_bitcast_i2f : ClangBuiltin<"__nvvm_bitcast_i2f">,
1276
      DefaultAttrsIntrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem, IntrSpeculatable]>;
1277
 
1278
  def int_nvvm_bitcast_ll2d : ClangBuiltin<"__nvvm_bitcast_ll2d">,
1279
      DefaultAttrsIntrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem, IntrSpeculatable]>;
1280
  def int_nvvm_bitcast_d2ll : ClangBuiltin<"__nvvm_bitcast_d2ll">,
1281
      DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem, IntrSpeculatable]>;
1282
 
1283
// FNS
1284
 
1285
  def int_nvvm_fns : ClangBuiltin<"__nvvm_fns">,
1286
      DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1287
                [IntrNoMem]>;
1288
 
1289
// Atomics not available as llvm intrinsics.
1290
  def int_nvvm_atomic_load_inc_32 : Intrinsic<[llvm_i32_ty],
1291
          [LLVMAnyPointerType<llvm_i32_ty>, llvm_i32_ty],
1292
                                      [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
1293
  def int_nvvm_atomic_load_dec_32 : Intrinsic<[llvm_i32_ty],
1294
          [LLVMAnyPointerType<llvm_i32_ty>, llvm_i32_ty],
1295
                                      [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
1296
 
1297
  class SCOPED_ATOMIC2_impl<LLVMType elty>
1298
        : Intrinsic<[elty],
1299
          [LLVMAnyPointerType<LLVMMatchType<0>>, LLVMMatchType<0>],
1300
          [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
1301
  class SCOPED_ATOMIC3_impl<LLVMType elty>
1302
        : Intrinsic<[elty],
1303
          [LLVMAnyPointerType<LLVMMatchType<0>>, LLVMMatchType<0>,
1304
           LLVMMatchType<0>],
1305
          [IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>]>;
1306
 
1307
  multiclass PTXAtomicWithScope2<LLVMType elty> {
1308
    def _cta : SCOPED_ATOMIC2_impl<elty>;
1309
    def _sys : SCOPED_ATOMIC2_impl<elty>;
1310
  }
1311
  multiclass PTXAtomicWithScope3<LLVMType elty> {
1312
    def _cta : SCOPED_ATOMIC3_impl<elty>;
1313
    def _sys : SCOPED_ATOMIC3_impl<elty>;
1314
  }
1315
  multiclass PTXAtomicWithScope2_fi {
1316
    defm _f: PTXAtomicWithScope2<llvm_anyfloat_ty>;
1317
    defm _i: PTXAtomicWithScope2<llvm_anyint_ty>;
1318
  }
1319
  defm int_nvvm_atomic_add_gen   : PTXAtomicWithScope2_fi;
1320
  defm int_nvvm_atomic_inc_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1321
  defm int_nvvm_atomic_dec_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1322
  defm int_nvvm_atomic_exch_gen_i: PTXAtomicWithScope2<llvm_anyint_ty>;
1323
  defm int_nvvm_atomic_xor_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1324
  defm int_nvvm_atomic_max_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1325
  defm int_nvvm_atomic_min_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1326
  defm int_nvvm_atomic_or_gen_i  : PTXAtomicWithScope2<llvm_anyint_ty>;
1327
  defm int_nvvm_atomic_and_gen_i : PTXAtomicWithScope2<llvm_anyint_ty>;
1328
  defm int_nvvm_atomic_cas_gen_i : PTXAtomicWithScope3<llvm_anyint_ty>;
1329
 
1330
// Bar.Sync
1331
 
1332
  // The builtin for "bar.sync 0" is called __syncthreads.  Unlike most of the
1333
  // intrinsics in this file, this one is a user-facing API.
1334
  def int_nvvm_barrier0 : ClangBuiltin<"__syncthreads">,
1335
      Intrinsic<[], [], [IntrConvergent, IntrNoCallback]>;
1336
  // Synchronize all threads in the CTA at barrier 'n'.
1337
  def int_nvvm_barrier_n : ClangBuiltin<"__nvvm_bar_n">,
1338
      Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
1339
  // Synchronize 'm', a multiple of warp size, (arg 2) threads in
1340
  // the CTA at barrier 'n' (arg 1).
1341
  def int_nvvm_barrier : ClangBuiltin<"__nvvm_bar">,
1342
      Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
1343
  def int_nvvm_barrier0_popc : ClangBuiltin<"__nvvm_bar0_popc">,
1344
      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
1345
  def int_nvvm_barrier0_and : ClangBuiltin<"__nvvm_bar0_and">,
1346
      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
1347
  def int_nvvm_barrier0_or : ClangBuiltin<"__nvvm_bar0_or">,
1348
      Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>;
1349
 
1350
  def int_nvvm_bar_sync :
1351
      Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
1352
      ClangBuiltin<"__nvvm_bar_sync">;
1353
  def int_nvvm_bar_warp_sync :
1354
      Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
1355
      ClangBuiltin<"__nvvm_bar_warp_sync">;
1356
 
1357
  // barrier.sync id[, cnt]
1358
  def int_nvvm_barrier_sync :
1359
      Intrinsic<[], [llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
1360
      ClangBuiltin<"__nvvm_barrier_sync">;
1361
  def int_nvvm_barrier_sync_cnt :
1362
      Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [IntrConvergent, IntrNoCallback]>,
1363
      ClangBuiltin<"__nvvm_barrier_sync_cnt">;
1364
 
1365
  // Membar
1366
  def int_nvvm_membar_cta : ClangBuiltin<"__nvvm_membar_cta">,
1367
      Intrinsic<[], [], [IntrNoCallback]>;
1368
  def int_nvvm_membar_gl : ClangBuiltin<"__nvvm_membar_gl">,
1369
      Intrinsic<[], [], [IntrNoCallback]>;
1370
  def int_nvvm_membar_sys : ClangBuiltin<"__nvvm_membar_sys">,
1371
      Intrinsic<[], [], [IntrNoCallback]>;
1372
 
1373
// Async Copy
1374
def int_nvvm_cp_async_mbarrier_arrive :
1375
    ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive">,
1376
    Intrinsic<[],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1377
def int_nvvm_cp_async_mbarrier_arrive_shared :
1378
    ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_shared">,
1379
    Intrinsic<[],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1380
def int_nvvm_cp_async_mbarrier_arrive_noinc :
1381
    ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_noinc">,
1382
    Intrinsic<[],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1383
def int_nvvm_cp_async_mbarrier_arrive_noinc_shared :
1384
    ClangBuiltin<"__nvvm_cp_async_mbarrier_arrive_noinc_shared">,
1385
    Intrinsic<[],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1386
 
1387
def int_nvvm_cp_async_ca_shared_global_4 :
1388
    ClangBuiltin<"__nvvm_cp_async_ca_shared_global_4">,
1389
    Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
1390
    [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
1391
     WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
1392
    "llvm.nvvm.cp.async.ca.shared.global.4">;
1393
def int_nvvm_cp_async_ca_shared_global_8 :
1394
    ClangBuiltin<"__nvvm_cp_async_ca_shared_global_8">,
1395
    Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
1396
    [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
1397
     WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
1398
    "llvm.nvvm.cp.async.ca.shared.global.8">;
1399
def int_nvvm_cp_async_ca_shared_global_16 :
1400
    ClangBuiltin<"__nvvm_cp_async_ca_shared_global_16">,
1401
    Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
1402
    [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
1403
     WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
1404
    "llvm.nvvm.cp.async.ca.shared.global.16">;
1405
def int_nvvm_cp_async_cg_shared_global_16 :
1406
    ClangBuiltin<"__nvvm_cp_async_cg_shared_global_16">,
1407
    Intrinsic<[],[llvm_shared_i8ptr_ty, llvm_global_i8ptr_ty],
1408
    [IntrArgMemOnly, IntrNoCallback, NoAlias<ArgIndex<0>>, NoAlias<ArgIndex<1>>,
1409
     WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>],
1410
    "llvm.nvvm.cp.async.cg.shared.global.16">;
1411
 
1412
def int_nvvm_cp_async_commit_group :
1413
    ClangBuiltin<"__nvvm_cp_async_commit_group">,
1414
    Intrinsic<[],[],[]>;
1415
 
1416
def int_nvvm_cp_async_wait_group :
1417
    ClangBuiltin<"__nvvm_cp_async_wait_group">,
1418
    Intrinsic<[],[llvm_i32_ty],[ImmArg<ArgIndex<0>>]>;
1419
 
1420
def int_nvvm_cp_async_wait_all :
1421
    ClangBuiltin<"__nvvm_cp_async_wait_all">,
1422
    Intrinsic<[],[],[]>;
1423
 
1424
// mbarrier
1425
def int_nvvm_mbarrier_init : ClangBuiltin<"__nvvm_mbarrier_init">,
1426
    Intrinsic<[],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1427
def int_nvvm_mbarrier_init_shared :
1428
    ClangBuiltin<"__nvvm_mbarrier_init_shared">,
1429
    Intrinsic<[],[llvm_shared_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1430
 
1431
def int_nvvm_mbarrier_inval : ClangBuiltin<"__nvvm_mbarrier_inval">,
1432
    Intrinsic<[],[llvm_i64ptr_ty],
1433
    [IntrConvergent, IntrWriteMem, IntrArgMemOnly, IntrNoCallback,
1434
    WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>]>;
1435
def int_nvvm_mbarrier_inval_shared :
1436
    ClangBuiltin<"__nvvm_mbarrier_inval_shared">,
1437
    Intrinsic<[],[llvm_shared_i64ptr_ty],
1438
    [IntrConvergent, IntrWriteMem, IntrArgMemOnly, IntrNoCallback,
1439
    WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>]>;
1440
 
1441
def int_nvvm_mbarrier_arrive : ClangBuiltin<"__nvvm_mbarrier_arrive">,
1442
    Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1443
def int_nvvm_mbarrier_arrive_shared :
1444
    ClangBuiltin<"__nvvm_mbarrier_arrive_shared">,
1445
    Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1446
def int_nvvm_mbarrier_arrive_noComplete :
1447
    ClangBuiltin<"__nvvm_mbarrier_arrive_noComplete">,
1448
    Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1449
def int_nvvm_mbarrier_arrive_noComplete_shared :
1450
    ClangBuiltin<"__nvvm_mbarrier_arrive_noComplete_shared">,
1451
    Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty,
1452
    llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1453
 
1454
def int_nvvm_mbarrier_arrive_drop :
1455
    ClangBuiltin<"__nvvm_mbarrier_arrive_drop">,
1456
    Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1457
def int_nvvm_mbarrier_arrive_drop_shared :
1458
    ClangBuiltin<"__nvvm_mbarrier_arrive_drop_shared">,
1459
    Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty],[IntrConvergent, IntrNoCallback]>;
1460
def int_nvvm_mbarrier_arrive_drop_noComplete :
1461
    ClangBuiltin<"__nvvm_mbarrier_arrive_drop_noComplete">,
1462
    Intrinsic<[llvm_i64_ty],[llvm_i64ptr_ty, llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1463
def int_nvvm_mbarrier_arrive_drop_noComplete_shared :
1464
    ClangBuiltin<"__nvvm_mbarrier_arrive_drop_noComplete_shared">,
1465
    Intrinsic<[llvm_i64_ty],[llvm_shared_i64ptr_ty,
1466
    llvm_i32_ty],[IntrConvergent, IntrNoCallback]>;
1467
 
1468
def int_nvvm_mbarrier_test_wait :
1469
    ClangBuiltin<"__nvvm_mbarrier_test_wait">,
1470
    Intrinsic<[llvm_i1_ty],[llvm_i64ptr_ty, llvm_i64_ty],[IntrConvergent, IntrNoCallback]>;
1471
def int_nvvm_mbarrier_test_wait_shared :
1472
    ClangBuiltin<"__nvvm_mbarrier_test_wait_shared">,
1473
    Intrinsic<[llvm_i1_ty],[llvm_shared_i64ptr_ty, llvm_i64_ty],[IntrConvergent, IntrNoCallback]>;
1474
 
1475
def int_nvvm_mbarrier_pending_count :
1476
    ClangBuiltin<"__nvvm_mbarrier_pending_count">,
1477
    Intrinsic<[llvm_i32_ty],[llvm_i64_ty],[IntrNoMem, IntrConvergent, IntrNoCallback]>;
1478
 
1479
// Generated within nvvm. Use for ldu on sm_20 or later.  Second arg is the
1480
// pointer's alignment.
1481
def int_nvvm_ldu_global_i : Intrinsic<[llvm_anyint_ty],
1482
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1483
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1484
  "llvm.nvvm.ldu.global.i">;
1485
def int_nvvm_ldu_global_f : Intrinsic<[llvm_anyfloat_ty],
1486
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1487
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1488
  "llvm.nvvm.ldu.global.f">;
1489
def int_nvvm_ldu_global_p : Intrinsic<[llvm_anyptr_ty],
1490
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1491
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1492
  "llvm.nvvm.ldu.global.p">;
1493
 
1494
// Generated within nvvm. Use for ldg on sm_35 or later.  Second arg is the
1495
// pointer's alignment.
1496
def int_nvvm_ldg_global_i : Intrinsic<[llvm_anyint_ty],
1497
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1498
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1499
  "llvm.nvvm.ldg.global.i">;
1500
def int_nvvm_ldg_global_f : Intrinsic<[llvm_anyfloat_ty],
1501
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1502
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1503
  "llvm.nvvm.ldg.global.f">;
1504
def int_nvvm_ldg_global_p : Intrinsic<[llvm_anyptr_ty],
1505
  [LLVMAnyPointerType<LLVMMatchType<0>>, llvm_i32_ty],
1506
  [IntrReadMem, IntrArgMemOnly, IntrNoCallback, NoCapture<ArgIndex<0>>],
1507
  "llvm.nvvm.ldg.global.p">;
1508
 
1509
// Use for generic pointers
1510
// - These intrinsics are used to convert address spaces.
1511
// - The input pointer and output pointer must have the same type, except for
1512
//   the address-space. (This restriction is not enforced here as there is
1513
//   currently no way to describe it).
1514
// - This complements the llvm bitcast, which can be used to cast one type
1515
//   of pointer to another type of pointer, while the address space remains
1516
//   the same.
1517
def int_nvvm_ptr_local_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1518
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1519
                 "llvm.nvvm.ptr.local.to.gen">;
1520
def int_nvvm_ptr_shared_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1521
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1522
                 "llvm.nvvm.ptr.shared.to.gen">;
1523
def int_nvvm_ptr_global_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1524
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1525
                 "llvm.nvvm.ptr.global.to.gen">;
1526
def int_nvvm_ptr_constant_to_gen: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1527
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1528
                 "llvm.nvvm.ptr.constant.to.gen">;
1529
 
1530
def int_nvvm_ptr_gen_to_global: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1531
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1532
                 "llvm.nvvm.ptr.gen.to.global">;
1533
def int_nvvm_ptr_gen_to_shared: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1534
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1535
                 "llvm.nvvm.ptr.gen.to.shared">;
1536
def int_nvvm_ptr_gen_to_local: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1537
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1538
                 "llvm.nvvm.ptr.gen.to.local">;
1539
def int_nvvm_ptr_gen_to_constant: DefaultAttrsIntrinsic<[llvm_anyptr_ty],
1540
                 [llvm_anyptr_ty], [IntrNoMem, IntrSpeculatable],
1541
                 "llvm.nvvm.ptr.gen.to.constant">;
1542
 
1543
// Used in nvvm internally to help address space opt and ptx code generation
1544
// This is for params that are passed to kernel functions by pointer by-val.
1545
def int_nvvm_ptr_gen_to_param: Intrinsic<[llvm_anyptr_ty],
1546
                                     [llvm_anyptr_ty],
1547
                                   [IntrNoMem, IntrSpeculatable, IntrNoCallback],
1548
                                   "llvm.nvvm.ptr.gen.to.param">;
1549
 
1550
// Move intrinsics, used in nvvm internally
1551
 
1552
def int_nvvm_move_i16 : Intrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem],
1553
  "llvm.nvvm.move.i16">;
1554
def int_nvvm_move_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem],
1555
  "llvm.nvvm.move.i32">;
1556
def int_nvvm_move_i64 : Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem],
1557
  "llvm.nvvm.move.i64">;
1558
def int_nvvm_move_float : Intrinsic<[llvm_float_ty], [llvm_float_ty],
1559
  [IntrNoMem], "llvm.nvvm.move.float">;
1560
def int_nvvm_move_double : Intrinsic<[llvm_double_ty], [llvm_double_ty],
1561
  [IntrNoMem], "llvm.nvvm.move.double">;
1562
def int_nvvm_move_ptr : Intrinsic<[llvm_anyptr_ty], [llvm_anyptr_ty],
1563
  [IntrNoMem, NoCapture<ArgIndex<0>>], "llvm.nvvm.move.ptr">;
1564
 
1565
 
1566
// For getting the handle from a texture or surface variable
1567
def int_nvvm_texsurf_handle
1568
  : Intrinsic<[llvm_i64_ty], [llvm_metadata_ty, llvm_any_i64ptr_ty],
1569
              [IntrNoMem], "llvm.nvvm.texsurf.handle">;
1570
def int_nvvm_texsurf_handle_internal
1571
  : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty],
1572
              [IntrNoMem], "llvm.nvvm.texsurf.handle.internal">;
1573
 
1574
/// Error / Warn
1575
def int_nvvm_compiler_error :
1576
    Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.error">;
1577
def int_nvvm_compiler_warn :
1578
    Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.warn">;
1579
 
1580
def int_nvvm_reflect :
1581
  Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">;
1582
 
1583
// isspacep.{const, global, local, shared}
1584
def int_nvvm_isspacep_const
1585
  : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty], 
1586
              [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
1587
              "llvm.nvvm.isspacep.const">,
1588
    ClangBuiltin<"__nvvm_isspacep_const">;
1589
def int_nvvm_isspacep_global
1590
  : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty], 
1591
              [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
1592
              "llvm.nvvm.isspacep.global">,
1593
    ClangBuiltin<"__nvvm_isspacep_global">;
1594
def int_nvvm_isspacep_local
1595
  : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty], 
1596
              [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
1597
              "llvm.nvvm.isspacep.local">,
1598
    ClangBuiltin<"__nvvm_isspacep_local">;
1599
def int_nvvm_isspacep_shared
1600
  : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_ptr_ty], 
1601
              [IntrNoMem, IntrSpeculatable, NoCapture<ArgIndex<0>>],
1602
              "llvm.nvvm.isspacep.shared">,
1603
    ClangBuiltin<"__nvvm_isspacep_shared">;
1604
 
1605
// Environment register read
1606
def int_nvvm_read_ptx_sreg_envreg0
1607
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1608
              "llvm.nvvm.read.ptx.sreg.envreg0">,
1609
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg0">;
1610
def int_nvvm_read_ptx_sreg_envreg1
1611
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1612
              "llvm.nvvm.read.ptx.sreg.envreg1">,
1613
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg1">;
1614
def int_nvvm_read_ptx_sreg_envreg2
1615
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1616
              "llvm.nvvm.read.ptx.sreg.envreg2">,
1617
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg2">;
1618
def int_nvvm_read_ptx_sreg_envreg3
1619
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1620
              "llvm.nvvm.read.ptx.sreg.envreg3">,
1621
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg3">;
1622
def int_nvvm_read_ptx_sreg_envreg4
1623
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1624
              "llvm.nvvm.read.ptx.sreg.envreg4">,
1625
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg4">;
1626
def int_nvvm_read_ptx_sreg_envreg5
1627
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1628
              "llvm.nvvm.read.ptx.sreg.envreg5">,
1629
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg5">;
1630
def int_nvvm_read_ptx_sreg_envreg6
1631
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1632
              "llvm.nvvm.read.ptx.sreg.envreg6">,
1633
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg6">;
1634
def int_nvvm_read_ptx_sreg_envreg7
1635
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1636
              "llvm.nvvm.read.ptx.sreg.envreg7">,
1637
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg7">;
1638
def int_nvvm_read_ptx_sreg_envreg8
1639
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1640
              "llvm.nvvm.read.ptx.sreg.envreg8">,
1641
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg8">;
1642
def int_nvvm_read_ptx_sreg_envreg9
1643
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1644
              "llvm.nvvm.read.ptx.sreg.envreg9">,
1645
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg9">;
1646
def int_nvvm_read_ptx_sreg_envreg10
1647
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1648
              "llvm.nvvm.read.ptx.sreg.envreg10">,
1649
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg10">;
1650
def int_nvvm_read_ptx_sreg_envreg11
1651
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1652
              "llvm.nvvm.read.ptx.sreg.envreg11">,
1653
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg11">;
1654
def int_nvvm_read_ptx_sreg_envreg12
1655
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1656
              "llvm.nvvm.read.ptx.sreg.envreg12">,
1657
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg12">;
1658
def int_nvvm_read_ptx_sreg_envreg13
1659
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1660
              "llvm.nvvm.read.ptx.sreg.envreg13">,
1661
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg13">;
1662
def int_nvvm_read_ptx_sreg_envreg14
1663
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1664
              "llvm.nvvm.read.ptx.sreg.envreg14">,
1665
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg14">;
1666
def int_nvvm_read_ptx_sreg_envreg15
1667
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1668
              "llvm.nvvm.read.ptx.sreg.envreg15">,
1669
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg15">;
1670
def int_nvvm_read_ptx_sreg_envreg16
1671
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1672
              "llvm.nvvm.read.ptx.sreg.envreg16">,
1673
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg16">;
1674
def int_nvvm_read_ptx_sreg_envreg17
1675
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1676
              "llvm.nvvm.read.ptx.sreg.envreg17">,
1677
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg17">;
1678
def int_nvvm_read_ptx_sreg_envreg18
1679
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1680
              "llvm.nvvm.read.ptx.sreg.envreg18">,
1681
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg18">;
1682
def int_nvvm_read_ptx_sreg_envreg19
1683
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1684
              "llvm.nvvm.read.ptx.sreg.envreg19">,
1685
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg19">;
1686
def int_nvvm_read_ptx_sreg_envreg20
1687
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1688
              "llvm.nvvm.read.ptx.sreg.envreg20">,
1689
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg20">;
1690
def int_nvvm_read_ptx_sreg_envreg21
1691
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1692
              "llvm.nvvm.read.ptx.sreg.envreg21">,
1693
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg21">;
1694
def int_nvvm_read_ptx_sreg_envreg22
1695
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1696
              "llvm.nvvm.read.ptx.sreg.envreg22">,
1697
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg22">;
1698
def int_nvvm_read_ptx_sreg_envreg23
1699
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1700
              "llvm.nvvm.read.ptx.sreg.envreg23">,
1701
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg23">;
1702
def int_nvvm_read_ptx_sreg_envreg24
1703
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1704
              "llvm.nvvm.read.ptx.sreg.envreg24">,
1705
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg24">;
1706
def int_nvvm_read_ptx_sreg_envreg25
1707
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1708
              "llvm.nvvm.read.ptx.sreg.envreg25">,
1709
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg25">;
1710
def int_nvvm_read_ptx_sreg_envreg26
1711
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1712
              "llvm.nvvm.read.ptx.sreg.envreg26">,
1713
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg26">;
1714
def int_nvvm_read_ptx_sreg_envreg27
1715
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1716
              "llvm.nvvm.read.ptx.sreg.envreg27">,
1717
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg27">;
1718
def int_nvvm_read_ptx_sreg_envreg28
1719
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1720
              "llvm.nvvm.read.ptx.sreg.envreg28">,
1721
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg28">;
1722
def int_nvvm_read_ptx_sreg_envreg29
1723
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1724
              "llvm.nvvm.read.ptx.sreg.envreg29">,
1725
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg29">;
1726
def int_nvvm_read_ptx_sreg_envreg30
1727
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1728
              "llvm.nvvm.read.ptx.sreg.envreg30">,
1729
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg30">;
1730
def int_nvvm_read_ptx_sreg_envreg31
1731
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable],
1732
              "llvm.nvvm.read.ptx.sreg.envreg31">,
1733
    ClangBuiltin<"__nvvm_read_ptx_sreg_envreg31">;
1734
 
1735
 
1736
// Texture Fetch
1737
// texmode_independent
1738
def int_nvvm_tex_1d_v4f32_s32
1739
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1740
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
1741
              "llvm.nvvm.tex.1d.v4f32.s32">;
1742
def int_nvvm_tex_1d_v4f32_f32
1743
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1744
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
1745
              "llvm.nvvm.tex.1d.v4f32.f32">;
1746
def int_nvvm_tex_1d_level_v4f32_f32
1747
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1748
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1749
              "llvm.nvvm.tex.1d.level.v4f32.f32">;
1750
def int_nvvm_tex_1d_grad_v4f32_f32
1751
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1752
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1753
               llvm_float_ty], [],
1754
              "llvm.nvvm.tex.1d.grad.v4f32.f32">;
1755
def int_nvvm_tex_1d_v4s32_s32
1756
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1757
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
1758
              "llvm.nvvm.tex.1d.v4s32.s32">;
1759
def int_nvvm_tex_1d_v4s32_f32
1760
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1761
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
1762
              "llvm.nvvm.tex.1d.v4s32.f32">;
1763
def int_nvvm_tex_1d_level_v4s32_f32
1764
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1765
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1766
              "llvm.nvvm.tex.1d.level.v4s32.f32">;
1767
def int_nvvm_tex_1d_grad_v4s32_f32
1768
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1769
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1770
               llvm_float_ty], [],
1771
              "llvm.nvvm.tex.1d.grad.v4s32.f32">;
1772
def int_nvvm_tex_1d_v4u32_s32
1773
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1774
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [],
1775
              "llvm.nvvm.tex.1d.v4u32.s32">;
1776
def int_nvvm_tex_1d_v4u32_f32
1777
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1778
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [],
1779
              "llvm.nvvm.tex.1d.v4u32.f32">;
1780
def int_nvvm_tex_1d_level_v4u32_f32
1781
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1782
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1783
              "llvm.nvvm.tex.1d.level.v4u32.f32">;
1784
def int_nvvm_tex_1d_grad_v4u32_f32
1785
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1786
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1787
               llvm_float_ty], [],
1788
              "llvm.nvvm.tex.1d.grad.v4u32.f32">;
1789
 
1790
def int_nvvm_tex_1d_array_v4f32_s32
1791
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1792
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1793
              "llvm.nvvm.tex.1d.array.v4f32.s32">;
1794
def int_nvvm_tex_1d_array_v4f32_f32
1795
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1796
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
1797
              "llvm.nvvm.tex.1d.array.v4f32.f32">;
1798
def int_nvvm_tex_1d_array_level_v4f32_f32
1799
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1800
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1801
               llvm_float_ty], [],
1802
              "llvm.nvvm.tex.1d.array.level.v4f32.f32">;
1803
def int_nvvm_tex_1d_array_grad_v4f32_f32
1804
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1805
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1806
               llvm_float_ty, llvm_float_ty], [],
1807
              "llvm.nvvm.tex.1d.array.grad.v4f32.f32">;
1808
def int_nvvm_tex_1d_array_v4s32_s32
1809
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1810
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1811
              "llvm.nvvm.tex.1d.array.v4s32.s32">;
1812
def int_nvvm_tex_1d_array_v4s32_f32
1813
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1814
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
1815
              "llvm.nvvm.tex.1d.array.v4s32.f32">;
1816
def int_nvvm_tex_1d_array_level_v4s32_f32
1817
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1818
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1819
               llvm_float_ty], [],
1820
              "llvm.nvvm.tex.1d.array.level.v4s32.f32">;
1821
def int_nvvm_tex_1d_array_grad_v4s32_f32
1822
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1823
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1824
               llvm_float_ty, llvm_float_ty], [],
1825
              "llvm.nvvm.tex.1d.array.grad.v4s32.f32">;
1826
def int_nvvm_tex_1d_array_v4u32_s32
1827
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1828
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1829
              "llvm.nvvm.tex.1d.array.v4u32.s32">;
1830
def int_nvvm_tex_1d_array_v4u32_f32
1831
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1832
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
1833
              "llvm.nvvm.tex.1d.array.v4u32.f32">;
1834
def int_nvvm_tex_1d_array_level_v4u32_f32
1835
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1836
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1837
               llvm_float_ty], [],
1838
              "llvm.nvvm.tex.1d.array.level.v4u32.f32">;
1839
def int_nvvm_tex_1d_array_grad_v4u32_f32
1840
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1841
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1842
               llvm_float_ty, llvm_float_ty], [],
1843
              "llvm.nvvm.tex.1d.array.grad.v4u32.f32">;
1844
 
1845
def int_nvvm_tex_2d_v4f32_s32
1846
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1847
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1848
              "llvm.nvvm.tex.2d.v4f32.s32">;
1849
def int_nvvm_tex_2d_v4f32_f32
1850
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1851
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1852
              "llvm.nvvm.tex.2d.v4f32.f32">;
1853
def int_nvvm_tex_2d_level_v4f32_f32
1854
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1855
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1856
               llvm_float_ty], [],
1857
              "llvm.nvvm.tex.2d.level.v4f32.f32">;
1858
def int_nvvm_tex_2d_grad_v4f32_f32
1859
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1860
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1861
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
1862
              "llvm.nvvm.tex.2d.grad.v4f32.f32">;
1863
def int_nvvm_tex_2d_v4s32_s32
1864
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1865
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1866
              "llvm.nvvm.tex.2d.v4s32.s32">;
1867
def int_nvvm_tex_2d_v4s32_f32
1868
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1869
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1870
              "llvm.nvvm.tex.2d.v4s32.f32">;
1871
def int_nvvm_tex_2d_level_v4s32_f32
1872
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1873
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1874
               llvm_float_ty], [],
1875
              "llvm.nvvm.tex.2d.level.v4s32.f32">;
1876
def int_nvvm_tex_2d_grad_v4s32_f32
1877
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1878
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1879
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
1880
              "llvm.nvvm.tex.2d.grad.v4s32.f32">;
1881
def int_nvvm_tex_2d_v4u32_s32
1882
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1883
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
1884
              "llvm.nvvm.tex.2d.v4u32.s32">;
1885
def int_nvvm_tex_2d_v4u32_f32
1886
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1887
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
1888
              "llvm.nvvm.tex.2d.v4u32.f32">;
1889
def int_nvvm_tex_2d_level_v4u32_f32
1890
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1891
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1892
               llvm_float_ty], [],
1893
              "llvm.nvvm.tex.2d.level.v4u32.f32">;
1894
def int_nvvm_tex_2d_grad_v4u32_f32
1895
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1896
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1897
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
1898
              "llvm.nvvm.tex.2d.grad.v4u32.f32">;
1899
 
1900
def int_nvvm_tex_2d_array_v4f32_s32
1901
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1902
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
1903
               llvm_i32_ty], [],
1904
              "llvm.nvvm.tex.2d.array.v4f32.s32">;
1905
def int_nvvm_tex_2d_array_v4f32_f32
1906
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1907
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1908
               llvm_float_ty], [],
1909
              "llvm.nvvm.tex.2d.array.v4f32.f32">;
1910
def int_nvvm_tex_2d_array_level_v4f32_f32
1911
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1912
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1913
               llvm_float_ty, llvm_float_ty], [],
1914
              "llvm.nvvm.tex.2d.array.level.v4f32.f32">;
1915
def int_nvvm_tex_2d_array_grad_v4f32_f32
1916
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1917
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1918
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
1919
               llvm_float_ty], [],
1920
              "llvm.nvvm.tex.2d.array.grad.v4f32.f32">;
1921
def int_nvvm_tex_2d_array_v4s32_s32
1922
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1923
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
1924
               llvm_i32_ty], [],
1925
              "llvm.nvvm.tex.2d.array.v4s32.s32">;
1926
def int_nvvm_tex_2d_array_v4s32_f32
1927
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1928
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1929
               llvm_float_ty], [],
1930
              "llvm.nvvm.tex.2d.array.v4s32.f32">;
1931
def int_nvvm_tex_2d_array_level_v4s32_f32
1932
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1933
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1934
               llvm_float_ty, llvm_float_ty], [],
1935
              "llvm.nvvm.tex.2d.array.level.v4s32.f32">;
1936
def int_nvvm_tex_2d_array_grad_v4s32_f32
1937
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1938
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1939
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
1940
               llvm_float_ty], [],
1941
              "llvm.nvvm.tex.2d.array.grad.v4s32.f32">;
1942
def int_nvvm_tex_2d_array_v4u32_s32
1943
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1944
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
1945
               llvm_i32_ty], [],
1946
              "llvm.nvvm.tex.2d.array.v4u32.s32">;
1947
def int_nvvm_tex_2d_array_v4u32_f32
1948
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1949
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1950
               llvm_float_ty], [],
1951
              "llvm.nvvm.tex.2d.array.v4u32.f32">;
1952
def int_nvvm_tex_2d_array_level_v4u32_f32
1953
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1954
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1955
               llvm_float_ty, llvm_float_ty], [],
1956
              "llvm.nvvm.tex.2d.array.level.v4u32.f32">;
1957
def int_nvvm_tex_2d_array_grad_v4u32_f32
1958
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1959
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
1960
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
1961
               llvm_float_ty], [],
1962
              "llvm.nvvm.tex.2d.array.grad.v4u32.f32">;
1963
 
1964
def int_nvvm_tex_3d_v4f32_s32
1965
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1966
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1967
              [], "llvm.nvvm.tex.3d.v4f32.s32">;
1968
def int_nvvm_tex_3d_v4f32_f32
1969
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1970
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1971
               llvm_float_ty], [],
1972
              "llvm.nvvm.tex.3d.v4f32.f32">;
1973
def int_nvvm_tex_3d_level_v4f32_f32
1974
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1975
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1976
               llvm_float_ty, llvm_float_ty], [],
1977
              "llvm.nvvm.tex.3d.level.v4f32.f32">;
1978
def int_nvvm_tex_3d_grad_v4f32_f32
1979
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
1980
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1981
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
1982
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
1983
              "llvm.nvvm.tex.3d.grad.v4f32.f32">;
1984
def int_nvvm_tex_3d_v4s32_s32
1985
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1986
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1987
              [], "llvm.nvvm.tex.3d.v4s32.s32">;
1988
def int_nvvm_tex_3d_v4s32_f32
1989
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1990
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1991
               llvm_float_ty], [],
1992
              "llvm.nvvm.tex.3d.v4s32.f32">;
1993
def int_nvvm_tex_3d_level_v4s32_f32
1994
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
1995
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
1996
               llvm_float_ty, llvm_float_ty], [],
1997
              "llvm.nvvm.tex.3d.level.v4s32.f32">;
1998
def int_nvvm_tex_3d_grad_v4s32_f32
1999
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2000
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2001
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2002
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2003
              "llvm.nvvm.tex.3d.grad.v4s32.f32">;
2004
def int_nvvm_tex_3d_v4u32_s32
2005
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2006
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2007
              [], "llvm.nvvm.tex.3d.v4u32.s32">;
2008
def int_nvvm_tex_3d_v4u32_f32
2009
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2010
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2011
               llvm_float_ty], [],
2012
              "llvm.nvvm.tex.3d.v4u32.f32">;
2013
def int_nvvm_tex_3d_level_v4u32_f32
2014
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2015
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2016
               llvm_float_ty, llvm_float_ty], [],
2017
              "llvm.nvvm.tex.3d.level.v4u32.f32">;
2018
def int_nvvm_tex_3d_grad_v4u32_f32
2019
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2020
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2021
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2022
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2023
              "llvm.nvvm.tex.3d.grad.v4u32.f32">;
2024
 
2025
def int_nvvm_tex_cube_v4f32_f32
2026
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2027
              [llvm_i64_ty, llvm_i64_ty,
2028
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2029
              "llvm.nvvm.tex.cube.v4f32.f32">;
2030
def int_nvvm_tex_cube_level_v4f32_f32
2031
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2032
              [llvm_i64_ty, llvm_i64_ty,
2033
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2034
              "llvm.nvvm.tex.cube.level.v4f32.f32">;
2035
def int_nvvm_tex_cube_v4s32_f32
2036
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2037
              [llvm_i64_ty, llvm_i64_ty,
2038
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2039
              "llvm.nvvm.tex.cube.v4s32.f32">;
2040
def int_nvvm_tex_cube_level_v4s32_f32
2041
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2042
              [llvm_i64_ty, llvm_i64_ty,
2043
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2044
              "llvm.nvvm.tex.cube.level.v4s32.f32">;
2045
def int_nvvm_tex_cube_v4u32_f32
2046
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2047
              [llvm_i64_ty, llvm_i64_ty,
2048
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2049
              "llvm.nvvm.tex.cube.v4u32.f32">;
2050
def int_nvvm_tex_cube_level_v4u32_f32
2051
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2052
              [llvm_i64_ty, llvm_i64_ty,
2053
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2054
              "llvm.nvvm.tex.cube.level.v4u32.f32">;
2055
 
2056
def int_nvvm_tex_cube_array_v4f32_f32
2057
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2058
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2059
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2060
              "llvm.nvvm.tex.cube.array.v4f32.f32">;
2061
def int_nvvm_tex_cube_array_level_v4f32_f32
2062
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2063
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2064
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2065
              "llvm.nvvm.tex.cube.array.level.v4f32.f32">;
2066
def int_nvvm_tex_cube_array_v4s32_f32
2067
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2068
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2069
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2070
              "llvm.nvvm.tex.cube.array.v4s32.f32">;
2071
def int_nvvm_tex_cube_array_level_v4s32_f32
2072
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2073
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2074
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2075
              "llvm.nvvm.tex.cube.array.level.v4s32.f32">;
2076
def int_nvvm_tex_cube_array_v4u32_f32
2077
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2078
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2079
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2080
              "llvm.nvvm.tex.cube.array.v4u32.f32">;
2081
def int_nvvm_tex_cube_array_level_v4u32_f32
2082
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2083
              [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty,
2084
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2085
              "llvm.nvvm.tex.cube.array.level.v4u32.f32">;
2086
 
2087
def int_nvvm_tld4_r_2d_v4f32_f32
2088
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2089
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2090
              "llvm.nvvm.tld4.r.2d.v4f32.f32">;
2091
def int_nvvm_tld4_g_2d_v4f32_f32
2092
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2093
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2094
              "llvm.nvvm.tld4.g.2d.v4f32.f32">;
2095
def int_nvvm_tld4_b_2d_v4f32_f32
2096
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2097
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2098
              "llvm.nvvm.tld4.b.2d.v4f32.f32">;
2099
def int_nvvm_tld4_a_2d_v4f32_f32
2100
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2101
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2102
              "llvm.nvvm.tld4.a.2d.v4f32.f32">;
2103
def int_nvvm_tld4_r_2d_v4s32_f32
2104
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2105
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2106
              "llvm.nvvm.tld4.r.2d.v4s32.f32">;
2107
def int_nvvm_tld4_g_2d_v4s32_f32
2108
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2109
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2110
              "llvm.nvvm.tld4.g.2d.v4s32.f32">;
2111
def int_nvvm_tld4_b_2d_v4s32_f32
2112
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2113
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2114
              "llvm.nvvm.tld4.b.2d.v4s32.f32">;
2115
def int_nvvm_tld4_a_2d_v4s32_f32
2116
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2117
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2118
              "llvm.nvvm.tld4.a.2d.v4s32.f32">;
2119
def int_nvvm_tld4_r_2d_v4u32_f32
2120
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2121
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2122
              "llvm.nvvm.tld4.r.2d.v4u32.f32">;
2123
def int_nvvm_tld4_g_2d_v4u32_f32
2124
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2125
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2126
              "llvm.nvvm.tld4.g.2d.v4u32.f32">;
2127
def int_nvvm_tld4_b_2d_v4u32_f32
2128
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2129
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2130
              "llvm.nvvm.tld4.b.2d.v4u32.f32">;
2131
def int_nvvm_tld4_a_2d_v4u32_f32
2132
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2133
              [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2134
              "llvm.nvvm.tld4.a.2d.v4u32.f32">;
2135
 
2136
 
2137
// texmode_unified
2138
def int_nvvm_tex_unified_1d_v4f32_s32
2139
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2140
              [llvm_i64_ty, llvm_i32_ty], [],
2141
              "llvm.nvvm.tex.unified.1d.v4f32.s32">;
2142
def int_nvvm_tex_unified_1d_v4f32_f32
2143
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2144
              [llvm_i64_ty, llvm_float_ty], [],
2145
              "llvm.nvvm.tex.unified.1d.v4f32.f32">;
2146
def int_nvvm_tex_unified_1d_level_v4f32_f32
2147
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2148
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2149
              "llvm.nvvm.tex.unified.1d.level.v4f32.f32">;
2150
def int_nvvm_tex_unified_1d_grad_v4f32_f32
2151
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2152
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2153
               llvm_float_ty], [],
2154
              "llvm.nvvm.tex.unified.1d.grad.v4f32.f32">;
2155
def int_nvvm_tex_unified_1d_v4s32_s32
2156
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2157
              [llvm_i64_ty, llvm_i32_ty], [],
2158
              "llvm.nvvm.tex.unified.1d.v4s32.s32">;
2159
def int_nvvm_tex_unified_1d_v4s32_f32
2160
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2161
              [llvm_i64_ty, llvm_float_ty], [],
2162
              "llvm.nvvm.tex.unified.1d.v4s32.f32">;
2163
def int_nvvm_tex_unified_1d_level_v4s32_f32
2164
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2165
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2166
              "llvm.nvvm.tex.unified.1d.level.v4s32.f32">;
2167
def int_nvvm_tex_unified_1d_grad_v4s32_f32
2168
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2169
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2170
               llvm_float_ty], [],
2171
              "llvm.nvvm.tex.unified.1d.grad.v4s32.f32">;
2172
def int_nvvm_tex_unified_1d_v4u32_s32
2173
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2174
              [llvm_i64_ty, llvm_i32_ty], [],
2175
              "llvm.nvvm.tex.unified.1d.v4u32.s32">;
2176
def int_nvvm_tex_unified_1d_v4u32_f32
2177
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2178
              [llvm_i64_ty, llvm_float_ty], [],
2179
              "llvm.nvvm.tex.unified.1d.v4u32.f32">;
2180
def int_nvvm_tex_unified_1d_level_v4u32_f32
2181
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2182
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2183
              "llvm.nvvm.tex.unified.1d.level.v4u32.f32">;
2184
def int_nvvm_tex_unified_1d_grad_v4u32_f32
2185
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2186
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2187
               llvm_float_ty], [],
2188
              "llvm.nvvm.tex.unified.1d.grad.v4u32.f32">;
2189
 
2190
def int_nvvm_tex_unified_1d_array_v4f32_s32
2191
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2192
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2193
              "llvm.nvvm.tex.unified.1d.array.v4f32.s32">;
2194
def int_nvvm_tex_unified_1d_array_v4f32_f32
2195
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2196
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
2197
              "llvm.nvvm.tex.unified.1d.array.v4f32.f32">;
2198
def int_nvvm_tex_unified_1d_array_level_v4f32_f32
2199
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2200
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2201
               llvm_float_ty], [],
2202
              "llvm.nvvm.tex.unified.1d.array.level.v4f32.f32">;
2203
def int_nvvm_tex_unified_1d_array_grad_v4f32_f32
2204
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2205
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2206
               llvm_float_ty, llvm_float_ty], [],
2207
              "llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32">;
2208
def int_nvvm_tex_unified_1d_array_v4s32_s32
2209
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2210
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2211
              "llvm.nvvm.tex.unified.1d.array.v4s32.s32">;
2212
def int_nvvm_tex_unified_1d_array_v4s32_f32
2213
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2214
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
2215
              "llvm.nvvm.tex.unified.1d.array.v4s32.f32">;
2216
def int_nvvm_tex_unified_1d_array_level_v4s32_f32
2217
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2218
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2219
               llvm_float_ty], [],
2220
              "llvm.nvvm.tex.unified.1d.array.level.v4s32.f32">;
2221
def int_nvvm_tex_unified_1d_array_grad_v4s32_f32
2222
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2223
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2224
               llvm_float_ty, llvm_float_ty], [],
2225
              "llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32">;
2226
def int_nvvm_tex_unified_1d_array_v4u32_s32
2227
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2228
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2229
              "llvm.nvvm.tex.unified.1d.array.v4u32.s32">;
2230
def int_nvvm_tex_unified_1d_array_v4u32_f32
2231
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2232
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [],
2233
              "llvm.nvvm.tex.unified.1d.array.v4u32.f32">;
2234
def int_nvvm_tex_unified_1d_array_level_v4u32_f32
2235
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2236
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2237
               llvm_float_ty], [],
2238
              "llvm.nvvm.tex.unified.1d.array.level.v4u32.f32">;
2239
def int_nvvm_tex_unified_1d_array_grad_v4u32_f32
2240
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2241
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2242
               llvm_float_ty, llvm_float_ty], [],
2243
              "llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32">;
2244
 
2245
def int_nvvm_tex_unified_2d_v4f32_s32
2246
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2247
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2248
              "llvm.nvvm.tex.unified.2d.v4f32.s32">;
2249
def int_nvvm_tex_unified_2d_v4f32_f32
2250
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2251
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2252
              "llvm.nvvm.tex.unified.2d.v4f32.f32">;
2253
def int_nvvm_tex_unified_2d_level_v4f32_f32
2254
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2255
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2256
               llvm_float_ty], [],
2257
              "llvm.nvvm.tex.unified.2d.level.v4f32.f32">;
2258
def int_nvvm_tex_unified_2d_grad_v4f32_f32
2259
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2260
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2261
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2262
              "llvm.nvvm.tex.unified.2d.grad.v4f32.f32">;
2263
def int_nvvm_tex_unified_2d_v4s32_s32
2264
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2265
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2266
              "llvm.nvvm.tex.unified.2d.v4s32.s32">;
2267
def int_nvvm_tex_unified_2d_v4s32_f32
2268
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2269
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2270
              "llvm.nvvm.tex.unified.2d.v4s32.f32">;
2271
def int_nvvm_tex_unified_2d_level_v4s32_f32
2272
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2273
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2274
               llvm_float_ty], [],
2275
              "llvm.nvvm.tex.unified.2d.level.v4s32.f32">;
2276
def int_nvvm_tex_unified_2d_grad_v4s32_f32
2277
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2278
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2279
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2280
              "llvm.nvvm.tex.unified.2d.grad.v4s32.f32">;
2281
def int_nvvm_tex_unified_2d_v4u32_s32
2282
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2283
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2284
              "llvm.nvvm.tex.unified.2d.v4u32.s32">;
2285
def int_nvvm_tex_unified_2d_v4u32_f32
2286
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2287
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2288
              "llvm.nvvm.tex.unified.2d.v4u32.f32">;
2289
def int_nvvm_tex_unified_2d_level_v4u32_f32
2290
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2291
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2292
               llvm_float_ty], [],
2293
              "llvm.nvvm.tex.unified.2d.level.v4u32.f32">;
2294
def int_nvvm_tex_unified_2d_grad_v4u32_f32
2295
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2296
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2297
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2298
              "llvm.nvvm.tex.unified.2d.grad.v4u32.f32">;
2299
 
2300
def int_nvvm_tex_unified_2d_array_v4f32_s32
2301
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2302
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
2303
               llvm_i32_ty], [],
2304
              "llvm.nvvm.tex.unified.2d.array.v4f32.s32">;
2305
def int_nvvm_tex_unified_2d_array_v4f32_f32
2306
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2307
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2308
               llvm_float_ty], [],
2309
              "llvm.nvvm.tex.unified.2d.array.v4f32.f32">;
2310
def int_nvvm_tex_unified_2d_array_level_v4f32_f32
2311
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2312
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2313
               llvm_float_ty, llvm_float_ty], [],
2314
              "llvm.nvvm.tex.unified.2d.array.level.v4f32.f32">;
2315
def int_nvvm_tex_unified_2d_array_grad_v4f32_f32
2316
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2317
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2318
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2319
               llvm_float_ty], [],
2320
              "llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32">;
2321
def int_nvvm_tex_unified_2d_array_v4s32_s32
2322
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2323
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
2324
               llvm_i32_ty], [],
2325
              "llvm.nvvm.tex.unified.2d.array.v4s32.s32">;
2326
def int_nvvm_tex_unified_2d_array_v4s32_f32
2327
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2328
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2329
               llvm_float_ty], [],
2330
              "llvm.nvvm.tex.unified.2d.array.v4s32.f32">;
2331
def int_nvvm_tex_unified_2d_array_level_v4s32_f32
2332
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2333
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2334
               llvm_float_ty, llvm_float_ty], [],
2335
              "llvm.nvvm.tex.unified.2d.array.level.v4s32.f32">;
2336
def int_nvvm_tex_unified_2d_array_grad_v4s32_f32
2337
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2338
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2339
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2340
               llvm_float_ty], [],
2341
              "llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32">;
2342
def int_nvvm_tex_unified_2d_array_v4u32_s32
2343
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2344
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
2345
               llvm_i32_ty], [],
2346
              "llvm.nvvm.tex.unified.2d.array.v4u32.s32">;
2347
def int_nvvm_tex_unified_2d_array_v4u32_f32
2348
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2349
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2350
               llvm_float_ty], [],
2351
              "llvm.nvvm.tex.unified.2d.array.v4u32.f32">;
2352
def int_nvvm_tex_unified_2d_array_level_v4u32_f32
2353
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2354
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2355
               llvm_float_ty, llvm_float_ty], [],
2356
              "llvm.nvvm.tex.unified.2d.array.level.v4u32.f32">;
2357
def int_nvvm_tex_unified_2d_array_grad_v4u32_f32
2358
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2359
              [llvm_i64_ty, llvm_i32_ty, llvm_float_ty,
2360
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2361
               llvm_float_ty], [],
2362
              "llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32">;
2363
 
2364
def int_nvvm_tex_unified_3d_v4f32_s32
2365
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2366
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2367
              [], "llvm.nvvm.tex.unified.3d.v4f32.s32">;
2368
def int_nvvm_tex_unified_3d_v4f32_f32
2369
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2370
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2371
               llvm_float_ty], [],
2372
              "llvm.nvvm.tex.unified.3d.v4f32.f32">;
2373
def int_nvvm_tex_unified_3d_level_v4f32_f32
2374
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2375
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2376
               llvm_float_ty, llvm_float_ty], [],
2377
              "llvm.nvvm.tex.unified.3d.level.v4f32.f32">;
2378
def int_nvvm_tex_unified_3d_grad_v4f32_f32
2379
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2380
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2381
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2382
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2383
              "llvm.nvvm.tex.unified.3d.grad.v4f32.f32">;
2384
def int_nvvm_tex_unified_3d_v4s32_s32
2385
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2386
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2387
              [], "llvm.nvvm.tex.unified.3d.v4s32.s32">;
2388
def int_nvvm_tex_unified_3d_v4s32_f32
2389
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2390
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2391
               llvm_float_ty], [],
2392
              "llvm.nvvm.tex.unified.3d.v4s32.f32">;
2393
def int_nvvm_tex_unified_3d_level_v4s32_f32
2394
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2395
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2396
               llvm_float_ty, llvm_float_ty], [],
2397
              "llvm.nvvm.tex.unified.3d.level.v4s32.f32">;
2398
def int_nvvm_tex_unified_3d_grad_v4s32_f32
2399
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2400
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2401
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2402
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2403
              "llvm.nvvm.tex.unified.3d.grad.v4s32.f32">;
2404
def int_nvvm_tex_unified_3d_v4u32_s32
2405
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2406
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2407
              [], "llvm.nvvm.tex.unified.3d.v4u32.s32">;
2408
def int_nvvm_tex_unified_3d_v4u32_f32
2409
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2410
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2411
               llvm_float_ty], [],
2412
              "llvm.nvvm.tex.unified.3d.v4u32.f32">;
2413
def int_nvvm_tex_unified_3d_level_v4u32_f32
2414
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2415
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2416
               llvm_float_ty, llvm_float_ty], [],
2417
              "llvm.nvvm.tex.unified.3d.level.v4u32.f32">;
2418
def int_nvvm_tex_unified_3d_grad_v4u32_f32
2419
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2420
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty,
2421
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty,
2422
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2423
              "llvm.nvvm.tex.unified.3d.grad.v4u32.f32">;
2424
 
2425
def int_nvvm_tex_unified_cube_v4f32_f32
2426
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2427
              [llvm_i64_ty,
2428
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2429
              "llvm.nvvm.tex.unified.cube.v4f32.f32">;
2430
def int_nvvm_tex_unified_cube_level_v4f32_f32
2431
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2432
              [llvm_i64_ty,
2433
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2434
              "llvm.nvvm.tex.unified.cube.level.v4f32.f32">;
2435
def int_nvvm_tex_unified_cube_v4s32_f32
2436
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2437
              [llvm_i64_ty,
2438
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2439
              "llvm.nvvm.tex.unified.cube.v4s32.f32">;
2440
def int_nvvm_tex_unified_cube_level_v4s32_f32
2441
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2442
              [llvm_i64_ty,
2443
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2444
              "llvm.nvvm.tex.unified.cube.level.v4s32.f32">;
2445
def int_nvvm_tex_unified_cube_v4u32_f32
2446
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2447
              [llvm_i64_ty,
2448
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2449
              "llvm.nvvm.tex.unified.cube.v4u32.f32">;
2450
def int_nvvm_tex_unified_cube_level_v4u32_f32
2451
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2452
              [llvm_i64_ty,
2453
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2454
              "llvm.nvvm.tex.unified.cube.level.v4u32.f32">;
2455
 
2456
def int_nvvm_tex_unified_cube_array_v4f32_f32
2457
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2458
              [llvm_i64_ty, llvm_i32_ty,
2459
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2460
              "llvm.nvvm.tex.unified.cube.array.v4f32.f32">;
2461
def int_nvvm_tex_unified_cube_array_level_v4f32_f32
2462
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2463
              [llvm_i64_ty, llvm_i32_ty,
2464
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2465
              "llvm.nvvm.tex.unified.cube.array.level.v4f32.f32">;
2466
def int_nvvm_tex_unified_cube_array_v4s32_f32
2467
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2468
              [llvm_i64_ty, llvm_i32_ty,
2469
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2470
              "llvm.nvvm.tex.unified.cube.array.v4s32.f32">;
2471
def int_nvvm_tex_unified_cube_array_level_v4s32_f32
2472
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2473
              [llvm_i64_ty, llvm_i32_ty,
2474
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2475
              "llvm.nvvm.tex.unified.cube.array.level.v4s32.f32">;
2476
def int_nvvm_tex_unified_cube_array_v4u32_f32
2477
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2478
              [llvm_i64_ty, llvm_i32_ty,
2479
               llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2480
              "llvm.nvvm.tex.unified.cube.array.v4u32.f32">;
2481
def int_nvvm_tex_unified_cube_array_level_v4u32_f32
2482
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2483
              [llvm_i64_ty, llvm_i32_ty,
2484
               llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [],
2485
              "llvm.nvvm.tex.unified.cube.array.level.v4u32.f32">;
2486
 
2487
def int_nvvm_tld4_unified_r_2d_v4f32_f32
2488
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2489
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2490
              "llvm.nvvm.tld4.unified.r.2d.v4f32.f32">;
2491
def int_nvvm_tld4_unified_g_2d_v4f32_f32
2492
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2493
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2494
              "llvm.nvvm.tld4.unified.g.2d.v4f32.f32">;
2495
def int_nvvm_tld4_unified_b_2d_v4f32_f32
2496
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2497
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2498
              "llvm.nvvm.tld4.unified.b.2d.v4f32.f32">;
2499
def int_nvvm_tld4_unified_a_2d_v4f32_f32
2500
  : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty],
2501
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2502
              "llvm.nvvm.tld4.unified.a.2d.v4f32.f32">;
2503
def int_nvvm_tld4_unified_r_2d_v4s32_f32
2504
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2505
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2506
              "llvm.nvvm.tld4.unified.r.2d.v4s32.f32">;
2507
def int_nvvm_tld4_unified_g_2d_v4s32_f32
2508
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2509
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2510
              "llvm.nvvm.tld4.unified.g.2d.v4s32.f32">;
2511
def int_nvvm_tld4_unified_b_2d_v4s32_f32
2512
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2513
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2514
              "llvm.nvvm.tld4.unified.b.2d.v4s32.f32">;
2515
def int_nvvm_tld4_unified_a_2d_v4s32_f32
2516
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2517
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2518
              "llvm.nvvm.tld4.unified.a.2d.v4s32.f32">;
2519
def int_nvvm_tld4_unified_r_2d_v4u32_f32
2520
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2521
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2522
              "llvm.nvvm.tld4.unified.r.2d.v4u32.f32">;
2523
def int_nvvm_tld4_unified_g_2d_v4u32_f32
2524
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2525
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2526
              "llvm.nvvm.tld4.unified.g.2d.v4u32.f32">;
2527
def int_nvvm_tld4_unified_b_2d_v4u32_f32
2528
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2529
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2530
              "llvm.nvvm.tld4.unified.b.2d.v4u32.f32">;
2531
def int_nvvm_tld4_unified_a_2d_v4u32_f32
2532
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2533
              [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [],
2534
              "llvm.nvvm.tld4.unified.a.2d.v4u32.f32">;
2535
 
2536
 
2537
//=== Surface Load
2538
// .clamp variants
2539
def int_nvvm_suld_1d_i8_clamp
2540
  : Intrinsic<[llvm_i16_ty],
2541
              [llvm_i64_ty, llvm_i32_ty], [],
2542
              "llvm.nvvm.suld.1d.i8.clamp">;
2543
def int_nvvm_suld_1d_i16_clamp
2544
  : Intrinsic<[llvm_i16_ty],
2545
              [llvm_i64_ty, llvm_i32_ty], [],
2546
              "llvm.nvvm.suld.1d.i16.clamp">;
2547
def int_nvvm_suld_1d_i32_clamp
2548
  : Intrinsic<[llvm_i32_ty],
2549
              [llvm_i64_ty, llvm_i32_ty], [],
2550
              "llvm.nvvm.suld.1d.i32.clamp">;
2551
def int_nvvm_suld_1d_i64_clamp
2552
  : Intrinsic<[llvm_i64_ty],
2553
              [llvm_i64_ty, llvm_i32_ty], [],
2554
              "llvm.nvvm.suld.1d.i64.clamp">;
2555
def int_nvvm_suld_1d_v2i8_clamp
2556
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2557
              [llvm_i64_ty, llvm_i32_ty], [],
2558
              "llvm.nvvm.suld.1d.v2i8.clamp">;
2559
def int_nvvm_suld_1d_v2i16_clamp
2560
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2561
              [llvm_i64_ty, llvm_i32_ty], [],
2562
              "llvm.nvvm.suld.1d.v2i16.clamp">;
2563
def int_nvvm_suld_1d_v2i32_clamp
2564
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2565
              [llvm_i64_ty, llvm_i32_ty], [],
2566
              "llvm.nvvm.suld.1d.v2i32.clamp">;
2567
def int_nvvm_suld_1d_v2i64_clamp
2568
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2569
              [llvm_i64_ty, llvm_i32_ty], [],
2570
              "llvm.nvvm.suld.1d.v2i64.clamp">;
2571
def int_nvvm_suld_1d_v4i8_clamp
2572
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2573
              [llvm_i64_ty, llvm_i32_ty], [],
2574
              "llvm.nvvm.suld.1d.v4i8.clamp">;
2575
def int_nvvm_suld_1d_v4i16_clamp
2576
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2577
              [llvm_i64_ty, llvm_i32_ty], [],
2578
              "llvm.nvvm.suld.1d.v4i16.clamp">;
2579
def int_nvvm_suld_1d_v4i32_clamp
2580
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2581
              [llvm_i64_ty, llvm_i32_ty], [],
2582
              "llvm.nvvm.suld.1d.v4i32.clamp">;
2583
 
2584
def int_nvvm_suld_1d_array_i8_clamp
2585
  : Intrinsic<[llvm_i16_ty],
2586
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2587
              "llvm.nvvm.suld.1d.array.i8.clamp">;
2588
def int_nvvm_suld_1d_array_i16_clamp
2589
  : Intrinsic<[llvm_i16_ty],
2590
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2591
              "llvm.nvvm.suld.1d.array.i16.clamp">;
2592
def int_nvvm_suld_1d_array_i32_clamp
2593
  : Intrinsic<[llvm_i32_ty],
2594
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2595
              "llvm.nvvm.suld.1d.array.i32.clamp">;
2596
def int_nvvm_suld_1d_array_i64_clamp
2597
  : Intrinsic<[llvm_i64_ty],
2598
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2599
              "llvm.nvvm.suld.1d.array.i64.clamp">;
2600
def int_nvvm_suld_1d_array_v2i8_clamp
2601
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2602
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2603
              "llvm.nvvm.suld.1d.array.v2i8.clamp">;
2604
def int_nvvm_suld_1d_array_v2i16_clamp
2605
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2606
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2607
              "llvm.nvvm.suld.1d.array.v2i16.clamp">;
2608
def int_nvvm_suld_1d_array_v2i32_clamp
2609
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2610
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2611
              "llvm.nvvm.suld.1d.array.v2i32.clamp">;
2612
def int_nvvm_suld_1d_array_v2i64_clamp
2613
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2614
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2615
              "llvm.nvvm.suld.1d.array.v2i64.clamp">;
2616
def int_nvvm_suld_1d_array_v4i8_clamp
2617
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2618
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2619
              "llvm.nvvm.suld.1d.array.v4i8.clamp">;
2620
def int_nvvm_suld_1d_array_v4i16_clamp
2621
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2622
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2623
              "llvm.nvvm.suld.1d.array.v4i16.clamp">;
2624
def int_nvvm_suld_1d_array_v4i32_clamp
2625
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2626
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2627
              "llvm.nvvm.suld.1d.array.v4i32.clamp">;
2628
 
2629
def int_nvvm_suld_2d_i8_clamp
2630
  : Intrinsic<[llvm_i16_ty],
2631
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2632
              "llvm.nvvm.suld.2d.i8.clamp">;
2633
def int_nvvm_suld_2d_i16_clamp
2634
  : Intrinsic<[llvm_i16_ty],
2635
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2636
              "llvm.nvvm.suld.2d.i16.clamp">;
2637
def int_nvvm_suld_2d_i32_clamp
2638
  : Intrinsic<[llvm_i32_ty],
2639
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2640
              "llvm.nvvm.suld.2d.i32.clamp">;
2641
def int_nvvm_suld_2d_i64_clamp
2642
  : Intrinsic<[llvm_i64_ty],
2643
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2644
              "llvm.nvvm.suld.2d.i64.clamp">;
2645
def int_nvvm_suld_2d_v2i8_clamp
2646
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2647
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2648
              "llvm.nvvm.suld.2d.v2i8.clamp">;
2649
def int_nvvm_suld_2d_v2i16_clamp
2650
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2651
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2652
              "llvm.nvvm.suld.2d.v2i16.clamp">;
2653
def int_nvvm_suld_2d_v2i32_clamp
2654
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2655
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2656
              "llvm.nvvm.suld.2d.v2i32.clamp">;
2657
def int_nvvm_suld_2d_v2i64_clamp
2658
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2659
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2660
              "llvm.nvvm.suld.2d.v2i64.clamp">;
2661
def int_nvvm_suld_2d_v4i8_clamp
2662
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2663
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2664
              "llvm.nvvm.suld.2d.v4i8.clamp">;
2665
def int_nvvm_suld_2d_v4i16_clamp
2666
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2667
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2668
              "llvm.nvvm.suld.2d.v4i16.clamp">;
2669
def int_nvvm_suld_2d_v4i32_clamp
2670
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2671
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2672
              "llvm.nvvm.suld.2d.v4i32.clamp">;
2673
 
2674
def int_nvvm_suld_2d_array_i8_clamp
2675
  : Intrinsic<[llvm_i16_ty],
2676
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2677
              "llvm.nvvm.suld.2d.array.i8.clamp">;
2678
def int_nvvm_suld_2d_array_i16_clamp
2679
  : Intrinsic<[llvm_i16_ty],
2680
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2681
              "llvm.nvvm.suld.2d.array.i16.clamp">;
2682
def int_nvvm_suld_2d_array_i32_clamp
2683
  : Intrinsic<[llvm_i32_ty],
2684
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2685
              "llvm.nvvm.suld.2d.array.i32.clamp">;
2686
def int_nvvm_suld_2d_array_i64_clamp
2687
  : Intrinsic<[llvm_i64_ty],
2688
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2689
              "llvm.nvvm.suld.2d.array.i64.clamp">;
2690
def int_nvvm_suld_2d_array_v2i8_clamp
2691
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2692
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2693
              "llvm.nvvm.suld.2d.array.v2i8.clamp">;
2694
def int_nvvm_suld_2d_array_v2i16_clamp
2695
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2696
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2697
              "llvm.nvvm.suld.2d.array.v2i16.clamp">;
2698
def int_nvvm_suld_2d_array_v2i32_clamp
2699
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2700
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2701
              "llvm.nvvm.suld.2d.array.v2i32.clamp">;
2702
def int_nvvm_suld_2d_array_v2i64_clamp
2703
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2704
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2705
              "llvm.nvvm.suld.2d.array.v2i64.clamp">;
2706
def int_nvvm_suld_2d_array_v4i8_clamp
2707
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2708
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2709
              "llvm.nvvm.suld.2d.array.v4i8.clamp">;
2710
def int_nvvm_suld_2d_array_v4i16_clamp
2711
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2712
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2713
              "llvm.nvvm.suld.2d.array.v4i16.clamp">;
2714
def int_nvvm_suld_2d_array_v4i32_clamp
2715
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2716
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2717
              "llvm.nvvm.suld.2d.array.v4i32.clamp">;
2718
 
2719
def int_nvvm_suld_3d_i8_clamp
2720
  : Intrinsic<[llvm_i16_ty],
2721
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2722
              "llvm.nvvm.suld.3d.i8.clamp">;
2723
def int_nvvm_suld_3d_i16_clamp
2724
  : Intrinsic<[llvm_i16_ty],
2725
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2726
              "llvm.nvvm.suld.3d.i16.clamp">;
2727
def int_nvvm_suld_3d_i32_clamp
2728
  : Intrinsic<[llvm_i32_ty],
2729
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2730
              "llvm.nvvm.suld.3d.i32.clamp">;
2731
def int_nvvm_suld_3d_i64_clamp
2732
  : Intrinsic<[llvm_i64_ty],
2733
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2734
              "llvm.nvvm.suld.3d.i64.clamp">;
2735
def int_nvvm_suld_3d_v2i8_clamp
2736
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2737
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2738
              "llvm.nvvm.suld.3d.v2i8.clamp">;
2739
def int_nvvm_suld_3d_v2i16_clamp
2740
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2741
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2742
              "llvm.nvvm.suld.3d.v2i16.clamp">;
2743
def int_nvvm_suld_3d_v2i32_clamp
2744
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2745
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2746
              "llvm.nvvm.suld.3d.v2i32.clamp">;
2747
def int_nvvm_suld_3d_v2i64_clamp
2748
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2749
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2750
              "llvm.nvvm.suld.3d.v2i64.clamp">;
2751
def int_nvvm_suld_3d_v4i8_clamp
2752
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2753
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2754
              "llvm.nvvm.suld.3d.v4i8.clamp">;
2755
def int_nvvm_suld_3d_v4i16_clamp
2756
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2757
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2758
              "llvm.nvvm.suld.3d.v4i16.clamp">;
2759
def int_nvvm_suld_3d_v4i32_clamp
2760
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2761
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2762
              "llvm.nvvm.suld.3d.v4i32.clamp">;
2763
 
2764
// .trap variants
2765
def int_nvvm_suld_1d_i8_trap
2766
  : Intrinsic<[llvm_i16_ty],
2767
              [llvm_i64_ty, llvm_i32_ty], [],
2768
              "llvm.nvvm.suld.1d.i8.trap">;
2769
def int_nvvm_suld_1d_i16_trap
2770
  : Intrinsic<[llvm_i16_ty],
2771
              [llvm_i64_ty, llvm_i32_ty], [],
2772
              "llvm.nvvm.suld.1d.i16.trap">;
2773
def int_nvvm_suld_1d_i32_trap
2774
  : Intrinsic<[llvm_i32_ty],
2775
              [llvm_i64_ty, llvm_i32_ty], [],
2776
              "llvm.nvvm.suld.1d.i32.trap">;
2777
def int_nvvm_suld_1d_i64_trap
2778
  : Intrinsic<[llvm_i64_ty],
2779
              [llvm_i64_ty, llvm_i32_ty], [],
2780
              "llvm.nvvm.suld.1d.i64.trap">;
2781
def int_nvvm_suld_1d_v2i8_trap
2782
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2783
              [llvm_i64_ty, llvm_i32_ty], [],
2784
              "llvm.nvvm.suld.1d.v2i8.trap">;
2785
def int_nvvm_suld_1d_v2i16_trap
2786
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2787
              [llvm_i64_ty, llvm_i32_ty], [],
2788
              "llvm.nvvm.suld.1d.v2i16.trap">;
2789
def int_nvvm_suld_1d_v2i32_trap
2790
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2791
              [llvm_i64_ty, llvm_i32_ty], [],
2792
              "llvm.nvvm.suld.1d.v2i32.trap">;
2793
def int_nvvm_suld_1d_v2i64_trap
2794
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2795
              [llvm_i64_ty, llvm_i32_ty], [],
2796
              "llvm.nvvm.suld.1d.v2i64.trap">;
2797
def int_nvvm_suld_1d_v4i8_trap
2798
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2799
              [llvm_i64_ty, llvm_i32_ty], [],
2800
              "llvm.nvvm.suld.1d.v4i8.trap">;
2801
def int_nvvm_suld_1d_v4i16_trap
2802
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2803
              [llvm_i64_ty, llvm_i32_ty], [],
2804
              "llvm.nvvm.suld.1d.v4i16.trap">;
2805
def int_nvvm_suld_1d_v4i32_trap
2806
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2807
              [llvm_i64_ty, llvm_i32_ty], [],
2808
              "llvm.nvvm.suld.1d.v4i32.trap">;
2809
 
2810
def int_nvvm_suld_1d_array_i8_trap
2811
  : Intrinsic<[llvm_i16_ty],
2812
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2813
              "llvm.nvvm.suld.1d.array.i8.trap">;
2814
def int_nvvm_suld_1d_array_i16_trap
2815
  : Intrinsic<[llvm_i16_ty],
2816
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2817
              "llvm.nvvm.suld.1d.array.i16.trap">;
2818
def int_nvvm_suld_1d_array_i32_trap
2819
  : Intrinsic<[llvm_i32_ty],
2820
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2821
              "llvm.nvvm.suld.1d.array.i32.trap">;
2822
def int_nvvm_suld_1d_array_i64_trap
2823
  : Intrinsic<[llvm_i64_ty],
2824
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2825
              "llvm.nvvm.suld.1d.array.i64.trap">;
2826
def int_nvvm_suld_1d_array_v2i8_trap
2827
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2828
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2829
              "llvm.nvvm.suld.1d.array.v2i8.trap">;
2830
def int_nvvm_suld_1d_array_v2i16_trap
2831
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2832
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2833
              "llvm.nvvm.suld.1d.array.v2i16.trap">;
2834
def int_nvvm_suld_1d_array_v2i32_trap
2835
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2836
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2837
              "llvm.nvvm.suld.1d.array.v2i32.trap">;
2838
def int_nvvm_suld_1d_array_v2i64_trap
2839
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2840
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2841
              "llvm.nvvm.suld.1d.array.v2i64.trap">;
2842
def int_nvvm_suld_1d_array_v4i8_trap
2843
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2844
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2845
              "llvm.nvvm.suld.1d.array.v4i8.trap">;
2846
def int_nvvm_suld_1d_array_v4i16_trap
2847
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2848
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2849
              "llvm.nvvm.suld.1d.array.v4i16.trap">;
2850
def int_nvvm_suld_1d_array_v4i32_trap
2851
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2852
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2853
              "llvm.nvvm.suld.1d.array.v4i32.trap">;
2854
 
2855
def int_nvvm_suld_2d_i8_trap
2856
  : Intrinsic<[llvm_i16_ty],
2857
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2858
              "llvm.nvvm.suld.2d.i8.trap">;
2859
def int_nvvm_suld_2d_i16_trap
2860
  : Intrinsic<[llvm_i16_ty],
2861
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2862
              "llvm.nvvm.suld.2d.i16.trap">;
2863
def int_nvvm_suld_2d_i32_trap
2864
  : Intrinsic<[llvm_i32_ty],
2865
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2866
              "llvm.nvvm.suld.2d.i32.trap">;
2867
def int_nvvm_suld_2d_i64_trap
2868
  : Intrinsic<[llvm_i64_ty],
2869
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2870
              "llvm.nvvm.suld.2d.i64.trap">;
2871
def int_nvvm_suld_2d_v2i8_trap
2872
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2873
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2874
              "llvm.nvvm.suld.2d.v2i8.trap">;
2875
def int_nvvm_suld_2d_v2i16_trap
2876
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2877
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2878
              "llvm.nvvm.suld.2d.v2i16.trap">;
2879
def int_nvvm_suld_2d_v2i32_trap
2880
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2881
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2882
              "llvm.nvvm.suld.2d.v2i32.trap">;
2883
def int_nvvm_suld_2d_v2i64_trap
2884
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2885
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2886
              "llvm.nvvm.suld.2d.v2i64.trap">;
2887
def int_nvvm_suld_2d_v4i8_trap
2888
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2889
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2890
              "llvm.nvvm.suld.2d.v4i8.trap">;
2891
def int_nvvm_suld_2d_v4i16_trap
2892
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2893
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2894
              "llvm.nvvm.suld.2d.v4i16.trap">;
2895
def int_nvvm_suld_2d_v4i32_trap
2896
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2897
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
2898
              "llvm.nvvm.suld.2d.v4i32.trap">;
2899
 
2900
def int_nvvm_suld_2d_array_i8_trap
2901
  : Intrinsic<[llvm_i16_ty],
2902
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2903
              "llvm.nvvm.suld.2d.array.i8.trap">;
2904
def int_nvvm_suld_2d_array_i16_trap
2905
  : Intrinsic<[llvm_i16_ty],
2906
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2907
              "llvm.nvvm.suld.2d.array.i16.trap">;
2908
def int_nvvm_suld_2d_array_i32_trap
2909
  : Intrinsic<[llvm_i32_ty],
2910
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2911
              "llvm.nvvm.suld.2d.array.i32.trap">;
2912
def int_nvvm_suld_2d_array_i64_trap
2913
  : Intrinsic<[llvm_i64_ty],
2914
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2915
              "llvm.nvvm.suld.2d.array.i64.trap">;
2916
def int_nvvm_suld_2d_array_v2i8_trap
2917
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2918
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2919
              "llvm.nvvm.suld.2d.array.v2i8.trap">;
2920
def int_nvvm_suld_2d_array_v2i16_trap
2921
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2922
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2923
              "llvm.nvvm.suld.2d.array.v2i16.trap">;
2924
def int_nvvm_suld_2d_array_v2i32_trap
2925
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2926
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2927
              "llvm.nvvm.suld.2d.array.v2i32.trap">;
2928
def int_nvvm_suld_2d_array_v2i64_trap
2929
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2930
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2931
              "llvm.nvvm.suld.2d.array.v2i64.trap">;
2932
def int_nvvm_suld_2d_array_v4i8_trap
2933
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2934
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2935
              "llvm.nvvm.suld.2d.array.v4i8.trap">;
2936
def int_nvvm_suld_2d_array_v4i16_trap
2937
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2938
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2939
              "llvm.nvvm.suld.2d.array.v4i16.trap">;
2940
def int_nvvm_suld_2d_array_v4i32_trap
2941
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2942
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2943
              "llvm.nvvm.suld.2d.array.v4i32.trap">;
2944
 
2945
def int_nvvm_suld_3d_i8_trap
2946
  : Intrinsic<[llvm_i16_ty],
2947
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2948
              "llvm.nvvm.suld.3d.i8.trap">;
2949
def int_nvvm_suld_3d_i16_trap
2950
  : Intrinsic<[llvm_i16_ty],
2951
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2952
              "llvm.nvvm.suld.3d.i16.trap">;
2953
def int_nvvm_suld_3d_i32_trap
2954
  : Intrinsic<[llvm_i32_ty],
2955
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2956
              "llvm.nvvm.suld.3d.i32.trap">;
2957
def int_nvvm_suld_3d_i64_trap
2958
  : Intrinsic<[llvm_i64_ty],
2959
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2960
              "llvm.nvvm.suld.3d.i64.trap">;
2961
def int_nvvm_suld_3d_v2i8_trap
2962
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2963
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2964
              "llvm.nvvm.suld.3d.v2i8.trap">;
2965
def int_nvvm_suld_3d_v2i16_trap
2966
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
2967
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2968
              "llvm.nvvm.suld.3d.v2i16.trap">;
2969
def int_nvvm_suld_3d_v2i32_trap
2970
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
2971
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2972
              "llvm.nvvm.suld.3d.v2i32.trap">;
2973
def int_nvvm_suld_3d_v2i64_trap
2974
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
2975
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2976
              "llvm.nvvm.suld.3d.v2i64.trap">;
2977
def int_nvvm_suld_3d_v4i8_trap
2978
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2979
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2980
              "llvm.nvvm.suld.3d.v4i8.trap">;
2981
def int_nvvm_suld_3d_v4i16_trap
2982
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
2983
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2984
              "llvm.nvvm.suld.3d.v4i16.trap">;
2985
def int_nvvm_suld_3d_v4i32_trap
2986
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
2987
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
2988
              "llvm.nvvm.suld.3d.v4i32.trap">;
2989
 
2990
// .zero variants
2991
def int_nvvm_suld_1d_i8_zero
2992
  : Intrinsic<[llvm_i16_ty],
2993
              [llvm_i64_ty, llvm_i32_ty], [],
2994
              "llvm.nvvm.suld.1d.i8.zero">;
2995
def int_nvvm_suld_1d_i16_zero
2996
  : Intrinsic<[llvm_i16_ty],
2997
              [llvm_i64_ty, llvm_i32_ty], [],
2998
              "llvm.nvvm.suld.1d.i16.zero">;
2999
def int_nvvm_suld_1d_i32_zero
3000
  : Intrinsic<[llvm_i32_ty],
3001
              [llvm_i64_ty, llvm_i32_ty], [],
3002
              "llvm.nvvm.suld.1d.i32.zero">;
3003
def int_nvvm_suld_1d_i64_zero
3004
  : Intrinsic<[llvm_i64_ty],
3005
              [llvm_i64_ty, llvm_i32_ty], [],
3006
              "llvm.nvvm.suld.1d.i64.zero">;
3007
def int_nvvm_suld_1d_v2i8_zero
3008
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3009
              [llvm_i64_ty, llvm_i32_ty], [],
3010
              "llvm.nvvm.suld.1d.v2i8.zero">;
3011
def int_nvvm_suld_1d_v2i16_zero
3012
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3013
              [llvm_i64_ty, llvm_i32_ty], [],
3014
              "llvm.nvvm.suld.1d.v2i16.zero">;
3015
def int_nvvm_suld_1d_v2i32_zero
3016
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
3017
              [llvm_i64_ty, llvm_i32_ty], [],
3018
              "llvm.nvvm.suld.1d.v2i32.zero">;
3019
def int_nvvm_suld_1d_v2i64_zero
3020
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
3021
              [llvm_i64_ty, llvm_i32_ty], [],
3022
              "llvm.nvvm.suld.1d.v2i64.zero">;
3023
def int_nvvm_suld_1d_v4i8_zero
3024
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3025
              [llvm_i64_ty, llvm_i32_ty], [],
3026
              "llvm.nvvm.suld.1d.v4i8.zero">;
3027
def int_nvvm_suld_1d_v4i16_zero
3028
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3029
              [llvm_i64_ty, llvm_i32_ty], [],
3030
              "llvm.nvvm.suld.1d.v4i16.zero">;
3031
def int_nvvm_suld_1d_v4i32_zero
3032
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
3033
              [llvm_i64_ty, llvm_i32_ty], [],
3034
              "llvm.nvvm.suld.1d.v4i32.zero">;
3035
 
3036
def int_nvvm_suld_1d_array_i8_zero
3037
  : Intrinsic<[llvm_i16_ty],
3038
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3039
              "llvm.nvvm.suld.1d.array.i8.zero">;
3040
def int_nvvm_suld_1d_array_i16_zero
3041
  : Intrinsic<[llvm_i16_ty],
3042
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3043
              "llvm.nvvm.suld.1d.array.i16.zero">;
3044
def int_nvvm_suld_1d_array_i32_zero
3045
  : Intrinsic<[llvm_i32_ty],
3046
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3047
              "llvm.nvvm.suld.1d.array.i32.zero">;
3048
def int_nvvm_suld_1d_array_i64_zero
3049
  : Intrinsic<[llvm_i64_ty],
3050
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3051
              "llvm.nvvm.suld.1d.array.i64.zero">;
3052
def int_nvvm_suld_1d_array_v2i8_zero
3053
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3054
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3055
              "llvm.nvvm.suld.1d.array.v2i8.zero">;
3056
def int_nvvm_suld_1d_array_v2i16_zero
3057
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3058
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3059
              "llvm.nvvm.suld.1d.array.v2i16.zero">;
3060
def int_nvvm_suld_1d_array_v2i32_zero
3061
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
3062
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3063
              "llvm.nvvm.suld.1d.array.v2i32.zero">;
3064
def int_nvvm_suld_1d_array_v2i64_zero
3065
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
3066
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3067
              "llvm.nvvm.suld.1d.array.v2i64.zero">;
3068
def int_nvvm_suld_1d_array_v4i8_zero
3069
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3070
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3071
              "llvm.nvvm.suld.1d.array.v4i8.zero">;
3072
def int_nvvm_suld_1d_array_v4i16_zero
3073
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3074
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3075
              "llvm.nvvm.suld.1d.array.v4i16.zero">;
3076
def int_nvvm_suld_1d_array_v4i32_zero
3077
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
3078
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3079
              "llvm.nvvm.suld.1d.array.v4i32.zero">;
3080
 
3081
def int_nvvm_suld_2d_i8_zero
3082
  : Intrinsic<[llvm_i16_ty],
3083
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3084
              "llvm.nvvm.suld.2d.i8.zero">;
3085
def int_nvvm_suld_2d_i16_zero
3086
  : Intrinsic<[llvm_i16_ty],
3087
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3088
              "llvm.nvvm.suld.2d.i16.zero">;
3089
def int_nvvm_suld_2d_i32_zero
3090
  : Intrinsic<[llvm_i32_ty],
3091
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3092
              "llvm.nvvm.suld.2d.i32.zero">;
3093
def int_nvvm_suld_2d_i64_zero
3094
  : Intrinsic<[llvm_i64_ty],
3095
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3096
              "llvm.nvvm.suld.2d.i64.zero">;
3097
def int_nvvm_suld_2d_v2i8_zero
3098
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3099
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3100
              "llvm.nvvm.suld.2d.v2i8.zero">;
3101
def int_nvvm_suld_2d_v2i16_zero
3102
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3103
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3104
              "llvm.nvvm.suld.2d.v2i16.zero">;
3105
def int_nvvm_suld_2d_v2i32_zero
3106
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
3107
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3108
              "llvm.nvvm.suld.2d.v2i32.zero">;
3109
def int_nvvm_suld_2d_v2i64_zero
3110
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
3111
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3112
              "llvm.nvvm.suld.2d.v2i64.zero">;
3113
def int_nvvm_suld_2d_v4i8_zero
3114
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3115
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3116
              "llvm.nvvm.suld.2d.v4i8.zero">;
3117
def int_nvvm_suld_2d_v4i16_zero
3118
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3119
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3120
              "llvm.nvvm.suld.2d.v4i16.zero">;
3121
def int_nvvm_suld_2d_v4i32_zero
3122
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
3123
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3124
              "llvm.nvvm.suld.2d.v4i32.zero">;
3125
 
3126
def int_nvvm_suld_2d_array_i8_zero
3127
  : Intrinsic<[llvm_i16_ty],
3128
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3129
              "llvm.nvvm.suld.2d.array.i8.zero">;
3130
def int_nvvm_suld_2d_array_i16_zero
3131
  : Intrinsic<[llvm_i16_ty],
3132
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3133
              "llvm.nvvm.suld.2d.array.i16.zero">;
3134
def int_nvvm_suld_2d_array_i32_zero
3135
  : Intrinsic<[llvm_i32_ty],
3136
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3137
              "llvm.nvvm.suld.2d.array.i32.zero">;
3138
def int_nvvm_suld_2d_array_i64_zero
3139
  : Intrinsic<[llvm_i64_ty],
3140
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3141
              "llvm.nvvm.suld.2d.array.i64.zero">;
3142
def int_nvvm_suld_2d_array_v2i8_zero
3143
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3144
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3145
              "llvm.nvvm.suld.2d.array.v2i8.zero">;
3146
def int_nvvm_suld_2d_array_v2i16_zero
3147
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3148
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3149
              "llvm.nvvm.suld.2d.array.v2i16.zero">;
3150
def int_nvvm_suld_2d_array_v2i32_zero
3151
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
3152
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3153
              "llvm.nvvm.suld.2d.array.v2i32.zero">;
3154
def int_nvvm_suld_2d_array_v2i64_zero
3155
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
3156
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3157
              "llvm.nvvm.suld.2d.array.v2i64.zero">;
3158
def int_nvvm_suld_2d_array_v4i8_zero
3159
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3160
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3161
              "llvm.nvvm.suld.2d.array.v4i8.zero">;
3162
def int_nvvm_suld_2d_array_v4i16_zero
3163
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3164
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3165
              "llvm.nvvm.suld.2d.array.v4i16.zero">;
3166
def int_nvvm_suld_2d_array_v4i32_zero
3167
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
3168
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3169
              "llvm.nvvm.suld.2d.array.v4i32.zero">;
3170
 
3171
def int_nvvm_suld_3d_i8_zero
3172
  : Intrinsic<[llvm_i16_ty],
3173
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3174
              "llvm.nvvm.suld.3d.i8.zero">;
3175
def int_nvvm_suld_3d_i16_zero
3176
  : Intrinsic<[llvm_i16_ty],
3177
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3178
              "llvm.nvvm.suld.3d.i16.zero">;
3179
def int_nvvm_suld_3d_i32_zero
3180
  : Intrinsic<[llvm_i32_ty],
3181
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3182
              "llvm.nvvm.suld.3d.i32.zero">;
3183
def int_nvvm_suld_3d_i64_zero
3184
  : Intrinsic<[llvm_i64_ty],
3185
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3186
              "llvm.nvvm.suld.3d.i64.zero">;
3187
def int_nvvm_suld_3d_v2i8_zero
3188
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3189
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3190
              "llvm.nvvm.suld.3d.v2i8.zero">;
3191
def int_nvvm_suld_3d_v2i16_zero
3192
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty],
3193
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3194
              "llvm.nvvm.suld.3d.v2i16.zero">;
3195
def int_nvvm_suld_3d_v2i32_zero
3196
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty],
3197
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3198
              "llvm.nvvm.suld.3d.v2i32.zero">;
3199
def int_nvvm_suld_3d_v2i64_zero
3200
  : Intrinsic<[llvm_i64_ty, llvm_i64_ty],
3201
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3202
              "llvm.nvvm.suld.3d.v2i64.zero">;
3203
def int_nvvm_suld_3d_v4i8_zero
3204
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3205
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3206
              "llvm.nvvm.suld.3d.v4i8.zero">;
3207
def int_nvvm_suld_3d_v4i16_zero
3208
  : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty],
3209
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3210
              "llvm.nvvm.suld.3d.v4i16.zero">;
3211
def int_nvvm_suld_3d_v4i32_zero
3212
  : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
3213
              [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3214
              "llvm.nvvm.suld.3d.v4i32.zero">;
3215
 
3216
//===- Texture Query ------------------------------------------------------===//
3217
 
3218
def int_nvvm_txq_channel_order
3219
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3220
              "llvm.nvvm.txq.channel.order">,
3221
    ClangBuiltin<"__nvvm_txq_channel_order">;
3222
def int_nvvm_txq_channel_data_type
3223
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3224
              "llvm.nvvm.txq.channel.data.type">,
3225
    ClangBuiltin<"__nvvm_txq_channel_data_type">;
3226
def int_nvvm_txq_width
3227
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3228
              "llvm.nvvm.txq.width">,
3229
    ClangBuiltin<"__nvvm_txq_width">;
3230
def int_nvvm_txq_height
3231
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3232
              "llvm.nvvm.txq.height">,
3233
    ClangBuiltin<"__nvvm_txq_height">;
3234
def int_nvvm_txq_depth
3235
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3236
              "llvm.nvvm.txq.depth">,
3237
    ClangBuiltin<"__nvvm_txq_depth">;
3238
def int_nvvm_txq_array_size
3239
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3240
              "llvm.nvvm.txq.array.size">,
3241
    ClangBuiltin<"__nvvm_txq_array_size">;
3242
def int_nvvm_txq_num_samples
3243
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3244
              "llvm.nvvm.txq.num.samples">,
3245
    ClangBuiltin<"__nvvm_txq_num_samples">;
3246
def int_nvvm_txq_num_mipmap_levels
3247
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3248
              "llvm.nvvm.txq.num.mipmap.levels">,
3249
    ClangBuiltin<"__nvvm_txq_num_mipmap_levels">;
3250
 
3251
//===- Surface Query ------------------------------------------------------===//
3252
 
3253
def int_nvvm_suq_channel_order
3254
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3255
              "llvm.nvvm.suq.channel.order">,
3256
    ClangBuiltin<"__nvvm_suq_channel_order">;
3257
def int_nvvm_suq_channel_data_type
3258
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3259
              "llvm.nvvm.suq.channel.data.type">,
3260
    ClangBuiltin<"__nvvm_suq_channel_data_type">;
3261
def int_nvvm_suq_width
3262
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3263
              "llvm.nvvm.suq.width">,
3264
    ClangBuiltin<"__nvvm_suq_width">;
3265
def int_nvvm_suq_height
3266
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3267
              "llvm.nvvm.suq.height">,
3268
    ClangBuiltin<"__nvvm_suq_height">;
3269
def int_nvvm_suq_depth
3270
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3271
              "llvm.nvvm.suq.depth">,
3272
    ClangBuiltin<"__nvvm_suq_depth">;
3273
def int_nvvm_suq_array_size
3274
  : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem],
3275
              "llvm.nvvm.suq.array.size">,
3276
    ClangBuiltin<"__nvvm_suq_array_size">;
3277
 
3278
 
3279
//===- Handle Query -------------------------------------------------------===//
3280
 
3281
def int_nvvm_istypep_sampler
3282
  : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
3283
              "llvm.nvvm.istypep.sampler">,
3284
    ClangBuiltin<"__nvvm_istypep_sampler">;
3285
def int_nvvm_istypep_surface
3286
  : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
3287
              "llvm.nvvm.istypep.surface">,
3288
    ClangBuiltin<"__nvvm_istypep_surface">;
3289
def int_nvvm_istypep_texture
3290
  : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem],
3291
              "llvm.nvvm.istypep.texture">,
3292
    ClangBuiltin<"__nvvm_istypep_texture">;
3293
 
3294
 
3295
 
3296
//===- Surface Stores -----------------------------------------------------===//
3297
 
3298
// Unformatted
3299
// .clamp variant
3300
def int_nvvm_sust_b_1d_i8_clamp
3301
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3302
              "llvm.nvvm.sust.b.1d.i8.clamp">,
3303
    ClangBuiltin<"__nvvm_sust_b_1d_i8_clamp">;
3304
def int_nvvm_sust_b_1d_i16_clamp
3305
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3306
              "llvm.nvvm.sust.b.1d.i16.clamp">,
3307
    ClangBuiltin<"__nvvm_sust_b_1d_i16_clamp">;
3308
def int_nvvm_sust_b_1d_i32_clamp
3309
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3310
              "llvm.nvvm.sust.b.1d.i32.clamp">,
3311
    ClangBuiltin<"__nvvm_sust_b_1d_i32_clamp">;
3312
def int_nvvm_sust_b_1d_i64_clamp
3313
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
3314
              "llvm.nvvm.sust.b.1d.i64.clamp">,
3315
    ClangBuiltin<"__nvvm_sust_b_1d_i64_clamp">;
3316
def int_nvvm_sust_b_1d_v2i8_clamp
3317
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3318
              "llvm.nvvm.sust.b.1d.v2i8.clamp">,
3319
    ClangBuiltin<"__nvvm_sust_b_1d_v2i8_clamp">;
3320
def int_nvvm_sust_b_1d_v2i16_clamp
3321
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3322
              "llvm.nvvm.sust.b.1d.v2i16.clamp">,
3323
    ClangBuiltin<"__nvvm_sust_b_1d_v2i16_clamp">;
3324
def int_nvvm_sust_b_1d_v2i32_clamp
3325
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3326
              "llvm.nvvm.sust.b.1d.v2i32.clamp">,
3327
    ClangBuiltin<"__nvvm_sust_b_1d_v2i32_clamp">;
3328
def int_nvvm_sust_b_1d_v2i64_clamp
3329
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
3330
              "llvm.nvvm.sust.b.1d.v2i64.clamp">,
3331
    ClangBuiltin<"__nvvm_sust_b_1d_v2i64_clamp">;
3332
def int_nvvm_sust_b_1d_v4i8_clamp
3333
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3334
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3335
              "llvm.nvvm.sust.b.1d.v4i8.clamp">,
3336
    ClangBuiltin<"__nvvm_sust_b_1d_v4i8_clamp">;
3337
def int_nvvm_sust_b_1d_v4i16_clamp
3338
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3339
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3340
              "llvm.nvvm.sust.b.1d.v4i16.clamp">,
3341
    ClangBuiltin<"__nvvm_sust_b_1d_v4i16_clamp">;
3342
def int_nvvm_sust_b_1d_v4i32_clamp
3343
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3344
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3345
              "llvm.nvvm.sust.b.1d.v4i32.clamp">,
3346
    ClangBuiltin<"__nvvm_sust_b_1d_v4i32_clamp">;
3347
 
3348
 
3349
def int_nvvm_sust_b_1d_array_i8_clamp
3350
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3351
              "llvm.nvvm.sust.b.1d.array.i8.clamp">,
3352
    ClangBuiltin<"__nvvm_sust_b_1d_array_i8_clamp">;
3353
def int_nvvm_sust_b_1d_array_i16_clamp
3354
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3355
              "llvm.nvvm.sust.b.1d.array.i16.clamp">,
3356
    ClangBuiltin<"__nvvm_sust_b_1d_array_i16_clamp">;
3357
def int_nvvm_sust_b_1d_array_i32_clamp
3358
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3359
              "llvm.nvvm.sust.b.1d.array.i32.clamp">,
3360
    ClangBuiltin<"__nvvm_sust_b_1d_array_i32_clamp">;
3361
def int_nvvm_sust_b_1d_array_i64_clamp
3362
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3363
              "llvm.nvvm.sust.b.1d.array.i64.clamp">,
3364
    ClangBuiltin<"__nvvm_sust_b_1d_array_i64_clamp">;
3365
def int_nvvm_sust_b_1d_array_v2i8_clamp
3366
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3367
                   llvm_i16_ty, llvm_i16_ty], [],
3368
              "llvm.nvvm.sust.b.1d.array.v2i8.clamp">,
3369
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_clamp">;
3370
def int_nvvm_sust_b_1d_array_v2i16_clamp
3371
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3372
                   llvm_i16_ty, llvm_i16_ty], [],
3373
              "llvm.nvvm.sust.b.1d.array.v2i16.clamp">,
3374
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_clamp">;
3375
def int_nvvm_sust_b_1d_array_v2i32_clamp
3376
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3377
                   llvm_i32_ty, llvm_i32_ty], [],
3378
              "llvm.nvvm.sust.b.1d.array.v2i32.clamp">,
3379
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_clamp">;
3380
def int_nvvm_sust_b_1d_array_v2i64_clamp
3381
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3382
                   llvm_i64_ty, llvm_i64_ty], [],
3383
              "llvm.nvvm.sust.b.1d.array.v2i64.clamp">,
3384
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_clamp">;
3385
def int_nvvm_sust_b_1d_array_v4i8_clamp
3386
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3387
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3388
              "llvm.nvvm.sust.b.1d.array.v4i8.clamp">,
3389
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_clamp">;
3390
def int_nvvm_sust_b_1d_array_v4i16_clamp
3391
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3392
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3393
              "llvm.nvvm.sust.b.1d.array.v4i16.clamp">,
3394
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_clamp">;
3395
def int_nvvm_sust_b_1d_array_v4i32_clamp
3396
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3397
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3398
              "llvm.nvvm.sust.b.1d.array.v4i32.clamp">,
3399
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_clamp">;
3400
 
3401
 
3402
def int_nvvm_sust_b_2d_i8_clamp
3403
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3404
              "llvm.nvvm.sust.b.2d.i8.clamp">,
3405
    ClangBuiltin<"__nvvm_sust_b_2d_i8_clamp">;
3406
def int_nvvm_sust_b_2d_i16_clamp
3407
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3408
              "llvm.nvvm.sust.b.2d.i16.clamp">,
3409
    ClangBuiltin<"__nvvm_sust_b_2d_i16_clamp">;
3410
def int_nvvm_sust_b_2d_i32_clamp
3411
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3412
              "llvm.nvvm.sust.b.2d.i32.clamp">,
3413
    ClangBuiltin<"__nvvm_sust_b_2d_i32_clamp">;
3414
def int_nvvm_sust_b_2d_i64_clamp
3415
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3416
              "llvm.nvvm.sust.b.2d.i64.clamp">,
3417
    ClangBuiltin<"__nvvm_sust_b_2d_i64_clamp">;
3418
def int_nvvm_sust_b_2d_v2i8_clamp
3419
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3420
                   llvm_i16_ty, llvm_i16_ty], [],
3421
              "llvm.nvvm.sust.b.2d.v2i8.clamp">,
3422
    ClangBuiltin<"__nvvm_sust_b_2d_v2i8_clamp">;
3423
def int_nvvm_sust_b_2d_v2i16_clamp
3424
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3425
                   llvm_i16_ty, llvm_i16_ty], [],
3426
              "llvm.nvvm.sust.b.2d.v2i16.clamp">,
3427
    ClangBuiltin<"__nvvm_sust_b_2d_v2i16_clamp">;
3428
def int_nvvm_sust_b_2d_v2i32_clamp
3429
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3430
                   llvm_i32_ty, llvm_i32_ty], [],
3431
              "llvm.nvvm.sust.b.2d.v2i32.clamp">,
3432
    ClangBuiltin<"__nvvm_sust_b_2d_v2i32_clamp">;
3433
def int_nvvm_sust_b_2d_v2i64_clamp
3434
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3435
                   llvm_i64_ty, llvm_i64_ty], [],
3436
              "llvm.nvvm.sust.b.2d.v2i64.clamp">,
3437
    ClangBuiltin<"__nvvm_sust_b_2d_v2i64_clamp">;
3438
def int_nvvm_sust_b_2d_v4i8_clamp
3439
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3440
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3441
              "llvm.nvvm.sust.b.2d.v4i8.clamp">,
3442
    ClangBuiltin<"__nvvm_sust_b_2d_v4i8_clamp">;
3443
def int_nvvm_sust_b_2d_v4i16_clamp
3444
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3445
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3446
              "llvm.nvvm.sust.b.2d.v4i16.clamp">,
3447
    ClangBuiltin<"__nvvm_sust_b_2d_v4i16_clamp">;
3448
def int_nvvm_sust_b_2d_v4i32_clamp
3449
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3450
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3451
              "llvm.nvvm.sust.b.2d.v4i32.clamp">,
3452
    ClangBuiltin<"__nvvm_sust_b_2d_v4i32_clamp">;
3453
 
3454
 
3455
def int_nvvm_sust_b_2d_array_i8_clamp
3456
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3457
                   llvm_i32_ty, llvm_i16_ty], [],
3458
              "llvm.nvvm.sust.b.2d.array.i8.clamp">,
3459
    ClangBuiltin<"__nvvm_sust_b_2d_array_i8_clamp">;
3460
def int_nvvm_sust_b_2d_array_i16_clamp
3461
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3462
                   llvm_i32_ty, llvm_i16_ty], [],
3463
              "llvm.nvvm.sust.b.2d.array.i16.clamp">,
3464
    ClangBuiltin<"__nvvm_sust_b_2d_array_i16_clamp">;
3465
def int_nvvm_sust_b_2d_array_i32_clamp
3466
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3467
                   llvm_i32_ty, llvm_i32_ty], [],
3468
              "llvm.nvvm.sust.b.2d.array.i32.clamp">,
3469
    ClangBuiltin<"__nvvm_sust_b_2d_array_i32_clamp">;
3470
def int_nvvm_sust_b_2d_array_i64_clamp
3471
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3472
                   llvm_i32_ty, llvm_i64_ty], [],
3473
              "llvm.nvvm.sust.b.2d.array.i64.clamp">,
3474
    ClangBuiltin<"__nvvm_sust_b_2d_array_i64_clamp">;
3475
def int_nvvm_sust_b_2d_array_v2i8_clamp
3476
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3477
                   llvm_i16_ty, llvm_i16_ty], [],
3478
              "llvm.nvvm.sust.b.2d.array.v2i8.clamp">,
3479
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_clamp">;
3480
def int_nvvm_sust_b_2d_array_v2i16_clamp
3481
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3482
                   llvm_i16_ty, llvm_i16_ty], [],
3483
              "llvm.nvvm.sust.b.2d.array.v2i16.clamp">,
3484
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_clamp">;
3485
def int_nvvm_sust_b_2d_array_v2i32_clamp
3486
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3487
                   llvm_i32_ty, llvm_i32_ty], [],
3488
              "llvm.nvvm.sust.b.2d.array.v2i32.clamp">,
3489
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_clamp">;
3490
def int_nvvm_sust_b_2d_array_v2i64_clamp
3491
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3492
                   llvm_i64_ty, llvm_i64_ty], [],
3493
              "llvm.nvvm.sust.b.2d.array.v2i64.clamp">,
3494
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_clamp">;
3495
def int_nvvm_sust_b_2d_array_v4i8_clamp
3496
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3497
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3498
              "llvm.nvvm.sust.b.2d.array.v4i8.clamp">,
3499
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_clamp">;
3500
def int_nvvm_sust_b_2d_array_v4i16_clamp
3501
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3502
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3503
              "llvm.nvvm.sust.b.2d.array.v4i16.clamp">,
3504
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_clamp">;
3505
def int_nvvm_sust_b_2d_array_v4i32_clamp
3506
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3507
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3508
              "llvm.nvvm.sust.b.2d.array.v4i32.clamp">,
3509
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_clamp">;
3510
 
3511
 
3512
def int_nvvm_sust_b_3d_i8_clamp
3513
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3514
                   llvm_i32_ty, llvm_i16_ty], [],
3515
              "llvm.nvvm.sust.b.3d.i8.clamp">,
3516
    ClangBuiltin<"__nvvm_sust_b_3d_i8_clamp">;
3517
def int_nvvm_sust_b_3d_i16_clamp
3518
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3519
                   llvm_i32_ty, llvm_i16_ty], [],
3520
              "llvm.nvvm.sust.b.3d.i16.clamp">,
3521
    ClangBuiltin<"__nvvm_sust_b_3d_i16_clamp">;
3522
def int_nvvm_sust_b_3d_i32_clamp
3523
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3524
                   llvm_i32_ty, llvm_i32_ty], [],
3525
              "llvm.nvvm.sust.b.3d.i32.clamp">,
3526
    ClangBuiltin<"__nvvm_sust_b_3d_i32_clamp">;
3527
def int_nvvm_sust_b_3d_i64_clamp
3528
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3529
                   llvm_i32_ty, llvm_i64_ty], [],
3530
              "llvm.nvvm.sust.b.3d.i64.clamp">,
3531
    ClangBuiltin<"__nvvm_sust_b_3d_i64_clamp">;
3532
def int_nvvm_sust_b_3d_v2i8_clamp
3533
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3534
                   llvm_i16_ty, llvm_i16_ty], [],
3535
              "llvm.nvvm.sust.b.3d.v2i8.clamp">,
3536
    ClangBuiltin<"__nvvm_sust_b_3d_v2i8_clamp">;
3537
def int_nvvm_sust_b_3d_v2i16_clamp
3538
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3539
                   llvm_i16_ty, llvm_i16_ty], [],
3540
              "llvm.nvvm.sust.b.3d.v2i16.clamp">,
3541
    ClangBuiltin<"__nvvm_sust_b_3d_v2i16_clamp">;
3542
def int_nvvm_sust_b_3d_v2i32_clamp
3543
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3544
                   llvm_i32_ty, llvm_i32_ty], [],
3545
              "llvm.nvvm.sust.b.3d.v2i32.clamp">,
3546
    ClangBuiltin<"__nvvm_sust_b_3d_v2i32_clamp">;
3547
def int_nvvm_sust_b_3d_v2i64_clamp
3548
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3549
                   llvm_i64_ty, llvm_i64_ty], [],
3550
              "llvm.nvvm.sust.b.3d.v2i64.clamp">,
3551
    ClangBuiltin<"__nvvm_sust_b_3d_v2i64_clamp">;
3552
def int_nvvm_sust_b_3d_v4i8_clamp
3553
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3554
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3555
              "llvm.nvvm.sust.b.3d.v4i8.clamp">,
3556
    ClangBuiltin<"__nvvm_sust_b_3d_v4i8_clamp">;
3557
def int_nvvm_sust_b_3d_v4i16_clamp
3558
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3559
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3560
              "llvm.nvvm.sust.b.3d.v4i16.clamp">,
3561
    ClangBuiltin<"__nvvm_sust_b_3d_v4i16_clamp">;
3562
def int_nvvm_sust_b_3d_v4i32_clamp
3563
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3564
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3565
              "llvm.nvvm.sust.b.3d.v4i32.clamp">,
3566
    ClangBuiltin<"__nvvm_sust_b_3d_v4i32_clamp">;
3567
 
3568
 
3569
// .trap variant
3570
def int_nvvm_sust_b_1d_i8_trap
3571
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3572
              "llvm.nvvm.sust.b.1d.i8.trap">,
3573
    ClangBuiltin<"__nvvm_sust_b_1d_i8_trap">;
3574
def int_nvvm_sust_b_1d_i16_trap
3575
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3576
              "llvm.nvvm.sust.b.1d.i16.trap">,
3577
    ClangBuiltin<"__nvvm_sust_b_1d_i16_trap">;
3578
def int_nvvm_sust_b_1d_i32_trap
3579
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3580
              "llvm.nvvm.sust.b.1d.i32.trap">,
3581
    ClangBuiltin<"__nvvm_sust_b_1d_i32_trap">;
3582
def int_nvvm_sust_b_1d_i64_trap
3583
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
3584
              "llvm.nvvm.sust.b.1d.i64.trap">,
3585
    ClangBuiltin<"__nvvm_sust_b_1d_i64_trap">;
3586
def int_nvvm_sust_b_1d_v2i8_trap
3587
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3588
              "llvm.nvvm.sust.b.1d.v2i8.trap">,
3589
    ClangBuiltin<"__nvvm_sust_b_1d_v2i8_trap">;
3590
def int_nvvm_sust_b_1d_v2i16_trap
3591
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3592
              "llvm.nvvm.sust.b.1d.v2i16.trap">,
3593
    ClangBuiltin<"__nvvm_sust_b_1d_v2i16_trap">;
3594
def int_nvvm_sust_b_1d_v2i32_trap
3595
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3596
              "llvm.nvvm.sust.b.1d.v2i32.trap">,
3597
    ClangBuiltin<"__nvvm_sust_b_1d_v2i32_trap">;
3598
def int_nvvm_sust_b_1d_v2i64_trap
3599
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
3600
              "llvm.nvvm.sust.b.1d.v2i64.trap">,
3601
    ClangBuiltin<"__nvvm_sust_b_1d_v2i64_trap">;
3602
def int_nvvm_sust_b_1d_v4i8_trap
3603
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3604
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3605
              "llvm.nvvm.sust.b.1d.v4i8.trap">,
3606
    ClangBuiltin<"__nvvm_sust_b_1d_v4i8_trap">;
3607
def int_nvvm_sust_b_1d_v4i16_trap
3608
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3609
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3610
              "llvm.nvvm.sust.b.1d.v4i16.trap">,
3611
    ClangBuiltin<"__nvvm_sust_b_1d_v4i16_trap">;
3612
def int_nvvm_sust_b_1d_v4i32_trap
3613
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3614
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3615
              "llvm.nvvm.sust.b.1d.v4i32.trap">,
3616
    ClangBuiltin<"__nvvm_sust_b_1d_v4i32_trap">;
3617
 
3618
 
3619
def int_nvvm_sust_b_1d_array_i8_trap
3620
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3621
              "llvm.nvvm.sust.b.1d.array.i8.trap">,
3622
    ClangBuiltin<"__nvvm_sust_b_1d_array_i8_trap">;
3623
def int_nvvm_sust_b_1d_array_i16_trap
3624
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3625
              "llvm.nvvm.sust.b.1d.array.i16.trap">,
3626
    ClangBuiltin<"__nvvm_sust_b_1d_array_i16_trap">;
3627
def int_nvvm_sust_b_1d_array_i32_trap
3628
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3629
              "llvm.nvvm.sust.b.1d.array.i32.trap">,
3630
    ClangBuiltin<"__nvvm_sust_b_1d_array_i32_trap">;
3631
def int_nvvm_sust_b_1d_array_i64_trap
3632
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3633
              "llvm.nvvm.sust.b.1d.array.i64.trap">,
3634
    ClangBuiltin<"__nvvm_sust_b_1d_array_i64_trap">;
3635
def int_nvvm_sust_b_1d_array_v2i8_trap
3636
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3637
                   llvm_i16_ty, llvm_i16_ty], [],
3638
              "llvm.nvvm.sust.b.1d.array.v2i8.trap">,
3639
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_trap">;
3640
def int_nvvm_sust_b_1d_array_v2i16_trap
3641
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3642
                   llvm_i16_ty, llvm_i16_ty], [],
3643
              "llvm.nvvm.sust.b.1d.array.v2i16.trap">,
3644
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_trap">;
3645
def int_nvvm_sust_b_1d_array_v2i32_trap
3646
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3647
                   llvm_i32_ty, llvm_i32_ty], [],
3648
              "llvm.nvvm.sust.b.1d.array.v2i32.trap">,
3649
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_trap">;
3650
def int_nvvm_sust_b_1d_array_v2i64_trap
3651
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3652
                   llvm_i64_ty, llvm_i64_ty], [],
3653
              "llvm.nvvm.sust.b.1d.array.v2i64.trap">,
3654
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_trap">;
3655
def int_nvvm_sust_b_1d_array_v4i8_trap
3656
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3657
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3658
              "llvm.nvvm.sust.b.1d.array.v4i8.trap">,
3659
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_trap">;
3660
def int_nvvm_sust_b_1d_array_v4i16_trap
3661
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3662
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3663
              "llvm.nvvm.sust.b.1d.array.v4i16.trap">,
3664
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_trap">;
3665
def int_nvvm_sust_b_1d_array_v4i32_trap
3666
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3667
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3668
              "llvm.nvvm.sust.b.1d.array.v4i32.trap">,
3669
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_trap">;
3670
 
3671
 
3672
def int_nvvm_sust_b_2d_i8_trap
3673
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3674
              "llvm.nvvm.sust.b.2d.i8.trap">,
3675
    ClangBuiltin<"__nvvm_sust_b_2d_i8_trap">;
3676
def int_nvvm_sust_b_2d_i16_trap
3677
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3678
              "llvm.nvvm.sust.b.2d.i16.trap">,
3679
    ClangBuiltin<"__nvvm_sust_b_2d_i16_trap">;
3680
def int_nvvm_sust_b_2d_i32_trap
3681
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3682
              "llvm.nvvm.sust.b.2d.i32.trap">,
3683
    ClangBuiltin<"__nvvm_sust_b_2d_i32_trap">;
3684
def int_nvvm_sust_b_2d_i64_trap
3685
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3686
              "llvm.nvvm.sust.b.2d.i64.trap">,
3687
    ClangBuiltin<"__nvvm_sust_b_2d_i64_trap">;
3688
def int_nvvm_sust_b_2d_v2i8_trap
3689
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3690
                   llvm_i16_ty, llvm_i16_ty], [],
3691
              "llvm.nvvm.sust.b.2d.v2i8.trap">,
3692
    ClangBuiltin<"__nvvm_sust_b_2d_v2i8_trap">;
3693
def int_nvvm_sust_b_2d_v2i16_trap
3694
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3695
                   llvm_i16_ty, llvm_i16_ty], [],
3696
              "llvm.nvvm.sust.b.2d.v2i16.trap">,
3697
    ClangBuiltin<"__nvvm_sust_b_2d_v2i16_trap">;
3698
def int_nvvm_sust_b_2d_v2i32_trap
3699
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3700
                   llvm_i32_ty, llvm_i32_ty], [],
3701
              "llvm.nvvm.sust.b.2d.v2i32.trap">,
3702
    ClangBuiltin<"__nvvm_sust_b_2d_v2i32_trap">;
3703
def int_nvvm_sust_b_2d_v2i64_trap
3704
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3705
                   llvm_i64_ty, llvm_i64_ty], [],
3706
              "llvm.nvvm.sust.b.2d.v2i64.trap">,
3707
    ClangBuiltin<"__nvvm_sust_b_2d_v2i64_trap">;
3708
def int_nvvm_sust_b_2d_v4i8_trap
3709
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3710
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3711
              "llvm.nvvm.sust.b.2d.v4i8.trap">,
3712
    ClangBuiltin<"__nvvm_sust_b_2d_v4i8_trap">;
3713
def int_nvvm_sust_b_2d_v4i16_trap
3714
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3715
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3716
              "llvm.nvvm.sust.b.2d.v4i16.trap">,
3717
    ClangBuiltin<"__nvvm_sust_b_2d_v4i16_trap">;
3718
def int_nvvm_sust_b_2d_v4i32_trap
3719
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3720
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3721
              "llvm.nvvm.sust.b.2d.v4i32.trap">,
3722
    ClangBuiltin<"__nvvm_sust_b_2d_v4i32_trap">;
3723
 
3724
 
3725
def int_nvvm_sust_b_2d_array_i8_trap
3726
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3727
                   llvm_i32_ty, llvm_i16_ty], [],
3728
              "llvm.nvvm.sust.b.2d.array.i8.trap">,
3729
    ClangBuiltin<"__nvvm_sust_b_2d_array_i8_trap">;
3730
def int_nvvm_sust_b_2d_array_i16_trap
3731
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3732
                   llvm_i32_ty, llvm_i16_ty], [],
3733
              "llvm.nvvm.sust.b.2d.array.i16.trap">,
3734
    ClangBuiltin<"__nvvm_sust_b_2d_array_i16_trap">;
3735
def int_nvvm_sust_b_2d_array_i32_trap
3736
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3737
                   llvm_i32_ty, llvm_i32_ty], [],
3738
              "llvm.nvvm.sust.b.2d.array.i32.trap">,
3739
    ClangBuiltin<"__nvvm_sust_b_2d_array_i32_trap">;
3740
def int_nvvm_sust_b_2d_array_i64_trap
3741
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3742
                   llvm_i32_ty, llvm_i64_ty], [],
3743
              "llvm.nvvm.sust.b.2d.array.i64.trap">,
3744
    ClangBuiltin<"__nvvm_sust_b_2d_array_i64_trap">;
3745
def int_nvvm_sust_b_2d_array_v2i8_trap
3746
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3747
                   llvm_i16_ty, llvm_i16_ty], [],
3748
              "llvm.nvvm.sust.b.2d.array.v2i8.trap">,
3749
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_trap">;
3750
def int_nvvm_sust_b_2d_array_v2i16_trap
3751
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3752
                   llvm_i16_ty, llvm_i16_ty], [],
3753
              "llvm.nvvm.sust.b.2d.array.v2i16.trap">,
3754
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_trap">;
3755
def int_nvvm_sust_b_2d_array_v2i32_trap
3756
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3757
                   llvm_i32_ty, llvm_i32_ty], [],
3758
              "llvm.nvvm.sust.b.2d.array.v2i32.trap">,
3759
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_trap">;
3760
def int_nvvm_sust_b_2d_array_v2i64_trap
3761
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3762
                   llvm_i64_ty, llvm_i64_ty], [],
3763
              "llvm.nvvm.sust.b.2d.array.v2i64.trap">,
3764
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_trap">;
3765
def int_nvvm_sust_b_2d_array_v4i8_trap
3766
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3767
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3768
              "llvm.nvvm.sust.b.2d.array.v4i8.trap">,
3769
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_trap">;
3770
def int_nvvm_sust_b_2d_array_v4i16_trap
3771
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3772
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3773
              "llvm.nvvm.sust.b.2d.array.v4i16.trap">,
3774
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_trap">;
3775
def int_nvvm_sust_b_2d_array_v4i32_trap
3776
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3777
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3778
              "llvm.nvvm.sust.b.2d.array.v4i32.trap">,
3779
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_trap">;
3780
 
3781
 
3782
def int_nvvm_sust_b_3d_i8_trap
3783
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3784
                   llvm_i32_ty, llvm_i16_ty], [],
3785
              "llvm.nvvm.sust.b.3d.i8.trap">,
3786
    ClangBuiltin<"__nvvm_sust_b_3d_i8_trap">;
3787
def int_nvvm_sust_b_3d_i16_trap
3788
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3789
                   llvm_i32_ty, llvm_i16_ty], [],
3790
              "llvm.nvvm.sust.b.3d.i16.trap">,
3791
    ClangBuiltin<"__nvvm_sust_b_3d_i16_trap">;
3792
def int_nvvm_sust_b_3d_i32_trap
3793
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3794
                   llvm_i32_ty, llvm_i32_ty], [],
3795
              "llvm.nvvm.sust.b.3d.i32.trap">,
3796
    ClangBuiltin<"__nvvm_sust_b_3d_i32_trap">;
3797
def int_nvvm_sust_b_3d_i64_trap
3798
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3799
                   llvm_i32_ty, llvm_i64_ty], [],
3800
              "llvm.nvvm.sust.b.3d.i64.trap">,
3801
    ClangBuiltin<"__nvvm_sust_b_3d_i64_trap">;
3802
def int_nvvm_sust_b_3d_v2i8_trap
3803
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3804
                   llvm_i16_ty, llvm_i16_ty], [],
3805
              "llvm.nvvm.sust.b.3d.v2i8.trap">,
3806
    ClangBuiltin<"__nvvm_sust_b_3d_v2i8_trap">;
3807
def int_nvvm_sust_b_3d_v2i16_trap
3808
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3809
                   llvm_i16_ty, llvm_i16_ty], [],
3810
              "llvm.nvvm.sust.b.3d.v2i16.trap">,
3811
    ClangBuiltin<"__nvvm_sust_b_3d_v2i16_trap">;
3812
def int_nvvm_sust_b_3d_v2i32_trap
3813
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3814
                   llvm_i32_ty, llvm_i32_ty], [],
3815
              "llvm.nvvm.sust.b.3d.v2i32.trap">,
3816
    ClangBuiltin<"__nvvm_sust_b_3d_v2i32_trap">;
3817
def int_nvvm_sust_b_3d_v2i64_trap
3818
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3819
                   llvm_i64_ty, llvm_i64_ty], [],
3820
              "llvm.nvvm.sust.b.3d.v2i64.trap">,
3821
    ClangBuiltin<"__nvvm_sust_b_3d_v2i64_trap">;
3822
def int_nvvm_sust_b_3d_v4i8_trap
3823
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3824
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3825
              "llvm.nvvm.sust.b.3d.v4i8.trap">,
3826
    ClangBuiltin<"__nvvm_sust_b_3d_v4i8_trap">;
3827
def int_nvvm_sust_b_3d_v4i16_trap
3828
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3829
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3830
              "llvm.nvvm.sust.b.3d.v4i16.trap">,
3831
    ClangBuiltin<"__nvvm_sust_b_3d_v4i16_trap">;
3832
def int_nvvm_sust_b_3d_v4i32_trap
3833
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3834
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3835
              "llvm.nvvm.sust.b.3d.v4i32.trap">,
3836
    ClangBuiltin<"__nvvm_sust_b_3d_v4i32_trap">;
3837
 
3838
 
3839
// .zero variant
3840
def int_nvvm_sust_b_1d_i8_zero
3841
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3842
              "llvm.nvvm.sust.b.1d.i8.zero">,
3843
    ClangBuiltin<"__nvvm_sust_b_1d_i8_zero">;
3844
def int_nvvm_sust_b_1d_i16_zero
3845
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
3846
              "llvm.nvvm.sust.b.1d.i16.zero">,
3847
    ClangBuiltin<"__nvvm_sust_b_1d_i16_zero">;
3848
def int_nvvm_sust_b_1d_i32_zero
3849
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
3850
              "llvm.nvvm.sust.b.1d.i32.zero">,
3851
    ClangBuiltin<"__nvvm_sust_b_1d_i32_zero">;
3852
def int_nvvm_sust_b_1d_i64_zero
3853
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [],
3854
              "llvm.nvvm.sust.b.1d.i64.zero">,
3855
    ClangBuiltin<"__nvvm_sust_b_1d_i64_zero">;
3856
def int_nvvm_sust_b_1d_v2i8_zero
3857
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3858
              "llvm.nvvm.sust.b.1d.v2i8.zero">,
3859
    ClangBuiltin<"__nvvm_sust_b_1d_v2i8_zero">;
3860
def int_nvvm_sust_b_1d_v2i16_zero
3861
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
3862
              "llvm.nvvm.sust.b.1d.v2i16.zero">,
3863
    ClangBuiltin<"__nvvm_sust_b_1d_v2i16_zero">;
3864
def int_nvvm_sust_b_1d_v2i32_zero
3865
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3866
              "llvm.nvvm.sust.b.1d.v2i32.zero">,
3867
    ClangBuiltin<"__nvvm_sust_b_1d_v2i32_zero">;
3868
def int_nvvm_sust_b_1d_v2i64_zero
3869
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [],
3870
              "llvm.nvvm.sust.b.1d.v2i64.zero">,
3871
    ClangBuiltin<"__nvvm_sust_b_1d_v2i64_zero">;
3872
def int_nvvm_sust_b_1d_v4i8_zero
3873
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3874
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3875
              "llvm.nvvm.sust.b.1d.v4i8.zero">,
3876
    ClangBuiltin<"__nvvm_sust_b_1d_v4i8_zero">;
3877
def int_nvvm_sust_b_1d_v4i16_zero
3878
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
3879
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3880
              "llvm.nvvm.sust.b.1d.v4i16.zero">,
3881
    ClangBuiltin<"__nvvm_sust_b_1d_v4i16_zero">;
3882
def int_nvvm_sust_b_1d_v4i32_zero
3883
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3884
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3885
              "llvm.nvvm.sust.b.1d.v4i32.zero">,
3886
    ClangBuiltin<"__nvvm_sust_b_1d_v4i32_zero">;
3887
 
3888
 
3889
def int_nvvm_sust_b_1d_array_i8_zero
3890
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3891
              "llvm.nvvm.sust.b.1d.array.i8.zero">,
3892
    ClangBuiltin<"__nvvm_sust_b_1d_array_i8_zero">;
3893
def int_nvvm_sust_b_1d_array_i16_zero
3894
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3895
              "llvm.nvvm.sust.b.1d.array.i16.zero">,
3896
    ClangBuiltin<"__nvvm_sust_b_1d_array_i16_zero">;
3897
def int_nvvm_sust_b_1d_array_i32_zero
3898
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3899
              "llvm.nvvm.sust.b.1d.array.i32.zero">,
3900
    ClangBuiltin<"__nvvm_sust_b_1d_array_i32_zero">;
3901
def int_nvvm_sust_b_1d_array_i64_zero
3902
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3903
              "llvm.nvvm.sust.b.1d.array.i64.zero">,
3904
    ClangBuiltin<"__nvvm_sust_b_1d_array_i64_zero">;
3905
def int_nvvm_sust_b_1d_array_v2i8_zero
3906
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3907
                   llvm_i16_ty, llvm_i16_ty], [],
3908
              "llvm.nvvm.sust.b.1d.array.v2i8.zero">,
3909
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i8_zero">;
3910
def int_nvvm_sust_b_1d_array_v2i16_zero
3911
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3912
                   llvm_i16_ty, llvm_i16_ty], [],
3913
              "llvm.nvvm.sust.b.1d.array.v2i16.zero">,
3914
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i16_zero">;
3915
def int_nvvm_sust_b_1d_array_v2i32_zero
3916
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3917
                   llvm_i32_ty, llvm_i32_ty], [],
3918
              "llvm.nvvm.sust.b.1d.array.v2i32.zero">,
3919
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i32_zero">;
3920
def int_nvvm_sust_b_1d_array_v2i64_zero
3921
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3922
                   llvm_i64_ty, llvm_i64_ty], [],
3923
              "llvm.nvvm.sust.b.1d.array.v2i64.zero">,
3924
    ClangBuiltin<"__nvvm_sust_b_1d_array_v2i64_zero">;
3925
def int_nvvm_sust_b_1d_array_v4i8_zero
3926
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3927
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3928
              "llvm.nvvm.sust.b.1d.array.v4i8.zero">,
3929
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i8_zero">;
3930
def int_nvvm_sust_b_1d_array_v4i16_zero
3931
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3932
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3933
              "llvm.nvvm.sust.b.1d.array.v4i16.zero">,
3934
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i16_zero">;
3935
def int_nvvm_sust_b_1d_array_v4i32_zero
3936
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3937
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3938
              "llvm.nvvm.sust.b.1d.array.v4i32.zero">,
3939
    ClangBuiltin<"__nvvm_sust_b_1d_array_v4i32_zero">;
3940
 
3941
 
3942
def int_nvvm_sust_b_2d_i8_zero
3943
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3944
              "llvm.nvvm.sust.b.2d.i8.zero">,
3945
    ClangBuiltin<"__nvvm_sust_b_2d_i8_zero">;
3946
def int_nvvm_sust_b_2d_i16_zero
3947
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
3948
              "llvm.nvvm.sust.b.2d.i16.zero">,
3949
    ClangBuiltin<"__nvvm_sust_b_2d_i16_zero">;
3950
def int_nvvm_sust_b_2d_i32_zero
3951
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3952
              "llvm.nvvm.sust.b.2d.i32.zero">,
3953
    ClangBuiltin<"__nvvm_sust_b_2d_i32_zero">;
3954
def int_nvvm_sust_b_2d_i64_zero
3955
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [],
3956
              "llvm.nvvm.sust.b.2d.i64.zero">,
3957
    ClangBuiltin<"__nvvm_sust_b_2d_i64_zero">;
3958
def int_nvvm_sust_b_2d_v2i8_zero
3959
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3960
                   llvm_i16_ty, llvm_i16_ty], [],
3961
              "llvm.nvvm.sust.b.2d.v2i8.zero">,
3962
    ClangBuiltin<"__nvvm_sust_b_2d_v2i8_zero">;
3963
def int_nvvm_sust_b_2d_v2i16_zero
3964
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3965
                   llvm_i16_ty, llvm_i16_ty], [],
3966
              "llvm.nvvm.sust.b.2d.v2i16.zero">,
3967
    ClangBuiltin<"__nvvm_sust_b_2d_v2i16_zero">;
3968
def int_nvvm_sust_b_2d_v2i32_zero
3969
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3970
                   llvm_i32_ty, llvm_i32_ty], [],
3971
              "llvm.nvvm.sust.b.2d.v2i32.zero">,
3972
    ClangBuiltin<"__nvvm_sust_b_2d_v2i32_zero">;
3973
def int_nvvm_sust_b_2d_v2i64_zero
3974
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3975
                   llvm_i64_ty, llvm_i64_ty], [],
3976
              "llvm.nvvm.sust.b.2d.v2i64.zero">,
3977
    ClangBuiltin<"__nvvm_sust_b_2d_v2i64_zero">;
3978
def int_nvvm_sust_b_2d_v4i8_zero
3979
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3980
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3981
              "llvm.nvvm.sust.b.2d.v4i8.zero">,
3982
    ClangBuiltin<"__nvvm_sust_b_2d_v4i8_zero">;
3983
def int_nvvm_sust_b_2d_v4i16_zero
3984
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
3985
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
3986
              "llvm.nvvm.sust.b.2d.v4i16.zero">,
3987
    ClangBuiltin<"__nvvm_sust_b_2d_v4i16_zero">;
3988
def int_nvvm_sust_b_2d_v4i32_zero
3989
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
3990
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
3991
              "llvm.nvvm.sust.b.2d.v4i32.zero">,
3992
    ClangBuiltin<"__nvvm_sust_b_2d_v4i32_zero">;
3993
 
3994
 
3995
def int_nvvm_sust_b_2d_array_i8_zero
3996
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
3997
                   llvm_i32_ty, llvm_i16_ty], [],
3998
              "llvm.nvvm.sust.b.2d.array.i8.zero">,
3999
    ClangBuiltin<"__nvvm_sust_b_2d_array_i8_zero">;
4000
def int_nvvm_sust_b_2d_array_i16_zero
4001
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4002
                   llvm_i32_ty, llvm_i16_ty], [],
4003
              "llvm.nvvm.sust.b.2d.array.i16.zero">,
4004
    ClangBuiltin<"__nvvm_sust_b_2d_array_i16_zero">;
4005
def int_nvvm_sust_b_2d_array_i32_zero
4006
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4007
                   llvm_i32_ty, llvm_i32_ty], [],
4008
              "llvm.nvvm.sust.b.2d.array.i32.zero">,
4009
    ClangBuiltin<"__nvvm_sust_b_2d_array_i32_zero">;
4010
def int_nvvm_sust_b_2d_array_i64_zero
4011
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4012
                   llvm_i32_ty, llvm_i64_ty], [],
4013
              "llvm.nvvm.sust.b.2d.array.i64.zero">,
4014
    ClangBuiltin<"__nvvm_sust_b_2d_array_i64_zero">;
4015
def int_nvvm_sust_b_2d_array_v2i8_zero
4016
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4017
                   llvm_i16_ty, llvm_i16_ty], [],
4018
              "llvm.nvvm.sust.b.2d.array.v2i8.zero">,
4019
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i8_zero">;
4020
def int_nvvm_sust_b_2d_array_v2i16_zero
4021
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4022
                   llvm_i16_ty, llvm_i16_ty], [],
4023
              "llvm.nvvm.sust.b.2d.array.v2i16.zero">,
4024
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i16_zero">;
4025
def int_nvvm_sust_b_2d_array_v2i32_zero
4026
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4027
                   llvm_i32_ty, llvm_i32_ty], [],
4028
              "llvm.nvvm.sust.b.2d.array.v2i32.zero">,
4029
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i32_zero">;
4030
def int_nvvm_sust_b_2d_array_v2i64_zero
4031
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4032
                   llvm_i64_ty, llvm_i64_ty], [],
4033
              "llvm.nvvm.sust.b.2d.array.v2i64.zero">,
4034
    ClangBuiltin<"__nvvm_sust_b_2d_array_v2i64_zero">;
4035
def int_nvvm_sust_b_2d_array_v4i8_zero
4036
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4037
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4038
              "llvm.nvvm.sust.b.2d.array.v4i8.zero">,
4039
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i8_zero">;
4040
def int_nvvm_sust_b_2d_array_v4i16_zero
4041
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4042
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4043
              "llvm.nvvm.sust.b.2d.array.v4i16.zero">,
4044
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i16_zero">;
4045
def int_nvvm_sust_b_2d_array_v4i32_zero
4046
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4047
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4048
              "llvm.nvvm.sust.b.2d.array.v4i32.zero">,
4049
    ClangBuiltin<"__nvvm_sust_b_2d_array_v4i32_zero">;
4050
 
4051
 
4052
def int_nvvm_sust_b_3d_i8_zero
4053
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4054
                   llvm_i32_ty, llvm_i16_ty], [],
4055
              "llvm.nvvm.sust.b.3d.i8.zero">,
4056
    ClangBuiltin<"__nvvm_sust_b_3d_i8_zero">;
4057
def int_nvvm_sust_b_3d_i16_zero
4058
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4059
                   llvm_i32_ty, llvm_i16_ty], [],
4060
              "llvm.nvvm.sust.b.3d.i16.zero">,
4061
    ClangBuiltin<"__nvvm_sust_b_3d_i16_zero">;
4062
def int_nvvm_sust_b_3d_i32_zero
4063
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4064
                   llvm_i32_ty, llvm_i32_ty], [],
4065
              "llvm.nvvm.sust.b.3d.i32.zero">,
4066
    ClangBuiltin<"__nvvm_sust_b_3d_i32_zero">;
4067
def int_nvvm_sust_b_3d_i64_zero
4068
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4069
                   llvm_i32_ty, llvm_i64_ty], [],
4070
              "llvm.nvvm.sust.b.3d.i64.zero">,
4071
    ClangBuiltin<"__nvvm_sust_b_3d_i64_zero">;
4072
def int_nvvm_sust_b_3d_v2i8_zero
4073
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4074
                   llvm_i16_ty, llvm_i16_ty], [],
4075
              "llvm.nvvm.sust.b.3d.v2i8.zero">,
4076
    ClangBuiltin<"__nvvm_sust_b_3d_v2i8_zero">;
4077
def int_nvvm_sust_b_3d_v2i16_zero
4078
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4079
                   llvm_i16_ty, llvm_i16_ty], [],
4080
              "llvm.nvvm.sust.b.3d.v2i16.zero">,
4081
    ClangBuiltin<"__nvvm_sust_b_3d_v2i16_zero">;
4082
def int_nvvm_sust_b_3d_v2i32_zero
4083
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4084
                   llvm_i32_ty, llvm_i32_ty], [],
4085
              "llvm.nvvm.sust.b.3d.v2i32.zero">,
4086
    ClangBuiltin<"__nvvm_sust_b_3d_v2i32_zero">;
4087
def int_nvvm_sust_b_3d_v2i64_zero
4088
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4089
                   llvm_i64_ty, llvm_i64_ty], [],
4090
              "llvm.nvvm.sust.b.3d.v2i64.zero">,
4091
    ClangBuiltin<"__nvvm_sust_b_3d_v2i64_zero">;
4092
def int_nvvm_sust_b_3d_v4i8_zero
4093
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4094
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4095
              "llvm.nvvm.sust.b.3d.v4i8.zero">,
4096
    ClangBuiltin<"__nvvm_sust_b_3d_v4i8_zero">;
4097
def int_nvvm_sust_b_3d_v4i16_zero
4098
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4099
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4100
              "llvm.nvvm.sust.b.3d.v4i16.zero">,
4101
    ClangBuiltin<"__nvvm_sust_b_3d_v4i16_zero">;
4102
def int_nvvm_sust_b_3d_v4i32_zero
4103
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4104
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4105
              "llvm.nvvm.sust.b.3d.v4i32.zero">,
4106
    ClangBuiltin<"__nvvm_sust_b_3d_v4i32_zero">;
4107
 
4108
 
4109
 
4110
// Formatted
4111
 
4112
def int_nvvm_sust_p_1d_i8_trap
4113
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
4114
              "llvm.nvvm.sust.p.1d.i8.trap">,
4115
    ClangBuiltin<"__nvvm_sust_p_1d_i8_trap">;
4116
def int_nvvm_sust_p_1d_i16_trap
4117
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [],
4118
              "llvm.nvvm.sust.p.1d.i16.trap">,
4119
    ClangBuiltin<"__nvvm_sust_p_1d_i16_trap">;
4120
def int_nvvm_sust_p_1d_i32_trap
4121
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [],
4122
              "llvm.nvvm.sust.p.1d.i32.trap">,
4123
    ClangBuiltin<"__nvvm_sust_p_1d_i32_trap">;
4124
def int_nvvm_sust_p_1d_v2i8_trap
4125
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
4126
              "llvm.nvvm.sust.p.1d.v2i8.trap">,
4127
    ClangBuiltin<"__nvvm_sust_p_1d_v2i8_trap">;
4128
def int_nvvm_sust_p_1d_v2i16_trap
4129
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [],
4130
              "llvm.nvvm.sust.p.1d.v2i16.trap">,
4131
    ClangBuiltin<"__nvvm_sust_p_1d_v2i16_trap">;
4132
def int_nvvm_sust_p_1d_v2i32_trap
4133
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4134
              "llvm.nvvm.sust.p.1d.v2i32.trap">,
4135
    ClangBuiltin<"__nvvm_sust_p_1d_v2i32_trap">;
4136
def int_nvvm_sust_p_1d_v4i8_trap
4137
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
4138
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4139
              "llvm.nvvm.sust.p.1d.v4i8.trap">,
4140
    ClangBuiltin<"__nvvm_sust_p_1d_v4i8_trap">;
4141
def int_nvvm_sust_p_1d_v4i16_trap
4142
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty,
4143
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4144
              "llvm.nvvm.sust.p.1d.v4i16.trap">,
4145
    ClangBuiltin<"__nvvm_sust_p_1d_v4i16_trap">;
4146
def int_nvvm_sust_p_1d_v4i32_trap
4147
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4148
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4149
              "llvm.nvvm.sust.p.1d.v4i32.trap">,
4150
    ClangBuiltin<"__nvvm_sust_p_1d_v4i32_trap">;
4151
 
4152
 
4153
def int_nvvm_sust_p_1d_array_i8_trap
4154
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
4155
              "llvm.nvvm.sust.p.1d.array.i8.trap">,
4156
    ClangBuiltin<"__nvvm_sust_p_1d_array_i8_trap">;
4157
def int_nvvm_sust_p_1d_array_i16_trap
4158
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
4159
              "llvm.nvvm.sust.p.1d.array.i16.trap">,
4160
    ClangBuiltin<"__nvvm_sust_p_1d_array_i16_trap">;
4161
def int_nvvm_sust_p_1d_array_i32_trap
4162
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4163
              "llvm.nvvm.sust.p.1d.array.i32.trap">,
4164
    ClangBuiltin<"__nvvm_sust_p_1d_array_i32_trap">;
4165
def int_nvvm_sust_p_1d_array_v2i8_trap
4166
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4167
                   llvm_i16_ty, llvm_i16_ty], [],
4168
              "llvm.nvvm.sust.p.1d.array.v2i8.trap">,
4169
    ClangBuiltin<"__nvvm_sust_p_1d_array_v2i8_trap">;
4170
def int_nvvm_sust_p_1d_array_v2i16_trap
4171
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4172
                   llvm_i16_ty, llvm_i16_ty], [],
4173
              "llvm.nvvm.sust.p.1d.array.v2i16.trap">,
4174
    ClangBuiltin<"__nvvm_sust_p_1d_array_v2i16_trap">;
4175
def int_nvvm_sust_p_1d_array_v2i32_trap
4176
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4177
                   llvm_i32_ty, llvm_i32_ty], [],
4178
              "llvm.nvvm.sust.p.1d.array.v2i32.trap">,
4179
    ClangBuiltin<"__nvvm_sust_p_1d_array_v2i32_trap">;
4180
def int_nvvm_sust_p_1d_array_v4i8_trap
4181
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
4182
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4183
              "llvm.nvvm.sust.p.1d.array.v4i8.trap">,
4184
    ClangBuiltin<"__nvvm_sust_p_1d_array_v4i8_trap">;
4185
def int_nvvm_sust_p_1d_array_v4i16_trap
4186
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
4187
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4188
              "llvm.nvvm.sust.p.1d.array.v4i16.trap">,
4189
    ClangBuiltin<"__nvvm_sust_p_1d_array_v4i16_trap">;
4190
def int_nvvm_sust_p_1d_array_v4i32_trap
4191
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4192
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4193
              "llvm.nvvm.sust.p.1d.array.v4i32.trap">,
4194
    ClangBuiltin<"__nvvm_sust_p_1d_array_v4i32_trap">;
4195
 
4196
 
4197
def int_nvvm_sust_p_2d_i8_trap
4198
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
4199
              "llvm.nvvm.sust.p.2d.i8.trap">,
4200
    ClangBuiltin<"__nvvm_sust_p_2d_i8_trap">;
4201
def int_nvvm_sust_p_2d_i16_trap
4202
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [],
4203
              "llvm.nvvm.sust.p.2d.i16.trap">,
4204
    ClangBuiltin<"__nvvm_sust_p_2d_i16_trap">;
4205
def int_nvvm_sust_p_2d_i32_trap
4206
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4207
              "llvm.nvvm.sust.p.2d.i32.trap">,
4208
    ClangBuiltin<"__nvvm_sust_p_2d_i32_trap">;
4209
def int_nvvm_sust_p_2d_v2i8_trap
4210
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4211
                   llvm_i16_ty, llvm_i16_ty], [],
4212
              "llvm.nvvm.sust.p.2d.v2i8.trap">,
4213
    ClangBuiltin<"__nvvm_sust_p_2d_v2i8_trap">;
4214
def int_nvvm_sust_p_2d_v2i16_trap
4215
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4216
                   llvm_i16_ty, llvm_i16_ty], [],
4217
              "llvm.nvvm.sust.p.2d.v2i16.trap">,
4218
    ClangBuiltin<"__nvvm_sust_p_2d_v2i16_trap">;
4219
def int_nvvm_sust_p_2d_v2i32_trap
4220
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4221
                   llvm_i32_ty, llvm_i32_ty], [],
4222
              "llvm.nvvm.sust.p.2d.v2i32.trap">,
4223
    ClangBuiltin<"__nvvm_sust_p_2d_v2i32_trap">;
4224
def int_nvvm_sust_p_2d_v4i8_trap
4225
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
4226
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4227
              "llvm.nvvm.sust.p.2d.v4i8.trap">,
4228
    ClangBuiltin<"__nvvm_sust_p_2d_v4i8_trap">;
4229
def int_nvvm_sust_p_2d_v4i16_trap
4230
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty,
4231
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4232
              "llvm.nvvm.sust.p.2d.v4i16.trap">,
4233
    ClangBuiltin<"__nvvm_sust_p_2d_v4i16_trap">;
4234
def int_nvvm_sust_p_2d_v4i32_trap
4235
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4236
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4237
              "llvm.nvvm.sust.p.2d.v4i32.trap">,
4238
    ClangBuiltin<"__nvvm_sust_p_2d_v4i32_trap">;
4239
 
4240
 
4241
def int_nvvm_sust_p_2d_array_i8_trap
4242
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4243
                   llvm_i32_ty, llvm_i16_ty], [],
4244
              "llvm.nvvm.sust.p.2d.array.i8.trap">,
4245
    ClangBuiltin<"__nvvm_sust_p_2d_array_i8_trap">;
4246
def int_nvvm_sust_p_2d_array_i16_trap
4247
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4248
                   llvm_i32_ty, llvm_i16_ty], [],
4249
              "llvm.nvvm.sust.p.2d.array.i16.trap">,
4250
    ClangBuiltin<"__nvvm_sust_p_2d_array_i16_trap">;
4251
def int_nvvm_sust_p_2d_array_i32_trap
4252
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4253
                   llvm_i32_ty, llvm_i32_ty], [],
4254
              "llvm.nvvm.sust.p.2d.array.i32.trap">,
4255
    ClangBuiltin<"__nvvm_sust_p_2d_array_i32_trap">;
4256
def int_nvvm_sust_p_2d_array_v2i8_trap
4257
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4258
                   llvm_i16_ty, llvm_i16_ty], [],
4259
              "llvm.nvvm.sust.p.2d.array.v2i8.trap">,
4260
    ClangBuiltin<"__nvvm_sust_p_2d_array_v2i8_trap">;
4261
def int_nvvm_sust_p_2d_array_v2i16_trap
4262
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4263
                   llvm_i16_ty, llvm_i16_ty], [],
4264
              "llvm.nvvm.sust.p.2d.array.v2i16.trap">,
4265
    ClangBuiltin<"__nvvm_sust_p_2d_array_v2i16_trap">;
4266
def int_nvvm_sust_p_2d_array_v2i32_trap
4267
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4268
                   llvm_i32_ty, llvm_i32_ty], [],
4269
              "llvm.nvvm.sust.p.2d.array.v2i32.trap">,
4270
    ClangBuiltin<"__nvvm_sust_p_2d_array_v2i32_trap">;
4271
def int_nvvm_sust_p_2d_array_v4i8_trap
4272
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4273
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4274
              "llvm.nvvm.sust.p.2d.array.v4i8.trap">,
4275
    ClangBuiltin<"__nvvm_sust_p_2d_array_v4i8_trap">;
4276
def int_nvvm_sust_p_2d_array_v4i16_trap
4277
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4278
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4279
              "llvm.nvvm.sust.p.2d.array.v4i16.trap">,
4280
    ClangBuiltin<"__nvvm_sust_p_2d_array_v4i16_trap">;
4281
def int_nvvm_sust_p_2d_array_v4i32_trap
4282
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4283
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4284
              "llvm.nvvm.sust.p.2d.array.v4i32.trap">,
4285
    ClangBuiltin<"__nvvm_sust_p_2d_array_v4i32_trap">;
4286
 
4287
 
4288
def int_nvvm_sust_p_3d_i8_trap
4289
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4290
                   llvm_i32_ty, llvm_i16_ty], [],
4291
              "llvm.nvvm.sust.p.3d.i8.trap">,
4292
    ClangBuiltin<"__nvvm_sust_p_3d_i8_trap">;
4293
def int_nvvm_sust_p_3d_i16_trap
4294
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4295
                   llvm_i32_ty, llvm_i16_ty], [],
4296
              "llvm.nvvm.sust.p.3d.i16.trap">,
4297
    ClangBuiltin<"__nvvm_sust_p_3d_i16_trap">;
4298
def int_nvvm_sust_p_3d_i32_trap
4299
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty,
4300
                   llvm_i32_ty, llvm_i32_ty], [],
4301
              "llvm.nvvm.sust.p.3d.i32.trap">,
4302
    ClangBuiltin<"__nvvm_sust_p_3d_i32_trap">;
4303
def int_nvvm_sust_p_3d_v2i8_trap
4304
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4305
                   llvm_i16_ty, llvm_i16_ty], [],
4306
              "llvm.nvvm.sust.p.3d.v2i8.trap">,
4307
    ClangBuiltin<"__nvvm_sust_p_3d_v2i8_trap">;
4308
def int_nvvm_sust_p_3d_v2i16_trap
4309
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4310
                   llvm_i16_ty, llvm_i16_ty], [],
4311
              "llvm.nvvm.sust.p.3d.v2i16.trap">,
4312
    ClangBuiltin<"__nvvm_sust_p_3d_v2i16_trap">;
4313
def int_nvvm_sust_p_3d_v2i32_trap
4314
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4315
                   llvm_i32_ty, llvm_i32_ty], [],
4316
              "llvm.nvvm.sust.p.3d.v2i32.trap">,
4317
    ClangBuiltin<"__nvvm_sust_p_3d_v2i32_trap">;
4318
def int_nvvm_sust_p_3d_v4i8_trap
4319
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4320
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4321
              "llvm.nvvm.sust.p.3d.v4i8.trap">,
4322
    ClangBuiltin<"__nvvm_sust_p_3d_v4i8_trap">;
4323
def int_nvvm_sust_p_3d_v4i16_trap
4324
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4325
                   llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [],
4326
              "llvm.nvvm.sust.p.3d.v4i16.trap">,
4327
    ClangBuiltin<"__nvvm_sust_p_3d_v4i16_trap">;
4328
def int_nvvm_sust_p_3d_v4i32_trap
4329
  : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty,
4330
                   llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [],
4331
              "llvm.nvvm.sust.p.3d.v4i32.trap">,
4332
    ClangBuiltin<"__nvvm_sust_p_3d_v4i32_trap">;
4333
 
4334
 
4335
def int_nvvm_rotate_b32
4336
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4337
              [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.b32">,
4338
              ClangBuiltin<"__nvvm_rotate_b32">;
4339
 
4340
def int_nvvm_rotate_b64
4341
  : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty],
4342
             [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.b64">,
4343
             ClangBuiltin<"__nvvm_rotate_b64">;
4344
 
4345
def int_nvvm_rotate_right_b64
4346
  : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty],
4347
              [IntrNoMem, IntrSpeculatable], "llvm.nvvm.rotate.right.b64">,
4348
              ClangBuiltin<"__nvvm_rotate_right_b64">;
4349
 
4350
def int_nvvm_swap_lo_hi_b64
4351
  : DefaultAttrsIntrinsic<[llvm_i64_ty], [llvm_i64_ty],
4352
              [IntrNoMem, IntrSpeculatable], "llvm.nvvm.swap.lo.hi.b64">,
4353
              ClangBuiltin<"__nvvm_swap_lo_hi_b64">;
4354
 
4355
 
4356
// Accessing special registers.
4357
multiclass PTXReadSRegIntrinsic_v4i32<string regname> {
4358
// FIXME: Do we need the 128-bit integer type version?
4359
//    def _r64   : Intrinsic<[llvm_i128_ty],   [], [IntrNoMem, IntrSpeculatable]>;
4360
 
4361
// FIXME: Enable this once v4i32 support is enabled in back-end.
4362
//    def _v4i16 : Intrinsic<[llvm_v4i32_ty], [], [IntrNoMem, IntrSpeculatable]>;
4363
 
4364
  def _x     : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
4365
               ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_x">;
4366
  def _y     : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
4367
               ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_y">;
4368
  def _z     : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
4369
               ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_z">;
4370
  def _w     : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
4371
               ClangBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_w">;
4372
}
4373
 
4374
class PTXReadSRegIntrinsic_r32<string name>
4375
  : DefaultAttrsIntrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrSpeculatable]>,
4376
    ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
4377
class PTXReadSRegIntrinsic_r64<string name>
4378
  : DefaultAttrsIntrinsic<[llvm_i64_ty], [], [IntrNoMem, IntrSpeculatable]>,
4379
    ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
4380
 
4381
// Intrinsics to read registers with non-constant values. E.g. the values that
4382
// do change over the kernel lifetime. Such reads should not be CSE'd.
4383
class PTXReadNCSRegIntrinsic_r32<string name>
4384
  : Intrinsic<[llvm_i32_ty], [], [IntrInaccessibleMemOnly, IntrNoCallback]>,
4385
    ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
4386
class PTXReadNCSRegIntrinsic_r64<string name>
4387
  : Intrinsic<[llvm_i64_ty], [], [IntrInaccessibleMemOnly, IntrNoCallback]>,
4388
    ClangBuiltin<"__nvvm_read_ptx_sreg_" # name>;
4389
 
4390
defm int_nvvm_read_ptx_sreg_tid : PTXReadSRegIntrinsic_v4i32<"tid">;
4391
defm int_nvvm_read_ptx_sreg_ntid : PTXReadSRegIntrinsic_v4i32<"ntid">;
4392
 
4393
def int_nvvm_read_ptx_sreg_laneid : PTXReadSRegIntrinsic_r32<"laneid">;
4394
def int_nvvm_read_ptx_sreg_warpid : PTXReadSRegIntrinsic_r32<"warpid">;
4395
def int_nvvm_read_ptx_sreg_nwarpid : PTXReadSRegIntrinsic_r32<"nwarpid">;
4396
 
4397
defm int_nvvm_read_ptx_sreg_ctaid : PTXReadSRegIntrinsic_v4i32<"ctaid">;
4398
defm int_nvvm_read_ptx_sreg_nctaid : PTXReadSRegIntrinsic_v4i32<"nctaid">;
4399
 
4400
def int_nvvm_read_ptx_sreg_smid : PTXReadSRegIntrinsic_r32<"smid">;
4401
def int_nvvm_read_ptx_sreg_nsmid : PTXReadSRegIntrinsic_r32<"nsmid">;
4402
def int_nvvm_read_ptx_sreg_gridid : PTXReadSRegIntrinsic_r32<"gridid">;
4403
 
4404
def int_nvvm_read_ptx_sreg_lanemask_eq :
4405
    PTXReadSRegIntrinsic_r32<"lanemask_eq">;
4406
def int_nvvm_read_ptx_sreg_lanemask_le :
4407
    PTXReadSRegIntrinsic_r32<"lanemask_le">;
4408
def int_nvvm_read_ptx_sreg_lanemask_lt :
4409
    PTXReadSRegIntrinsic_r32<"lanemask_lt">;
4410
def int_nvvm_read_ptx_sreg_lanemask_ge :
4411
    PTXReadSRegIntrinsic_r32<"lanemask_ge">;
4412
def int_nvvm_read_ptx_sreg_lanemask_gt :
4413
    PTXReadSRegIntrinsic_r32<"lanemask_gt">;
4414
 
4415
def int_nvvm_read_ptx_sreg_clock : PTXReadNCSRegIntrinsic_r32<"clock">;
4416
def int_nvvm_read_ptx_sreg_clock64 : PTXReadNCSRegIntrinsic_r64<"clock64">;
4417
 
4418
def int_nvvm_read_ptx_sreg_pm0 : PTXReadNCSRegIntrinsic_r32<"pm0">;
4419
def int_nvvm_read_ptx_sreg_pm1 : PTXReadNCSRegIntrinsic_r32<"pm1">;
4420
def int_nvvm_read_ptx_sreg_pm2 : PTXReadNCSRegIntrinsic_r32<"pm2">;
4421
def int_nvvm_read_ptx_sreg_pm3 : PTXReadNCSRegIntrinsic_r32<"pm3">;
4422
 
4423
def int_nvvm_read_ptx_sreg_warpsize : PTXReadSRegIntrinsic_r32<"warpsize">;
4424
 
4425
//
4426
// SHUFFLE
4427
//
4428
// Generate intrinsics for all variants of shfl instruction.
4429
foreach sync = [false, true] in {
4430
  foreach mode = ["up", "down", "bfly", "idx"] in {
4431
    foreach type = ["i32", "f32"] in {
4432
      foreach return_pred = [false, true] in {
4433
        foreach i = [SHFL_INFO<sync, mode, type, return_pred>] in {
4434
          if i.withGccBuiltin then {
4435
            def i.Name : ClangBuiltin<i.Builtin>,
4436
                         Intrinsic<i.RetTy, i.ArgsTy,
4437
                                   [IntrInaccessibleMemOnly, IntrConvergent,
4438
                                   IntrNoCallback],
4439
                                   i.IntrName>;
4440
          }
4441
          if i.withoutGccBuiltin then {
4442
            def i.Name : Intrinsic<i.RetTy, i.ArgsTy,
4443
                         [IntrInaccessibleMemOnly, IntrConvergent,
4444
                         IntrNoCallback], i.IntrName>;
4445
          }
4446
        }
4447
      }
4448
    }
4449
  }
4450
}
4451
 
4452
//
4453
// VOTE
4454
//
4455
 
4456
// vote.all pred
4457
def int_nvvm_vote_all :
4458
  Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
4459
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.all">,
4460
  ClangBuiltin<"__nvvm_vote_all">;
4461
// vote.any pred
4462
def int_nvvm_vote_any :
4463
  Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
4464
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.any">,
4465
  ClangBuiltin<"__nvvm_vote_any">;
4466
// vote.uni pred
4467
def int_nvvm_vote_uni :
4468
  Intrinsic<[llvm_i1_ty], [llvm_i1_ty],
4469
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.uni">,
4470
  ClangBuiltin<"__nvvm_vote_uni">;
4471
// vote.ballot pred
4472
def int_nvvm_vote_ballot :
4473
  Intrinsic<[llvm_i32_ty], [llvm_i1_ty],
4474
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.ballot">,
4475
  ClangBuiltin<"__nvvm_vote_ballot">;
4476
 
4477
//
4478
// VOTE.SYNC
4479
//
4480
 
4481
// vote.sync.all mask, pred
4482
def int_nvvm_vote_all_sync :
4483
  Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
4484
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.all.sync">,
4485
  ClangBuiltin<"__nvvm_vote_all_sync">;
4486
// vote.sync.any mask, pred
4487
def int_nvvm_vote_any_sync :
4488
  Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
4489
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.any.sync">,
4490
  ClangBuiltin<"__nvvm_vote_any_sync">;
4491
// vote.sync.uni mask, pred
4492
def int_nvvm_vote_uni_sync :
4493
  Intrinsic<[llvm_i1_ty], [llvm_i32_ty, llvm_i1_ty],
4494
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.uni.sync">,
4495
  ClangBuiltin<"__nvvm_vote_uni_sync">;
4496
// vote.sync.ballot mask, pred
4497
def int_nvvm_vote_ballot_sync :
4498
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i1_ty],
4499
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.vote.ballot.sync">,
4500
  ClangBuiltin<"__nvvm_vote_ballot_sync">;
4501
 
4502
//
4503
// MATCH.SYNC
4504
//
4505
// match.any.sync.b32 mask, value
4506
def int_nvvm_match_any_sync_i32 :
4507
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4508
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.any.sync.i32">,
4509
  ClangBuiltin<"__nvvm_match_any_sync_i32">;
4510
// match.any.sync.b64 mask, value
4511
def int_nvvm_match_any_sync_i64 :
4512
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty],
4513
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.any.sync.i64">,
4514
  ClangBuiltin<"__nvvm_match_any_sync_i64">;
4515
 
4516
// match.all instruction have two variants -- one returns a single value, another
4517
// returns a pair {value, predicate}. We currently only implement the latter as
4518
// that's the variant exposed by CUDA API.
4519
 
4520
// match.all.sync.b32p mask, value
4521
def int_nvvm_match_all_sync_i32p :
4522
  Intrinsic<[llvm_i32_ty, llvm_i1_ty], [llvm_i32_ty, llvm_i32_ty],
4523
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.all.sync.i32p">;
4524
// match.all.sync.b64p mask, value
4525
def int_nvvm_match_all_sync_i64p :
4526
  Intrinsic<[llvm_i32_ty, llvm_i1_ty], [llvm_i32_ty, llvm_i64_ty],
4527
            [IntrInaccessibleMemOnly, IntrConvergent, IntrNoCallback], "llvm.nvvm.match.all.sync.i64p">;
4528
 
4529
//
4530
// REDUX.SYNC
4531
//
4532
// redux.sync.min.u32 dst, src, membermask;
4533
def int_nvvm_redux_sync_umin : ClangBuiltin<"__nvvm_redux_sync_umin">,
4534
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4535
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4536
 
4537
// redux.sync.max.u32 dst, src, membermask;
4538
def int_nvvm_redux_sync_umax : ClangBuiltin<"__nvvm_redux_sync_umax">,
4539
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4540
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4541
 
4542
// redux.sync.add.s32 dst, src, membermask;
4543
def int_nvvm_redux_sync_add : ClangBuiltin<"__nvvm_redux_sync_add">,
4544
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4545
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4546
 
4547
// redux.sync.min.s32 dst, src, membermask;
4548
def int_nvvm_redux_sync_min : ClangBuiltin<"__nvvm_redux_sync_min">,
4549
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4550
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4551
 
4552
// redux.sync.max.s32 dst, src, membermask;
4553
def int_nvvm_redux_sync_max : ClangBuiltin<"__nvvm_redux_sync_max">,
4554
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4555
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4556
 
4557
// redux.sync.and.b32 dst, src, membermask;
4558
def int_nvvm_redux_sync_and : ClangBuiltin<"__nvvm_redux_sync_and">,
4559
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4560
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4561
 
4562
// redux.sync.xor.b32 dst, src, membermask;
4563
def int_nvvm_redux_sync_xor : ClangBuiltin<"__nvvm_redux_sync_xor">,
4564
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4565
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4566
 
4567
// redux.sync.or.b32 dst, src, membermask;
4568
def int_nvvm_redux_sync_or : ClangBuiltin<"__nvvm_redux_sync_or">,
4569
  Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
4570
            [IntrConvergent, IntrInaccessibleMemOnly, IntrNoCallback]>;
4571
 
4572
//
4573
// WMMA instructions
4574
//
4575
// WMMA.LOAD
4576
class NVVM_WMMA_LD<WMMA_REGS Frag, string Layout, int WithStride>
4577
  : Intrinsic<Frag.regs,
4578
              !if(WithStride, [llvm_anyptr_ty, llvm_i32_ty], [llvm_anyptr_ty]),
4579
              [IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
4580
              WMMA_NAME_LDST<"load", Frag, Layout, WithStride>.intr>;
4581
 
4582
// WMMA.STORE.D
4583
class NVVM_WMMA_ST<WMMA_REGS Frag, string Layout, int WithStride>
4584
  : Intrinsic<[],
4585
              !listconcat(
4586
                [llvm_anyptr_ty],
4587
                Frag.regs,
4588
                !if(WithStride, [llvm_i32_ty], [])),
4589
              [IntrWriteMem, IntrArgMemOnly, IntrNoCallback, WriteOnly<ArgIndex<0>>, NoCapture<ArgIndex<0>>],
4590
              WMMA_NAME_LDST<"store", Frag, Layout, WithStride>.intr>;
4591
 
4592
// Create all load/store variants
4593
foreach layout = ["row", "col"] in {
4594
  foreach stride = [0, 1] in {
4595
    foreach frag = NVVM_MMA_OPS.all_ld_ops in
4596
      if NVVM_WMMA_LDST_SUPPORTED<frag, layout>.ret then
4597
        def WMMA_NAME_LDST<"load", frag, layout, stride>.record
4598
             : NVVM_WMMA_LD<frag, layout, stride>;
4599
    foreach frag = NVVM_MMA_OPS.all_st_ops in
4600
      if NVVM_WMMA_LDST_SUPPORTED<frag, layout>.ret then
4601
        def WMMA_NAME_LDST<"store", frag, layout, stride>.record
4602
             : NVVM_WMMA_ST<frag, layout, stride>;
4603
  }
4604
}
4605
 
4606
// WMMA.MMA
4607
class NVVM_WMMA_MMA<string ALayout, string BLayout, int Satfinite, string rnd, string b1op,
4608
                    WMMA_REGS A, WMMA_REGS B,
4609
                    WMMA_REGS C, WMMA_REGS D>
4610
  : Intrinsic<D.regs,
4611
              !listconcat(A.regs, B.regs, C.regs),
4612
              [IntrNoMem, IntrNoCallback],
4613
              WMMA_NAME<ALayout, BLayout, Satfinite, rnd, b1op, A, B, C, D>.llvm>;
4614
 
4615
foreach layout_a = ["row", "col"] in {
4616
  foreach layout_b = ["row", "col"] in {
4617
    foreach satf = [0, 1] in {
4618
      foreach rnd = ["", "rn", "rz", "rm", "rp"] in {
4619
        foreach op = NVVM_MMA_OPS.all_wmma_ops in {
4620
          foreach b1op = NVVM_MMA_B1OPS<op>.ret in {
4621
            if NVVM_WMMA_SUPPORTED<op, layout_a, layout_b, satf, rnd>.ret then {
4622
              def WMMA_NAME<layout_a, layout_b, satf, rnd, b1op,
4623
                                op[0], op[1], op[2], op[3]>.record
4624
                : NVVM_WMMA_MMA<layout_a, layout_b, satf, rnd, b1op,
4625
                                op[0], op[1], op[2], op[3]>;
4626
            }
4627
          } // b1op
4628
        } // op
4629
      } // rnd
4630
    } // satf
4631
  } // layout_b
4632
} // layout_a
4633
 
4634
// MMA
4635
class NVVM_MMA<string ALayout, string BLayout, int Satfinite, string b1op,
4636
               WMMA_REGS A, WMMA_REGS B, WMMA_REGS C, WMMA_REGS D>
4637
  : Intrinsic<D.regs,
4638
              !listconcat(A.regs, B.regs, C.regs),
4639
              [IntrNoMem, IntrNoCallback],
4640
              MMA_NAME<ALayout, BLayout, Satfinite, b1op, A, B, C, D>.llvm>;
4641
 
4642
foreach layout_a = ["row", "col"] in {
4643
  foreach layout_b = ["row", "col"] in {
4644
    foreach satf = [0, 1] in {
4645
      foreach op = NVVM_MMA_OPS.all_mma_ops in {
4646
        foreach b1op = NVVM_MMA_B1OPS<op>.ret in {
4647
          if NVVM_MMA_SUPPORTED<op, layout_a, layout_b, satf>.ret then {
4648
            def MMA_NAME<layout_a, layout_b, satf, b1op, op[0], op[1], op[2], op[3]>.record
4649
              : NVVM_MMA<layout_a, layout_b, satf, b1op, op[0], op[1], op[2], op[3]>;
4650
          }
4651
        } // b1op
4652
      } // op
4653
    } // satf
4654
  } // layout_b
4655
} // layout_a
4656
 
4657
// LDMATRIX
4658
class NVVM_LDMATRIX<WMMA_REGS Frag, int Transposed>
4659
  : Intrinsic<Frag.regs, [llvm_anyptr_ty],
4660
              [IntrReadMem, IntrArgMemOnly, IntrNoCallback, ReadOnly<ArgIndex<0>>,
4661
               NoCapture<ArgIndex<0>>],
4662
              LDMATRIX_NAME<Frag, Transposed>.intr>;
4663
 
4664
foreach transposed = [0, 1] in {
4665
  foreach frag = NVVM_MMA_OPS.all_ldmatrix_ops in {
4666
    if NVVM_LDMATRIX_SUPPORTED<frag>.ret then {
4667
      def LDMATRIX_NAME<frag, transposed>.record
4668
        : NVVM_LDMATRIX<frag, transposed>;
4669
    }
4670
  }
4671
}
4672
 
4673
} // let TargetPrefix = "nvvm"