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_flat_atomic_fadd>; 245def : SourceOfDivergence<int_amdgcn_flat_atomic_fmin>; 246def : SourceOfDivergence<int_amdgcn_flat_atomic_fmax>; 247def : SourceOfDivergence<int_amdgcn_global_atomic_fadd_v2bf16>; 248def : SourceOfDivergence<int_amdgcn_flat_atomic_fadd_v2bf16>; 249def : SourceOfDivergence<int_amdgcn_ds_fadd>; 250def : SourceOfDivergence<int_amdgcn_ds_fmin>; 251def : SourceOfDivergence<int_amdgcn_ds_fmax>; 252def : SourceOfDivergence<int_amdgcn_ds_fadd_v2bf16>; 253def : SourceOfDivergence<int_amdgcn_buffer_atomic_swap>; 254def : SourceOfDivergence<int_amdgcn_buffer_atomic_add>; 255def : SourceOfDivergence<int_amdgcn_buffer_atomic_sub>; 256def : SourceOfDivergence<int_amdgcn_buffer_atomic_smin>; 257def : SourceOfDivergence<int_amdgcn_buffer_atomic_umin>; 258def : SourceOfDivergence<int_amdgcn_buffer_atomic_smax>; 259def : SourceOfDivergence<int_amdgcn_buffer_atomic_umax>; 260def : SourceOfDivergence<int_amdgcn_buffer_atomic_and>; 261def : SourceOfDivergence<int_amdgcn_buffer_atomic_or>; 262def : SourceOfDivergence<int_amdgcn_buffer_atomic_xor>; 263def : SourceOfDivergence<int_amdgcn_buffer_atomic_cmpswap>; 264def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_swap>; 265def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_add>; 266def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_sub>; 267def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_smin>; 268def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_umin>; 269def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_smax>; 270def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_umax>; 271def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_and>; 272def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_or>; 273def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_xor>; 274def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_inc>; 275def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_dec>; 276def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fadd>; 277def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fmin>; 278def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_fmax>; 279def : SourceOfDivergence<int_amdgcn_raw_buffer_atomic_cmpswap>; 280def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_swap>; 281def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_add>; 282def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_sub>; 283def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_smin>; 284def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_umin>; 285def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_smax>; 286def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_umax>; 287def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_and>; 288def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_or>; 289def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_xor>; 290def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_inc>; 291def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_dec>; 292def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fadd>; 293def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fmin>; 294def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_fmax>; 295def : SourceOfDivergence<int_amdgcn_raw_ptr_buffer_atomic_cmpswap>; 296def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_swap>; 297def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_add>; 298def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_sub>; 299def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_smin>; 300def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_umin>; 301def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_smax>; 302def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_umax>; 303def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_and>; 304def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_or>; 305def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_xor>; 306def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_inc>; 307def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_dec>; 308def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fadd>; 309def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fmin>; 310def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_fmax>; 311def : SourceOfDivergence<int_amdgcn_struct_buffer_atomic_cmpswap>; 312def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_swap>; 313def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_add>; 314def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_sub>; 315def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_smin>; 316def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_umin>; 317def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_smax>; 318def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_umax>; 319def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_and>; 320def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_or>; 321def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_xor>; 322def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_inc>; 323def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_dec>; 324def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fadd>; 325def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fmin>; 326def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_fmax>; 327def : SourceOfDivergence<int_amdgcn_struct_ptr_buffer_atomic_cmpswap>; 328def : SourceOfDivergence<int_amdgcn_buffer_atomic_csub>; 329def : SourceOfDivergence<int_amdgcn_ps_live>; 330def : SourceOfDivergence<int_amdgcn_live_mask>; 331def : SourceOfDivergence<int_amdgcn_ds_swizzle>; 332def : SourceOfDivergence<int_amdgcn_ds_ordered_add>; 333def : SourceOfDivergence<int_amdgcn_ds_ordered_swap>; 334def : SourceOfDivergence<int_amdgcn_permlane16>; 335def : SourceOfDivergence<int_amdgcn_permlanex16>; 336def : SourceOfDivergence<int_amdgcn_mov_dpp>; 337def : SourceOfDivergence<int_amdgcn_mov_dpp8>; 338def : SourceOfDivergence<int_amdgcn_update_dpp>; 339def : SourceOfDivergence<int_amdgcn_writelane>; 340 341def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x1f32>; 342def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x1f32>; 343def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x4f16>; 344def : SourceOfDivergence<int_amdgcn_mfma_i32_4x4x4i8>; 345def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x2bf16>; 346def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x1f32>; 347def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4f32>; 348def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4f16>; 349def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x16f16>; 350def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x4i8>; 351def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x16i8>; 352def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x2bf16>; 353def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x8bf16>; 354def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x1f32>; 355def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x2f32>; 356def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4f16>; 357def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x8f16>; 358def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x4i8>; 359def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x8i8>; 360def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x2bf16>; 361def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4bf16>; 362def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4bf16_1k>; 363def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x4bf16_1k>; 364def : SourceOfDivergence<int_amdgcn_mfma_f32_4x4x4bf16_1k>; 365def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x8bf16_1k>; 366def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x16bf16_1k>; 367def : SourceOfDivergence<int_amdgcn_mfma_f64_16x16x4f64>; 368def : SourceOfDivergence<int_amdgcn_mfma_f64_4x4x4f64>; 369def : SourceOfDivergence<int_amdgcn_mfma_i32_16x16x32_i8>; 370def : SourceOfDivergence<int_amdgcn_mfma_i32_32x32x16_i8>; 371def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x8_xf32>; 372def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x4_xf32>; 373def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_bf8_bf8>; 374def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_bf8_fp8>; 375def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_fp8_bf8>; 376def : SourceOfDivergence<int_amdgcn_mfma_f32_16x16x32_fp8_fp8>; 377def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_bf8_bf8>; 378def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_bf8_fp8>; 379def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_fp8_bf8>; 380def : SourceOfDivergence<int_amdgcn_mfma_f32_32x32x16_fp8_fp8>; 381def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x32_f16>; 382def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x16_f16>; 383def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x32_bf16>; 384def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x16_bf16>; 385def : SourceOfDivergence<int_amdgcn_smfmac_i32_16x16x64_i8>; 386def : SourceOfDivergence<int_amdgcn_smfmac_i32_32x32x32_i8>; 387def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_bf8_bf8>; 388def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_bf8_fp8>; 389def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_fp8_bf8>; 390def : SourceOfDivergence<int_amdgcn_smfmac_f32_16x16x64_fp8_fp8>; 391def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_bf8_bf8>; 392def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_bf8_fp8>; 393def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_fp8_bf8>; 394def : SourceOfDivergence<int_amdgcn_smfmac_f32_32x32x32_fp8_fp8>; 395def : SourceOfDivergence<int_amdgcn_wmma_f32_16x16x16_f16>; 396def : SourceOfDivergence<int_amdgcn_wmma_f32_16x16x16_bf16>; 397def : SourceOfDivergence<int_amdgcn_wmma_f16_16x16x16_f16>; 398def : SourceOfDivergence<int_amdgcn_wmma_bf16_16x16x16_bf16>; 399def : SourceOfDivergence<int_amdgcn_wmma_i32_16x16x16_iu8>; 400def : SourceOfDivergence<int_amdgcn_wmma_i32_16x16x16_iu4>; 401 402// The dummy boolean output is divergent from the IR's perspective, 403// but the mask results are uniform. These produce a divergent and 404// uniform result, so the returned struct is collectively divergent. 405// isAlwaysUniform can override the extract of the uniform component. 406def : SourceOfDivergence<int_amdgcn_if>; 407def : SourceOfDivergence<int_amdgcn_else>; 408def : SourceOfDivergence<int_amdgcn_loop>; 409def : SourceOfDivergence<int_amdgcn_inverse_ballot>; 410 411foreach intr = AMDGPUImageDimAtomicIntrinsics in 412def : SourceOfDivergence<intr>; 413 414class AlwaysUniform<Intrinsic intr> { 415 Intrinsic Intr = intr; 416} 417 418def UniformIntrinsics : GenericTable { 419 let FilterClass = "AlwaysUniform"; 420 let Fields = ["Intr"]; 421 422 let PrimaryKey = ["Intr"]; 423 let PrimaryKeyName = "lookupAlwaysUniform"; 424} 425 426def : AlwaysUniform<int_amdgcn_readfirstlane>; 427def : AlwaysUniform<int_amdgcn_readlane>; 428def : AlwaysUniform<int_amdgcn_icmp>; 429def : AlwaysUniform<int_amdgcn_fcmp>; 430def : AlwaysUniform<int_amdgcn_ballot>; 431def : AlwaysUniform<int_amdgcn_if_break>; 432