xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td (revision 1db9f3b21e39176dd5b67cf8ac378633b172463e)
1//===-- AMDGPUSearchableTables.td - ------------------------*- 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//===----------------------------------------------------------------------===//
10// Resource intrinsics table.
11//===----------------------------------------------------------------------===//
12
13class RsrcIntrinsic<AMDGPURsrcIntrinsic intr> {
14  Intrinsic Intr = !cast<Intrinsic>(intr);
15  bits<8> RsrcArg = intr.RsrcArg;
16  bit IsImage = intr.IsImage;
17}
18
19def RsrcIntrinsics : GenericTable {
20  let FilterClass = "RsrcIntrinsic";
21  let Fields = ["Intr", "RsrcArg", "IsImage"];
22
23  let PrimaryKey = ["Intr"];
24  let PrimaryKeyName = "lookupRsrcIntrinsic";
25}
26
27foreach intr = !listconcat(AMDGPUBufferIntrinsics,
28                           AMDGPUImageDimIntrinsics,
29                           AMDGPUImageDimAtomicIntrinsics) in {
30  def : RsrcIntrinsic<!cast<AMDGPURsrcIntrinsic>(intr)>;
31}
32
33class GcnBufferFormatBase<bits<8> f, bits<8> bpc, bits<8> numc, bits<8> nfmt, bits<8> dfmt> {
34  bits<8> Format = f;
35  bits<8> BitsPerComp = bpc;
36  bits<8> NumComponents = numc;
37  bits<8> NumFormat = nfmt;
38  bits<8> DataFormat = dfmt;
39}
40
41class Gfx9BufferFormat<bits<8> f, bits<8> bpc, bits<8> numc, bits<8> nfmt, bits<8> dfmt> : GcnBufferFormatBase<f, bpc, numc, nfmt, dfmt>;
42class Gfx10BufferFormat<bits<8> f, bits<8> bpc, bits<8> numc, bits<8> nfmt, bits<8> dfmt> : GcnBufferFormatBase<f, bpc, numc, nfmt, dfmt>;
43class Gfx11PlusBufferFormat<bits<8> f, bits<8> bpc, bits<8> numc, bits<8> nfmt, bits<8> dfmt> : GcnBufferFormatBase<f, bpc, numc, nfmt, dfmt>;
44
45class GcnBufferFormatTable  : GenericTable {
46  let CppTypeName = "GcnBufferFormatInfo";
47  let Fields = ["Format", "BitsPerComp", "NumComponents", "NumFormat", "DataFormat"];
48  let PrimaryKey = ["BitsPerComp", "NumComponents", "NumFormat"];
49}
50
51def Gfx9BufferFormat : GcnBufferFormatTable {
52  let FilterClass = "Gfx9BufferFormat";
53  let PrimaryKeyName = "getGfx9BufferFormatInfo";
54}
55def Gfx10BufferFormat : GcnBufferFormatTable {
56  let FilterClass = "Gfx10BufferFormat";
57  let PrimaryKeyName = "getGfx10BufferFormatInfo";
58}
59def Gfx11PlusBufferFormat : GcnBufferFormatTable {
60  let FilterClass = "Gfx11PlusBufferFormat";
61  let PrimaryKeyName = "getGfx11PlusBufferFormatInfo";
62}
63
64def getGfx9BufferFormatInfo : SearchIndex {
65  let Table = Gfx9BufferFormat;
66  let Key = ["Format"];
67}
68def getGfx10BufferFormatInfo : SearchIndex {
69  let Table = Gfx10BufferFormat;
70  let Key = ["Format"];
71}
72def getGfx11PlusBufferFormatInfo : SearchIndex {
73  let Table = Gfx11PlusBufferFormat;
74  let Key = ["Format"];
75}
76
77// Buffer formats with equal component sizes (GFX9 and earlier)
78def : Gfx9BufferFormat< /*FORMAT_8_UNORM*/              0x01,  8, 1, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8*/            1>;
79def : Gfx9BufferFormat< /*FORMAT_8_SNORM*/              0x11,  8, 1, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8*/            1>;
80def : Gfx9BufferFormat< /*FORMAT_8_USCALED*/            0x21,  8, 1, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8*/            1>;
81def : Gfx9BufferFormat< /*FORMAT_8_SSCALED*/            0x31,  8, 1, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8*/            1>;
82def : Gfx9BufferFormat< /*FORMAT_8_UINT*/               0x41,  8, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8*/            1>;
83def : Gfx9BufferFormat< /*FORMAT_8_SINT*/               0x51,  8, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8*/            1>;
84def : Gfx9BufferFormat< /*FORMAT_16_UNORM*/             0x02, 16, 1, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16*/           2>;
85def : Gfx9BufferFormat< /*FORMAT_16_SNORM*/             0x12, 16, 1, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16*/           2>;
86def : Gfx9BufferFormat< /*FORMAT_16_USCALED*/           0x22, 16, 1, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16*/           2>;
87def : Gfx9BufferFormat< /*FORMAT_16_SSCALED*/           0x32, 16, 1, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16*/           2>;
88def : Gfx9BufferFormat< /*FORMAT_16_UINT*/              0x42, 16, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16*/           2>;
89def : Gfx9BufferFormat< /*FORMAT_16_SINT*/              0x52, 16, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16*/           2>;
90def : Gfx9BufferFormat< /*FORMAT_16_FLOAT*/             0x72, 16, 1, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16*/           2>;
91def : Gfx9BufferFormat< /*FORMAT_8_8_UNORM*/            0x03,  8, 2, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8_8*/          3>;
92def : Gfx9BufferFormat< /*FORMAT_8_8_SNORM*/            0x13,  8, 2, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8_8*/          3>;
93def : Gfx9BufferFormat< /*FORMAT_8_8_USCALED*/          0x23,  8, 2, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8_8*/          3>;
94def : Gfx9BufferFormat< /*FORMAT_8_8_SSCALED*/          0x33,  8, 2, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8_8*/          3>;
95def : Gfx9BufferFormat< /*FORMAT_8_8_UINT*/             0x43,  8, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8_8*/          3>;
96def : Gfx9BufferFormat< /*FORMAT_8_8_SINT*/             0x53,  8, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8_8*/          3>;
97def : Gfx9BufferFormat< /*FORMAT_32_UINT*/              0x44, 32, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32*/           4>;
98def : Gfx9BufferFormat< /*FORMAT_32_SINT*/              0x54, 32, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32*/           4>;
99def : Gfx9BufferFormat< /*FORMAT_32_FLOAT*/             0x74, 32, 1, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32*/           4>;
100def : Gfx9BufferFormat< /*FORMAT_16_16_UNORM*/          0x05, 16, 2, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16_16*/        5>;
101def : Gfx9BufferFormat< /*FORMAT_16_16_SNORM*/          0x15, 16, 2, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16_16*/        5>;
102def : Gfx9BufferFormat< /*FORMAT_16_16_USCALED*/        0x25, 16, 2, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16_16*/        5>;
103def : Gfx9BufferFormat< /*FORMAT_16_16_SSCALED*/        0x35, 16, 2, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16_16*/        5>;
104def : Gfx9BufferFormat< /*FORMAT_16_16_UINT*/           0x45, 16, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16_16*/        5>;
105def : Gfx9BufferFormat< /*FORMAT_16_16_SINT*/           0x55, 16, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16_16*/        5>;
106def : Gfx9BufferFormat< /*FORMAT_16_16_FLOAT*/          0x75, 16, 2, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16_16*/        5>;
107def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_UNORM*/        0x0A,  8, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8_8_8_8*/     10>;
108def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_SNORM*/        0x1A,  8, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8_8_8_8*/     10>;
109def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_USCALED*/      0x2A,  8, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8_8_8_8*/     10>;
110def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_SSCALED*/      0x3A,  8, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8_8_8_8*/     10>;
111def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_UINT*/         0x4A,  8, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8_8_8_8*/     10>;
112def : Gfx9BufferFormat< /*FORMAT_8_8_8_8_SINT*/         0x5A,  8, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8_8_8_8*/     10>;
113def : Gfx9BufferFormat< /*FORMAT_32_32_UINT*/           0x4B, 32, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32*/       11>;
114def : Gfx9BufferFormat< /*FORMAT_32_32_SINT*/           0x5B, 32, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32*/       11>;
115def : Gfx9BufferFormat< /*FORMAT_32_32_FLOAT*/          0x7B, 32, 2, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32*/       11>;
116def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_UNORM*/    0x0C, 16, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16_16_16_16*/ 12>;
117def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_SNORM*/    0x1C, 16, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16_16_16_16*/ 12>;
118def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_USCALED*/  0x2C, 16, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16_16_16_16*/ 12>;
119def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_SSCALED*/  0x3C, 16, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16_16_16_16*/ 12>;
120def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_UINT*/     0x4C, 16, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16_16_16_16*/ 12>;
121def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_SINT*/     0x5C, 16, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16_16_16_16*/ 12>;
122def : Gfx9BufferFormat< /*FORMAT_16_16_16_16_FLOAT*/    0x7C, 16, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16_16_16_16*/ 12>;
123def : Gfx9BufferFormat< /*FORMAT_32_32_32_UINT*/        0x4D, 32, 3, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32*/    13>;
124def : Gfx9BufferFormat< /*FORMAT_32_32_32_SINT*/        0x5D, 32, 3, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32*/    13>;
125def : Gfx9BufferFormat< /*FORMAT_32_32_32_FLOAT*/       0x7D, 32, 3, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32*/    13>;
126def : Gfx9BufferFormat< /*FORMAT_32_32_32_32_UINT*/     0x4E, 32, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32_32*/ 14>;
127def : Gfx9BufferFormat< /*FORMAT_32_32_32_32_SINT*/     0x5E, 32, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32_32*/ 14>;
128def : Gfx9BufferFormat< /*FORMAT_32_32_32_32_FLOAT*/    0x7E, 32, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32_32*/ 14>;
129
130// Buffer formats with equal component sizes (GFX10 and later)
131multiclass Gfx10PlusBufferFormat<bits<8> f, bits<8> bpc, bits<8> numc, bits<8> nfmt, bits<8> dfmt> {
132  def : Gfx10BufferFormat<f, bpc, numc, nfmt, dfmt>;
133  def : Gfx11PlusBufferFormat<f, bpc, numc, nfmt, dfmt>;
134}
135defm : Gfx10PlusBufferFormat< /*FORMAT_8_UNORM*/              0x01,  8, 1, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8*/            1>;
136defm : Gfx10PlusBufferFormat< /*FORMAT_8_SNORM*/              0x02,  8, 1, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8*/            1>;
137defm : Gfx10PlusBufferFormat< /*FORMAT_8_USCALED*/            0x03,  8, 1, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8*/            1>;
138defm : Gfx10PlusBufferFormat< /*FORMAT_8_SSCALED*/            0x04,  8, 1, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8*/            1>;
139defm : Gfx10PlusBufferFormat< /*FORMAT_8_UINT*/               0x05,  8, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8*/            1>;
140defm : Gfx10PlusBufferFormat< /*FORMAT_8_SINT*/               0x06,  8, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8*/            1>;
141defm : Gfx10PlusBufferFormat< /*FORMAT_16_UNORM*/             0x07, 16, 1, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16*/           2>;
142defm : Gfx10PlusBufferFormat< /*FORMAT_16_SNORM*/             0x08, 16, 1, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16*/           2>;
143defm : Gfx10PlusBufferFormat< /*FORMAT_16_USCALED*/           0x09, 16, 1, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16*/           2>;
144defm : Gfx10PlusBufferFormat< /*FORMAT_16_SSCALED*/           0x0A, 16, 1, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16*/           2>;
145defm : Gfx10PlusBufferFormat< /*FORMAT_16_UINT*/              0x0B, 16, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16*/           2>;
146defm : Gfx10PlusBufferFormat< /*FORMAT_16_SINT*/              0x0C, 16, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16*/           2>;
147defm : Gfx10PlusBufferFormat< /*FORMAT_16_FLOAT*/             0x0D, 16, 1, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16*/           2>;
148defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_UNORM*/            0x0E,  8, 2, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8_8*/          3>;
149defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_SNORM*/            0x0F,  8, 2, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8_8*/          3>;
150defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_USCALED*/          0x10,  8, 2, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8_8*/          3>;
151defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_SSCALED*/          0x11,  8, 2, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8_8*/          3>;
152defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_UINT*/             0x12,  8, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8_8*/          3>;
153defm : Gfx10PlusBufferFormat< /*FORMAT_8_8_SINT*/             0x13,  8, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8_8*/          3>;
154defm : Gfx10PlusBufferFormat< /*FORMAT_32_UINT*/              0x14, 32, 1, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32*/           4>;
155defm : Gfx10PlusBufferFormat< /*FORMAT_32_SINT*/              0x15, 32, 1, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32*/           4>;
156defm : Gfx10PlusBufferFormat< /*FORMAT_32_FLOAT*/             0x16, 32, 1, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32*/           4>;
157defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_UNORM*/          0x17, 16, 2, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16_16*/        5>;
158defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_SNORM*/          0x18, 16, 2, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16_16*/        5>;
159defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_USCALED*/        0x19, 16, 2, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16_16*/        5>;
160defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_SSCALED*/        0x1A, 16, 2, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16_16*/        5>;
161defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_UINT*/           0x1B, 16, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16_16*/        5>;
162defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_SINT*/           0x1C, 16, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16_16*/        5>;
163defm : Gfx10PlusBufferFormat< /*FORMAT_16_16_FLOAT*/          0x1D, 16, 2, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16_16*/        5>;
164
165// Buffer formats with equal component sizes (GFX10 only)
166def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_UNORM*/        0x38,  8, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8_8_8_8*/     10>;
167def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_SNORM*/        0x39,  8, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8_8_8_8*/     10>;
168def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_USCALED*/      0x3A,  8, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8_8_8_8*/     10>;
169def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_SSCALED*/      0x3B,  8, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8_8_8_8*/     10>;
170def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_UINT*/         0x3C,  8, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8_8_8_8*/     10>;
171def : Gfx10BufferFormat< /*FORMAT_8_8_8_8_SINT*/         0x3D,  8, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8_8_8_8*/     10>;
172def : Gfx10BufferFormat< /*FORMAT_32_32_UINT*/           0x3E, 32, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32*/       11>;
173def : Gfx10BufferFormat< /*FORMAT_32_32_SINT*/           0x3F, 32, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32*/       11>;
174def : Gfx10BufferFormat< /*FORMAT_32_32_FLOAT*/          0x40, 32, 2, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32*/       11>;
175def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_UNORM*/    0x41, 16, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16_16_16_16*/ 12>;
176def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_SNORM*/    0x42, 16, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16_16_16_16*/ 12>;
177def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_USCALED*/  0x43, 16, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16_16_16_16*/ 12>;
178def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_SSCALED*/  0x44, 16, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16_16_16_16*/ 12>;
179def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_UINT*/     0x45, 16, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16_16_16_16*/ 12>;
180def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_SINT*/     0x46, 16, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16_16_16_16*/ 12>;
181def : Gfx10BufferFormat< /*FORMAT_16_16_16_16_FLOAT*/    0x47, 16, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16_16_16_16*/ 12>;
182def : Gfx10BufferFormat< /*FORMAT_32_32_32_UINT*/        0x48, 32, 3, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32*/    13>;
183def : Gfx10BufferFormat< /*FORMAT_32_32_32_SINT*/        0x49, 32, 3, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32*/    13>;
184def : Gfx10BufferFormat< /*FORMAT_32_32_32_FLOAT*/       0x4A, 32, 3, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32*/    13>;
185def : Gfx10BufferFormat< /*FORMAT_32_32_32_32_UINT*/     0x4B, 32, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32_32*/ 14>;
186def : Gfx10BufferFormat< /*FORMAT_32_32_32_32_SINT*/     0x4C, 32, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32_32*/ 14>;
187def : Gfx10BufferFormat< /*FORMAT_32_32_32_32_FLOAT*/    0x4D, 32, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32_32*/ 14>;
188
189// Buffer formats with equal component sizes (GFX11 and later)
190def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_UNORM*/        0x2A,  8, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_8_8_8_8*/     10>;
191def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_SNORM*/        0x2B,  8, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_8_8_8_8*/     10>;
192def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_USCALED*/      0x2C,  8, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_8_8_8_8*/     10>;
193def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_SSCALED*/      0x2D,  8, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_8_8_8_8*/     10>;
194def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_UINT*/         0x2E,  8, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_8_8_8_8*/     10>;
195def : Gfx11PlusBufferFormat< /*FORMAT_8_8_8_8_SINT*/         0x2F,  8, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_8_8_8_8*/     10>;
196def : Gfx11PlusBufferFormat< /*FORMAT_32_32_UINT*/           0x30, 32, 2, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32*/       11>;
197def : Gfx11PlusBufferFormat< /*FORMAT_32_32_SINT*/           0x31, 32, 2, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32*/       11>;
198def : Gfx11PlusBufferFormat< /*FORMAT_32_32_FLOAT*/          0x32, 32, 2, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32*/       11>;
199def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_UNORM*/    0x33, 16, 4, /*NUM_FORMAT_UNORM*/   0, /*DATA_FORMAT_16_16_16_16*/ 12>;
200def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_SNORM*/    0x34, 16, 4, /*NUM_FORMAT_SNORM*/   1, /*DATA_FORMAT_16_16_16_16*/ 12>;
201def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_USCALED*/  0x35, 16, 4, /*NUM_FORMAT_USCALED*/ 2, /*DATA_FORMAT_16_16_16_16*/ 12>;
202def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_SSCALED*/  0x36, 16, 4, /*NUM_FORMAT_SSCALED*/ 3, /*DATA_FORMAT_16_16_16_16*/ 12>;
203def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_UINT*/     0x37, 16, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_16_16_16_16*/ 12>;
204def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_SINT*/     0x38, 16, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_16_16_16_16*/ 12>;
205def : Gfx11PlusBufferFormat< /*FORMAT_16_16_16_16_FLOAT*/    0x39, 16, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_16_16_16_16*/ 12>;
206def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_UINT*/        0x3A, 32, 3, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32*/    13>;
207def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_SINT*/        0x3B, 32, 3, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32*/    13>;
208def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_FLOAT*/       0x3C, 32, 3, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32*/    13>;
209def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_32_UINT*/     0x3D, 32, 4, /*NUM_FORMAT_UINT*/    4, /*DATA_FORMAT_32_32_32_32*/ 14>;
210def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_32_SINT*/     0x3E, 32, 4, /*NUM_FORMAT_SINT*/    5, /*DATA_FORMAT_32_32_32_32*/ 14>;
211def : Gfx11PlusBufferFormat< /*FORMAT_32_32_32_32_FLOAT*/    0x3F, 32, 4, /*NUM_FORMAT_FLOAT*/   7, /*DATA_FORMAT_32_32_32_32*/ 14>;
212
213class SourceOfDivergence<Intrinsic intr> {
214  Intrinsic Intr = intr;
215}
216
217def SourcesOfDivergence : GenericTable {
218  let FilterClass = "SourceOfDivergence";
219  let Fields = ["Intr"];
220
221  let PrimaryKey = ["Intr"];
222  let PrimaryKeyName = "lookupSourceOfDivergence";
223}
224
225def : SourceOfDivergence<int_amdgcn_workitem_id_x>;
226def : SourceOfDivergence<int_amdgcn_workitem_id_y>;
227def : SourceOfDivergence<int_amdgcn_workitem_id_z>;
228def : SourceOfDivergence<int_amdgcn_interp_mov>;
229def : SourceOfDivergence<int_amdgcn_interp_p1>;
230def : SourceOfDivergence<int_amdgcn_interp_p2>;
231def : SourceOfDivergence<int_amdgcn_interp_p1_f16>;
232def : SourceOfDivergence<int_amdgcn_interp_p2_f16>;
233def : SourceOfDivergence<int_amdgcn_lds_direct_load>;
234def : SourceOfDivergence<int_amdgcn_lds_param_load>;
235def : SourceOfDivergence<int_amdgcn_mbcnt_hi>;
236def : SourceOfDivergence<int_amdgcn_mbcnt_lo>;
237def : SourceOfDivergence<int_r600_read_tidig_x>;
238def : SourceOfDivergence<int_r600_read_tidig_y>;
239def : SourceOfDivergence<int_r600_read_tidig_z>;
240def : SourceOfDivergence<int_amdgcn_global_atomic_csub>;
241def : SourceOfDivergence<int_amdgcn_global_atomic_fadd>;
242def : SourceOfDivergence<int_amdgcn_global_atomic_fmin>;
243def : SourceOfDivergence<int_amdgcn_global_atomic_fmax>;
244def : SourceOfDivergence<int_amdgcn_global_atomic_fmin_num>;
245def : SourceOfDivergence<int_amdgcn_global_atomic_fmax_num>;
246def : SourceOfDivergence<int_amdgcn_global_atomic_ordered_add_b64>;
247def : SourceOfDivergence<int_amdgcn_flat_atomic_fadd>;
248def : SourceOfDivergence<int_amdgcn_flat_atomic_fmin>;
249def : SourceOfDivergence<int_amdgcn_flat_atomic_fmax>;
250def : SourceOfDivergence<int_amdgcn_flat_atomic_fmin_num>;
251def : SourceOfDivergence<int_amdgcn_flat_atomic_fmax_num>;
252def : SourceOfDivergence<int_amdgcn_global_atomic_fadd_v2bf16>;
253def : SourceOfDivergence<int_amdgcn_flat_atomic_fadd_v2bf16>;
254def : SourceOfDivergence<int_amdgcn_ds_fadd>;
255def : SourceOfDivergence<int_amdgcn_ds_fmin>;
256def : SourceOfDivergence<int_amdgcn_ds_fmax>;
257def : SourceOfDivergence<int_amdgcn_ds_fadd_v2bf16>;
258def : SourceOfDivergence<int_amdgcn_buffer_atomic_swap>;
259def : SourceOfDivergence<int_amdgcn_buffer_atomic_add>;
260def : SourceOfDivergence<int_amdgcn_buffer_atomic_sub>;
261def : SourceOfDivergence<int_amdgcn_buffer_atomic_smin>;
262def : SourceOfDivergence<int_amdgcn_buffer_atomic_umin>;
263def : SourceOfDivergence<int_amdgcn_buffer_atomic_smax>;
264def : SourceOfDivergence<int_amdgcn_buffer_atomic_umax>;
265def : SourceOfDivergence<int_amdgcn_buffer_atomic_and>;
266def : SourceOfDivergence<int_amdgcn_buffer_atomic_or>;
267def : SourceOfDivergence<int_amdgcn_buffer_atomic_xor>;
268def : SourceOfDivergence<int_amdgcn_buffer_atomic_cmpswap>;
269def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_swap>;
270def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_add>;
271def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_sub>;
272def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_smin>;
273def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_umin>;
274def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_smax>;
275def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_umax>;
276def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_and>;
277def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_or>;
278def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_xor>;
279def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_inc>;
280def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_dec>;
281def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fadd>;
282def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fmin>;
283def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fmax>;
284def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_cmpswap>;
285def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_swap>;
286def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_add>;
287def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_sub>;
288def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_smin>;
289def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_umin>;
290def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_smax>;
291def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_umax>;
292def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_and>;
293def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_or>;
294def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_xor>;
295def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_inc>;
296def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_dec>;
297def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fadd>;
298def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fmin>;
299def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fmax>;
300def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_cmpswap>;
301def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_swap>;
302def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_add>;
303def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_sub>;
304def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_smin>;
305def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_umin>;
306def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_smax>;
307def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_umax>;
308def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_and>;
309def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_or>;
310def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_xor>;
311def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_inc>;
312def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_dec>;
313def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fadd>;
314def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fmin>;
315def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fmax>;
316def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_cmpswap>;
317def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_swap>;
318def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_add>;
319def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_sub>;
320def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_smin>;
321def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_umin>;
322def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_smax>;
323def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_umax>;
324def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_and>;
325def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_or>;
326def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_xor>;
327def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_inc>;
328def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_dec>;
329def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fadd>;
330def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fmin>;
331def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fmax>;
332def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_cmpswap>;
333def : SourceOfDivergence<int_amdgcn_buffer_atomic_csub>;
334def : SourceOfDivergence<int_amdgcn_ps_live>;
335def : SourceOfDivergence<int_amdgcn_live_mask>;
336def : SourceOfDivergence<int_amdgcn_ds_swizzle>;
337def : SourceOfDivergence<int_amdgcn_ds_ordered_add>;
338def : SourceOfDivergence<int_amdgcn_ds_ordered_swap>;
339def : SourceOfDivergence<int_amdgcn_permlane16>;
340def : SourceOfDivergence<int_amdgcn_permlanex16>;
341def : SourceOfDivergence<int_amdgcn_permlane16_var>;
342def : SourceOfDivergence<int_amdgcn_permlanex16_var>;
343def : SourceOfDivergence<int_amdgcn_mov_dpp>;
344def : SourceOfDivergence<int_amdgcn_mov_dpp8>;
345def : SourceOfDivergence<int_amdgcn_update_dpp>;
346def : SourceOfDivergence<int_amdgcn_writelane>;
347
348def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x1f32>;
349def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x1f32>;
350def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x4f16>;
351def : SourceOfDivergence<int_amdgcn_mfma_i32_4x4x4i8>;
352def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x2bf16>;
353def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x1f32>;
354def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4f32>;
355def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4f16>;
356def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x16f16>;
357def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x4i8>;
358def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x16i8>;
359def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x2bf16>;
360def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x8bf16>;
361def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x1f32>;
362def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x2f32>;
363def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4f16>;
364def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x8f16>;
365def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x4i8>;
366def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x8i8>;
367def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x2bf16>;
368def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4bf16>;
369def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4bf16_1k>;
370def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4bf16_1k>;
371def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x4bf16_1k>;
372def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x8bf16_1k>;
373def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x16bf16_1k>;
374def : SourceOfDivergence<int_amdgcn_mfma_f64_16x16x4f64>;
375def : SourceOfDivergence<int_amdgcn_mfma_f64_4x4x4f64>;
376def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x32_i8>;
377def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x16_i8>;
378def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x8_xf32>;
379def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4_xf32>;
380def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_bf8_bf8>;
381def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_bf8_fp8>;
382def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_fp8_bf8>;
383def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_fp8_fp8>;
384def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_bf8_bf8>;
385def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_bf8_fp8>;
386def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_fp8_bf8>;
387def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_fp8_fp8>;
388def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x32_f16>;
389def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x16_f16>;
390def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x32_bf16>;
391def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x16_bf16>;
392def : SourceOfDivergence<int_amdgcn_smfmac_i32_16x16x64_i8>;
393def : SourceOfDivergence<int_amdgcn_smfmac_i32_32x32x32_i8>;
394def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_bf8_bf8>;
395def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_bf8_fp8>;
396def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_fp8_bf8>;
397def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_fp8_fp8>;
398def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_bf8_bf8>;
399def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_bf8_fp8>;
400def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_fp8_bf8>;
401def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_fp8_fp8>;
402def : SourceOfDivergence<int_amdgcn_wmma_f32_16x16x16_f16>;
403def : SourceOfDivergence<int_amdgcn_wmma_f32_16x16x16_bf16>;
404def : SourceOfDivergence<int_amdgcn_wmma_f16_16x16x16_f16>;
405def : SourceOfDivergence<int_amdgcn_wmma_bf16_16x16x16_bf16>;
406def : SourceOfDivergence<int_amdgcn_wmma_i32_16x16x16_iu8>;
407def : SourceOfDivergence<int_amdgcn_wmma_i32_16x16x16_iu4>;
408
409// The dummy boolean output is divergent from the IR's perspective,
410// but the mask results are uniform. These produce a divergent and
411// uniform result, so the returned struct is collectively divergent.
412// isAlwaysUniform can override the extract of the uniform component.
413def : SourceOfDivergence<int_amdgcn_if>;
414def : SourceOfDivergence<int_amdgcn_else>;
415def : SourceOfDivergence<int_amdgcn_loop>;
416def : SourceOfDivergence<int_amdgcn_inverse_ballot>;
417
418foreach intr = AMDGPUImageDimAtomicIntrinsics in
419def : SourceOfDivergence<intr>;
420
421class AlwaysUniform<Intrinsic intr> {
422  Intrinsic Intr = intr;
423}
424
425def UniformIntrinsics : GenericTable {
426  let FilterClass = "AlwaysUniform";
427  let Fields = ["Intr"];
428
429  let PrimaryKey = ["Intr"];
430  let PrimaryKeyName = "lookupAlwaysUniform";
431}
432
433def : AlwaysUniform<int_amdgcn_readfirstlane>;
434def : AlwaysUniform<int_amdgcn_readlane>;
435def : AlwaysUniform<int_amdgcn_icmp>;
436def : AlwaysUniform<int_amdgcn_fcmp>;
437def : AlwaysUniform<int_amdgcn_ballot>;
438def : AlwaysUniform<int_amdgcn_if_break>;
439