1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX9 %s 3; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX10 %s 4; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX11 %s 5; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -show-mc-encoding < %s | FileCheck -check-prefixes=GFX12 %s 6 7define amdgpu_ps <4 x float> @load_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 8; GFX9-LABEL: load_1d: 9; GFX9: ; %bb.0: ; %main_body 10; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00] 11; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 12; GFX9-NEXT: ; return to shader part epilog 13; 14; GFX10-LABEL: load_1d: 15; GFX10: ; %bb.0: ; %main_body 16; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 17; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 18; GFX10-NEXT: ; return to shader part epilog 19; 20; GFX11-LABEL: load_1d: 21; GFX11: ; %bb.0: ; %main_body 22; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 23; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 24; GFX11-NEXT: ; return to shader part epilog 25; 26; GFX12-LABEL: load_1d: 27; GFX12: ; %bb.0: ; %main_body 28; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 29; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 30; GFX12-NEXT: ; return to shader part epilog 31main_body: 32 %s = extractelement <2 x i16> %coords, i32 0 33 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 34 ret <4 x float> %v 35} 36 37define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 38; GFX9-LABEL: load_2d: 39; GFX9: ; %bb.0: ; %main_body 40; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00] 41; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 42; GFX9-NEXT: ; return to shader part epilog 43; 44; GFX10-LABEL: load_2d: 45; GFX10: ; %bb.0: ; %main_body 46; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 47; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 48; GFX10-NEXT: ; return to shader part epilog 49; 50; GFX11-LABEL: load_2d: 51; GFX11: ; %bb.0: ; %main_body 52; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 53; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 54; GFX11-NEXT: ; return to shader part epilog 55; 56; GFX12-LABEL: load_2d: 57; GFX12: ; %bb.0: ; %main_body 58; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 59; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 60; GFX12-NEXT: ; return to shader part epilog 61main_body: 62 %s = extractelement <2 x i16> %coords, i32 0 63 %t = extractelement <2 x i16> %coords, i32 1 64 %v = call <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32 15, i16 %s, i16 %t, <8 x i32> %rsrc, i32 0, i32 0) 65 ret <4 x float> %v 66} 67 68define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 69; GFX9-LABEL: load_3d: 70; GFX9: ; %bb.0: ; %main_body 71; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00] 72; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 73; GFX9-NEXT: ; return to shader part epilog 74; 75; GFX10-LABEL: load_3d: 76; GFX10: ; %bb.0: ; %main_body 77; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 78; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 79; GFX10-NEXT: ; return to shader part epilog 80; 81; GFX11-LABEL: load_3d: 82; GFX11: ; %bb.0: ; %main_body 83; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 84; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 85; GFX11-NEXT: ; return to shader part epilog 86; 87; GFX12-LABEL: load_3d: 88; GFX12: ; %bb.0: ; %main_body 89; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 90; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 91; GFX12-NEXT: ; return to shader part epilog 92main_body: 93 %s = extractelement <2 x i16> %coords_lo, i32 0 94 %t = extractelement <2 x i16> %coords_lo, i32 1 95 %r = extractelement <2 x i16> %coords_hi, i32 0 96 %v = call <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %r, <8 x i32> %rsrc, i32 0, i32 0) 97 ret <4 x float> %v 98} 99 100define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 101; GFX9-LABEL: load_cube: 102; GFX9: ; %bb.0: ; %main_body 103; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00] 104; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 105; GFX9-NEXT: ; return to shader part epilog 106; 107; GFX10-LABEL: load_cube: 108; GFX10: ; %bb.0: ; %main_body 109; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 110; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 111; GFX10-NEXT: ; return to shader part epilog 112; 113; GFX11-LABEL: load_cube: 114; GFX11: ; %bb.0: ; %main_body 115; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 116; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 117; GFX11-NEXT: ; return to shader part epilog 118; 119; GFX12-LABEL: load_cube: 120; GFX12: ; %bb.0: ; %main_body 121; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 122; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 123; GFX12-NEXT: ; return to shader part epilog 124main_body: 125 %s = extractelement <2 x i16> %coords_lo, i32 0 126 %t = extractelement <2 x i16> %coords_lo, i32 1 127 %slice = extractelement <2 x i16> %coords_hi, i32 0 128 %v = call <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 129 ret <4 x float> %v 130} 131 132define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 133; GFX9-LABEL: load_1darray: 134; GFX9: ; %bb.0: ; %main_body 135; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00] 136; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 137; GFX9-NEXT: ; return to shader part epilog 138; 139; GFX10-LABEL: load_1darray: 140; GFX10: ; %bb.0: ; %main_body 141; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 142; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 143; GFX10-NEXT: ; return to shader part epilog 144; 145; GFX11-LABEL: load_1darray: 146; GFX11: ; %bb.0: ; %main_body 147; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 148; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 149; GFX11-NEXT: ; return to shader part epilog 150; 151; GFX12-LABEL: load_1darray: 152; GFX12: ; %bb.0: ; %main_body 153; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 154; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 155; GFX12-NEXT: ; return to shader part epilog 156main_body: 157 %s = extractelement <2 x i16> %coords, i32 0 158 %slice = extractelement <2 x i16> %coords, i32 1 159 %v = call <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32 15, i16 %s, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 160 ret <4 x float> %v 161} 162 163define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 164; GFX9-LABEL: load_2darray: 165; GFX9: ; %bb.0: ; %main_body 166; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00] 167; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 168; GFX9-NEXT: ; return to shader part epilog 169; 170; GFX10-LABEL: load_2darray: 171; GFX10: ; %bb.0: ; %main_body 172; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 173; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 174; GFX10-NEXT: ; return to shader part epilog 175; 176; GFX11-LABEL: load_2darray: 177; GFX11: ; %bb.0: ; %main_body 178; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 179; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 180; GFX11-NEXT: ; return to shader part epilog 181; 182; GFX12-LABEL: load_2darray: 183; GFX12: ; %bb.0: ; %main_body 184; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 185; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 186; GFX12-NEXT: ; return to shader part epilog 187main_body: 188 %s = extractelement <2 x i16> %coords_lo, i32 0 189 %t = extractelement <2 x i16> %coords_lo, i32 1 190 %slice = extractelement <2 x i16> %coords_hi, i32 0 191 %v = call <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 192 ret <4 x float> %v 193} 194 195define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 196; GFX9-LABEL: load_2dmsaa: 197; GFX9: ; %bb.0: ; %main_body 198; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x00,0x00,0x00,0x00] 199; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 200; GFX9-NEXT: ; return to shader part epilog 201; 202; GFX10-LABEL: load_2dmsaa: 203; GFX10: ; %bb.0: ; %main_body 204; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 205; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 206; GFX10-NEXT: ; return to shader part epilog 207; 208; GFX11-LABEL: load_2dmsaa: 209; GFX11: ; %bb.0: ; %main_body 210; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 211; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 212; GFX11-NEXT: ; return to shader part epilog 213; 214; GFX12-LABEL: load_2dmsaa: 215; GFX12: ; %bb.0: ; %main_body 216; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 217; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 218; GFX12-NEXT: ; return to shader part epilog 219main_body: 220 %s = extractelement <2 x i16> %coords_lo, i32 0 221 %t = extractelement <2 x i16> %coords_lo, i32 1 222 %fragid = extractelement <2 x i16> %coords_hi, i32 0 223 %v = call <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0) 224 ret <4 x float> %v 225} 226 227define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 228; GFX9-LABEL: load_2darraymsaa: 229; GFX9: ; %bb.0: ; %main_body 230; GFX9-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x00,0xf0,0x00,0x00,0x00,0x00] 231; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 232; GFX9-NEXT: ; return to shader part epilog 233; 234; GFX10-LABEL: load_2darraymsaa: 235; GFX10: ; %bb.0: ; %main_body 236; GFX10-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x00,0xf0,0x00,0x00,0x00,0x40] 237; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 238; GFX10-NEXT: ; return to shader part epilog 239; 240; GFX11-LABEL: load_2darraymsaa: 241; GFX11: ; %bb.0: ; %main_body 242; GFX11-NEXT: image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x01,0xf0,0x00,0x00,0x00,0x00] 243; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 244; GFX11-NEXT: ; return to shader part epilog 245; 246; GFX12-LABEL: load_2darraymsaa: 247; GFX12: ; %bb.0: ; %main_body 248; GFX12-NEXT: image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0x00,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 249; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 250; GFX12-NEXT: ; return to shader part epilog 251main_body: 252 %s = extractelement <2 x i16> %coords_lo, i32 0 253 %t = extractelement <2 x i16> %coords_lo, i32 1 254 %slice = extractelement <2 x i16> %coords_hi, i32 0 255 %fragid = extractelement <2 x i16> %coords_hi, i32 1 256 %v = call <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0) 257 ret <4 x float> %v 258} 259 260define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 261; GFX9-LABEL: load_mip_1d: 262; GFX9: ; %bb.0: ; %main_body 263; GFX9-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00] 264; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 265; GFX9-NEXT: ; return to shader part epilog 266; 267; GFX10-LABEL: load_mip_1d: 268; GFX10: ; %bb.0: ; %main_body 269; GFX10-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 270; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 271; GFX10-NEXT: ; return to shader part epilog 272; 273; GFX11-LABEL: load_mip_1d: 274; GFX11: ; %bb.0: ; %main_body 275; GFX11-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 276; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 277; GFX11-NEXT: ; return to shader part epilog 278; 279; GFX12-LABEL: load_mip_1d: 280; GFX12: ; %bb.0: ; %main_body 281; GFX12-NEXT: image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 282; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 283; GFX12-NEXT: ; return to shader part epilog 284main_body: 285 %s = extractelement <2 x i16> %coords, i32 0 286 %mip = extractelement <2 x i16> %coords, i32 1 287 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32 15, i16 %s, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 288 ret <4 x float> %v 289} 290 291define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 292; GFX9-LABEL: load_mip_2d: 293; GFX9: ; %bb.0: ; %main_body 294; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00] 295; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 296; GFX9-NEXT: ; return to shader part epilog 297; 298; GFX10-LABEL: load_mip_2d: 299; GFX10: ; %bb.0: ; %main_body 300; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 301; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 302; GFX10-NEXT: ; return to shader part epilog 303; 304; GFX11-LABEL: load_mip_2d: 305; GFX11: ; %bb.0: ; %main_body 306; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 307; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 308; GFX11-NEXT: ; return to shader part epilog 309; 310; GFX12-LABEL: load_mip_2d: 311; GFX12: ; %bb.0: ; %main_body 312; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 313; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 314; GFX12-NEXT: ; return to shader part epilog 315main_body: 316 %s = extractelement <2 x i16> %coords_lo, i32 0 317 %t = extractelement <2 x i16> %coords_lo, i32 1 318 %mip = extractelement <2 x i16> %coords_hi, i32 0 319 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 320 ret <4 x float> %v 321} 322 323define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 324; GFX9-LABEL: load_mip_3d: 325; GFX9: ; %bb.0: ; %main_body 326; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x04,0xf0,0x00,0x00,0x00,0x00] 327; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 328; GFX9-NEXT: ; return to shader part epilog 329; 330; GFX10-LABEL: load_mip_3d: 331; GFX10: ; %bb.0: ; %main_body 332; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 333; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 334; GFX10-NEXT: ; return to shader part epilog 335; 336; GFX11-LABEL: load_mip_3d: 337; GFX11: ; %bb.0: ; %main_body 338; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 339; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 340; GFX11-NEXT: ; return to shader part epilog 341; 342; GFX12-LABEL: load_mip_3d: 343; GFX12: ; %bb.0: ; %main_body 344; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 345; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 346; GFX12-NEXT: ; return to shader part epilog 347main_body: 348 %s = extractelement <2 x i16> %coords_lo, i32 0 349 %t = extractelement <2 x i16> %coords_lo, i32 1 350 %r = extractelement <2 x i16> %coords_hi, i32 0 351 %mip = extractelement <2 x i16> %coords_hi, i32 1 352 %v = call <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %r, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 353 ret <4 x float> %v 354} 355 356define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 357; GFX9-LABEL: load_mip_cube: 358; GFX9: ; %bb.0: ; %main_body 359; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00] 360; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 361; GFX9-NEXT: ; return to shader part epilog 362; 363; GFX10-LABEL: load_mip_cube: 364; GFX10: ; %bb.0: ; %main_body 365; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 366; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 367; GFX10-NEXT: ; return to shader part epilog 368; 369; GFX11-LABEL: load_mip_cube: 370; GFX11: ; %bb.0: ; %main_body 371; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 372; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 373; GFX11-NEXT: ; return to shader part epilog 374; 375; GFX12-LABEL: load_mip_cube: 376; GFX12: ; %bb.0: ; %main_body 377; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 378; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 379; GFX12-NEXT: ; return to shader part epilog 380main_body: 381 %s = extractelement <2 x i16> %coords_lo, i32 0 382 %t = extractelement <2 x i16> %coords_lo, i32 1 383 %slice = extractelement <2 x i16> %coords_hi, i32 0 384 %mip = extractelement <2 x i16> %coords_hi, i32 1 385 %v = call <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 386 ret <4 x float> %v 387} 388 389define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 390; GFX9-LABEL: load_mip_1darray: 391; GFX9: ; %bb.0: ; %main_body 392; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00] 393; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 394; GFX9-NEXT: ; return to shader part epilog 395; 396; GFX10-LABEL: load_mip_1darray: 397; GFX10: ; %bb.0: ; %main_body 398; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 399; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 400; GFX10-NEXT: ; return to shader part epilog 401; 402; GFX11-LABEL: load_mip_1darray: 403; GFX11: ; %bb.0: ; %main_body 404; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 405; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 406; GFX11-NEXT: ; return to shader part epilog 407; 408; GFX12-LABEL: load_mip_1darray: 409; GFX12: ; %bb.0: ; %main_body 410; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 411; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 412; GFX12-NEXT: ; return to shader part epilog 413main_body: 414 %s = extractelement <2 x i16> %coords_lo, i32 0 415 %slice = extractelement <2 x i16> %coords_lo, i32 1 416 %mip = extractelement <2 x i16> %coords_hi, i32 0 417 %v = call <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32 15, i16 %s, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 418 ret <4 x float> %v 419} 420 421define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 422; GFX9-LABEL: load_mip_2darray: 423; GFX9: ; %bb.0: ; %main_body 424; GFX9-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x04,0xf0,0x00,0x00,0x00,0x00] 425; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 426; GFX9-NEXT: ; return to shader part epilog 427; 428; GFX10-LABEL: load_mip_2darray: 429; GFX10: ; %bb.0: ; %main_body 430; GFX10-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x04,0xf0,0x00,0x00,0x00,0x40] 431; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 432; GFX10-NEXT: ; return to shader part epilog 433; 434; GFX11-LABEL: load_mip_2darray: 435; GFX11: ; %bb.0: ; %main_body 436; GFX11-NEXT: image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x05,0xf0,0x00,0x00,0x00,0x00] 437; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 438; GFX11-NEXT: ; return to shader part epilog 439; 440; GFX12-LABEL: load_mip_2darray: 441; GFX12: ; %bb.0: ; %main_body 442; GFX12-NEXT: image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x40,0xc0,0xd3,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00] 443; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 444; GFX12-NEXT: ; return to shader part epilog 445main_body: 446 %s = extractelement <2 x i16> %coords_lo, i32 0 447 %t = extractelement <2 x i16> %coords_lo, i32 1 448 %slice = extractelement <2 x i16> %coords_hi, i32 0 449 %mip = extractelement <2 x i16> %coords_hi, i32 1 450 %v = call <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 451 ret <4 x float> %v 452} 453 454define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 455; GFX9-LABEL: store_1d: 456; GFX9: ; %bb.0: ; %main_body 457; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00] 458; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 459; 460; GFX10-LABEL: store_1d: 461; GFX10: ; %bb.0: ; %main_body 462; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 463; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 464; 465; GFX11-LABEL: store_1d: 466; GFX11: ; %bb.0: ; %main_body 467; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 468; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 469; 470; GFX12-LABEL: store_1d: 471; GFX12: ; %bb.0: ; %main_body 472; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00] 473; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 474main_body: 475 %s = extractelement <2 x i16> %coords, i32 0 476 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 477 ret void 478} 479 480define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 481; GFX9-LABEL: store_2d: 482; GFX9: ; %bb.0: ; %main_body 483; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00] 484; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 485; 486; GFX10-LABEL: store_2d: 487; GFX10: ; %bb.0: ; %main_body 488; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 489; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 490; 491; GFX11-LABEL: store_2d: 492; GFX11: ; %bb.0: ; %main_body 493; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 494; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 495; 496; GFX12-LABEL: store_2d: 497; GFX12: ; %bb.0: ; %main_body 498; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00] 499; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 500main_body: 501 %s = extractelement <2 x i16> %coords, i32 0 502 %t = extractelement <2 x i16> %coords, i32 1 503 call void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, <8 x i32> %rsrc, i32 0, i32 0) 504 ret void 505} 506 507define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 508; GFX9-LABEL: store_3d: 509; GFX9: ; %bb.0: ; %main_body 510; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00] 511; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 512; 513; GFX10-LABEL: store_3d: 514; GFX10: ; %bb.0: ; %main_body 515; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 516; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 517; 518; GFX11-LABEL: store_3d: 519; GFX11: ; %bb.0: ; %main_body 520; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 521; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 522; 523; GFX12-LABEL: store_3d: 524; GFX12: ; %bb.0: ; %main_body 525; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 526; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 527main_body: 528 %s = extractelement <2 x i16> %coords_lo, i32 0 529 %t = extractelement <2 x i16> %coords_lo, i32 1 530 %r = extractelement <2 x i16> %coords_hi, i32 0 531 call void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %r, <8 x i32> %rsrc, i32 0, i32 0) 532 ret void 533} 534 535define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 536; GFX9-LABEL: store_cube: 537; GFX9: ; %bb.0: ; %main_body 538; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00] 539; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 540; 541; GFX10-LABEL: store_cube: 542; GFX10: ; %bb.0: ; %main_body 543; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 544; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 545; 546; GFX11-LABEL: store_cube: 547; GFX11: ; %bb.0: ; %main_body 548; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 549; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 550; 551; GFX12-LABEL: store_cube: 552; GFX12: ; %bb.0: ; %main_body 553; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 554; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 555main_body: 556 %s = extractelement <2 x i16> %coords_lo, i32 0 557 %t = extractelement <2 x i16> %coords_lo, i32 1 558 %slice = extractelement <2 x i16> %coords_hi, i32 0 559 call void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 560 ret void 561} 562 563define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 564; GFX9-LABEL: store_1darray: 565; GFX9: ; %bb.0: ; %main_body 566; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00] 567; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 568; 569; GFX10-LABEL: store_1darray: 570; GFX10: ; %bb.0: ; %main_body 571; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 572; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 573; 574; GFX11-LABEL: store_1darray: 575; GFX11: ; %bb.0: ; %main_body 576; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 577; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 578; 579; GFX12-LABEL: store_1darray: 580; GFX12: ; %bb.0: ; %main_body 581; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00] 582; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 583main_body: 584 %s = extractelement <2 x i16> %coords, i32 0 585 %slice = extractelement <2 x i16> %coords, i32 1 586 call void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 587 ret void 588} 589 590define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 591; GFX9-LABEL: store_2darray: 592; GFX9: ; %bb.0: ; %main_body 593; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00] 594; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 595; 596; GFX10-LABEL: store_2darray: 597; GFX10: ; %bb.0: ; %main_body 598; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 599; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 600; 601; GFX11-LABEL: store_2darray: 602; GFX11: ; %bb.0: ; %main_body 603; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 604; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 605; 606; GFX12-LABEL: store_2darray: 607; GFX12: ; %bb.0: ; %main_body 608; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 609; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 610main_body: 611 %s = extractelement <2 x i16> %coords_lo, i32 0 612 %t = extractelement <2 x i16> %coords_lo, i32 1 613 %slice = extractelement <2 x i16> %coords_hi, i32 0 614 call void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, <8 x i32> %rsrc, i32 0, i32 0) 615 ret void 616} 617 618define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 619; GFX9-LABEL: store_2dmsaa: 620; GFX9: ; %bb.0: ; %main_body 621; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x04,0x00,0x00,0x00] 622; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 623; 624; GFX10-LABEL: store_2dmsaa: 625; GFX10: ; %bb.0: ; %main_body 626; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 627; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 628; 629; GFX11-LABEL: store_2dmsaa: 630; GFX11: ; %bb.0: ; %main_body 631; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 632; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 633; 634; GFX12-LABEL: store_2dmsaa: 635; GFX12: ; %bb.0: ; %main_body 636; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 637; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 638main_body: 639 %s = extractelement <2 x i16> %coords_lo, i32 0 640 %t = extractelement <2 x i16> %coords_lo, i32 1 641 %fragid = extractelement <2 x i16> %coords_hi, i32 0 642 call void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0) 643 ret void 644} 645 646define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 647; GFX9-LABEL: store_2darraymsaa: 648; GFX9: ; %bb.0: ; %main_body 649; GFX9-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x20,0xf0,0x04,0x00,0x00,0x00] 650; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 651; 652; GFX10-LABEL: store_2darraymsaa: 653; GFX10: ; %bb.0: ; %main_body 654; GFX10-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x20,0xf0,0x04,0x00,0x00,0x40] 655; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 656; 657; GFX11-LABEL: store_2darraymsaa: 658; GFX11: ; %bb.0: ; %main_body 659; GFX11-NEXT: image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x19,0xf0,0x04,0x00,0x00,0x00] 660; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 661; 662; GFX12-LABEL: store_2darraymsaa: 663; GFX12: ; %bb.0: ; %main_body 664; GFX12-NEXT: image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0x80,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 665; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 666main_body: 667 %s = extractelement <2 x i16> %coords_lo, i32 0 668 %t = extractelement <2 x i16> %coords_lo, i32 1 669 %slice = extractelement <2 x i16> %coords_hi, i32 0 670 %fragid = extractelement <2 x i16> %coords_hi, i32 1 671 call void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %fragid, <8 x i32> %rsrc, i32 0, i32 0) 672 ret void 673} 674 675define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 676; GFX9-LABEL: store_mip_1d: 677; GFX9: ; %bb.0: ; %main_body 678; GFX9-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00] 679; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 680; 681; GFX10-LABEL: store_mip_1d: 682; GFX10: ; %bb.0: ; %main_body 683; GFX10-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 684; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 685; 686; GFX11-LABEL: store_mip_1d: 687; GFX11: ; %bb.0: ; %main_body 688; GFX11-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 689; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 690; 691; GFX12-LABEL: store_mip_1d: 692; GFX12: ; %bb.0: ; %main_body 693; GFX12-NEXT: image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00] 694; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 695main_body: 696 %s = extractelement <2 x i16> %coords, i32 0 697 %mip = extractelement <2 x i16> %coords, i32 1 698 call void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 699 ret void 700} 701 702define amdgpu_ps void @store_mip_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 703; GFX9-LABEL: store_mip_2d: 704; GFX9: ; %bb.0: ; %main_body 705; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00] 706; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 707; 708; GFX10-LABEL: store_mip_2d: 709; GFX10: ; %bb.0: ; %main_body 710; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 711; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 712; 713; GFX11-LABEL: store_mip_2d: 714; GFX11: ; %bb.0: ; %main_body 715; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 716; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 717; 718; GFX12-LABEL: store_mip_2d: 719; GFX12: ; %bb.0: ; %main_body 720; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 721; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 722main_body: 723 %s = extractelement <2 x i16> %coords_lo, i32 0 724 %t = extractelement <2 x i16> %coords_lo, i32 1 725 %mip = extractelement <2 x i16> %coords_hi, i32 0 726 call void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 727 ret void 728} 729 730define amdgpu_ps void @store_mip_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 731; GFX9-LABEL: store_mip_3d: 732; GFX9: ; %bb.0: ; %main_body 733; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x24,0xf0,0x04,0x00,0x00,0x00] 734; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 735; 736; GFX10-LABEL: store_mip_3d: 737; GFX10: ; %bb.0: ; %main_body 738; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 739; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 740; 741; GFX11-LABEL: store_mip_3d: 742; GFX11: ; %bb.0: ; %main_body 743; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 744; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 745; 746; GFX12-LABEL: store_mip_3d: 747; GFX12: ; %bb.0: ; %main_body 748; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 749; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 750main_body: 751 %s = extractelement <2 x i16> %coords_lo, i32 0 752 %t = extractelement <2 x i16> %coords_lo, i32 1 753 %r = extractelement <2 x i16> %coords_hi, i32 0 754 %mip = extractelement <2 x i16> %coords_hi, i32 1 755 call void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %r, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 756 ret void 757} 758 759define amdgpu_ps void @store_mip_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 760; GFX9-LABEL: store_mip_cube: 761; GFX9: ; %bb.0: ; %main_body 762; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00] 763; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 764; 765; GFX10-LABEL: store_mip_cube: 766; GFX10: ; %bb.0: ; %main_body 767; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 768; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 769; 770; GFX11-LABEL: store_mip_cube: 771; GFX11: ; %bb.0: ; %main_body 772; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 773; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 774; 775; GFX12-LABEL: store_mip_cube: 776; GFX12: ; %bb.0: ; %main_body 777; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 778; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 779main_body: 780 %s = extractelement <2 x i16> %coords_lo, i32 0 781 %t = extractelement <2 x i16> %coords_lo, i32 1 782 %slice = extractelement <2 x i16> %coords_hi, i32 0 783 %mip = extractelement <2 x i16> %coords_hi, i32 1 784 call void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 785 ret void 786} 787 788define amdgpu_ps void @store_mip_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 789; GFX9-LABEL: store_mip_1darray: 790; GFX9: ; %bb.0: ; %main_body 791; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00] 792; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 793; 794; GFX10-LABEL: store_mip_1darray: 795; GFX10: ; %bb.0: ; %main_body 796; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 797; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 798; 799; GFX11-LABEL: store_mip_1darray: 800; GFX11: ; %bb.0: ; %main_body 801; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 802; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 803; 804; GFX12-LABEL: store_mip_1darray: 805; GFX12: ; %bb.0: ; %main_body 806; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 807; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 808main_body: 809 %s = extractelement <2 x i16> %coords_lo, i32 0 810 %slice = extractelement <2 x i16> %coords_lo, i32 1 811 %mip = extractelement <2 x i16> %coords_hi, i32 0 812 call void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 813 ret void 814} 815 816define amdgpu_ps void @store_mip_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) { 817; GFX9-LABEL: store_mip_2darray: 818; GFX9: ; %bb.0: ; %main_body 819; GFX9-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x24,0xf0,0x04,0x00,0x00,0x00] 820; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 821; 822; GFX10-LABEL: store_mip_2darray: 823; GFX10: ; %bb.0: ; %main_body 824; GFX10-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x24,0xf0,0x04,0x00,0x00,0x40] 825; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 826; 827; GFX11-LABEL: store_mip_2darray: 828; GFX11: ; %bb.0: ; %main_body 829; GFX11-NEXT: image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x1d,0xf0,0x04,0x00,0x00,0x00] 830; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 831; 832; GFX12-LABEL: store_mip_2darray: 833; GFX12: ; %bb.0: ; %main_body 834; GFX12-NEXT: image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0xc0,0xc1,0xd3,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x00] 835; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 836main_body: 837 %s = extractelement <2 x i16> %coords_lo, i32 0 838 %t = extractelement <2 x i16> %coords_lo, i32 1 839 %slice = extractelement <2 x i16> %coords_hi, i32 0 840 %mip = extractelement <2 x i16> %coords_hi, i32 1 841 call void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, i16 %t, i16 %slice, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 842 ret void 843} 844 845define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 846; GFX9-LABEL: getresinfo_1d: 847; GFX9: ; %bb.0: ; %main_body 848; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00] 849; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 850; GFX9-NEXT: ; return to shader part epilog 851; 852; GFX10-LABEL: getresinfo_1d: 853; GFX10: ; %bb.0: ; %main_body 854; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 855; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 856; GFX10-NEXT: ; return to shader part epilog 857; 858; GFX11-LABEL: getresinfo_1d: 859; GFX11: ; %bb.0: ; %main_body 860; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 861; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 862; GFX11-NEXT: ; return to shader part epilog 863; 864; GFX12-LABEL: getresinfo_1d: 865; GFX12: ; %bb.0: ; %main_body 866; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 867; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 868; GFX12-NEXT: ; return to shader part epilog 869main_body: 870 %mip = extractelement <2 x i16> %coords, i32 0 871 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 872 ret <4 x float> %v 873} 874 875define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 876; GFX9-LABEL: getresinfo_2d: 877; GFX9: ; %bb.0: ; %main_body 878; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00] 879; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 880; GFX9-NEXT: ; return to shader part epilog 881; 882; GFX10-LABEL: getresinfo_2d: 883; GFX10: ; %bb.0: ; %main_body 884; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x08,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 885; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 886; GFX10-NEXT: ; return to shader part epilog 887; 888; GFX11-LABEL: getresinfo_2d: 889; GFX11: ; %bb.0: ; %main_body 890; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16 ; encoding: [0x84,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 891; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 892; GFX11-NEXT: ; return to shader part epilog 893; 894; GFX12-LABEL: getresinfo_2d: 895; GFX12: ; %bb.0: ; %main_body 896; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16 ; encoding: [0x41,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 897; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 898; GFX12-NEXT: ; return to shader part epilog 899main_body: 900 %mip = extractelement <2 x i16> %coords, i32 0 901 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 902 ret <4 x float> %v 903} 904 905define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 906; GFX9-LABEL: getresinfo_3d: 907; GFX9: ; %bb.0: ; %main_body 908; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00] 909; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 910; GFX9-NEXT: ; return to shader part epilog 911; 912; GFX10-LABEL: getresinfo_3d: 913; GFX10: ; %bb.0: ; %main_body 914; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x10,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 915; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 916; GFX10-NEXT: ; return to shader part epilog 917; 918; GFX11-LABEL: getresinfo_3d: 919; GFX11: ; %bb.0: ; %main_body 920; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16 ; encoding: [0x88,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 921; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 922; GFX11-NEXT: ; return to shader part epilog 923; 924; GFX12-LABEL: getresinfo_3d: 925; GFX12: ; %bb.0: ; %main_body 926; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16 ; encoding: [0x42,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 927; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 928; GFX12-NEXT: ; return to shader part epilog 929main_body: 930 %mip = extractelement <2 x i16> %coords, i32 0 931 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 932 ret <4 x float> %v 933} 934 935define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 936; GFX9-LABEL: getresinfo_cube: 937; GFX9: ; %bb.0: ; %main_body 938; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00] 939; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 940; GFX9-NEXT: ; return to shader part epilog 941; 942; GFX10-LABEL: getresinfo_cube: 943; GFX10: ; %bb.0: ; %main_body 944; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x18,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 945; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 946; GFX10-NEXT: ; return to shader part epilog 947; 948; GFX11-LABEL: getresinfo_cube: 949; GFX11: ; %bb.0: ; %main_body 950; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16 ; encoding: [0x8c,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 951; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 952; GFX11-NEXT: ; return to shader part epilog 953; 954; GFX12-LABEL: getresinfo_cube: 955; GFX12: ; %bb.0: ; %main_body 956; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16 ; encoding: [0x43,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 957; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 958; GFX12-NEXT: ; return to shader part epilog 959main_body: 960 %mip = extractelement <2 x i16> %coords, i32 0 961 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 962 ret <4 x float> %v 963} 964 965define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 966; GFX9-LABEL: getresinfo_1darray: 967; GFX9: ; %bb.0: ; %main_body 968; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00] 969; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 970; GFX9-NEXT: ; return to shader part epilog 971; 972; GFX10-LABEL: getresinfo_1darray: 973; GFX10: ; %bb.0: ; %main_body 974; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x20,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 975; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 976; GFX10-NEXT: ; return to shader part epilog 977; 978; GFX11-LABEL: getresinfo_1darray: 979; GFX11: ; %bb.0: ; %main_body 980; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16 ; encoding: [0x90,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 981; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 982; GFX11-NEXT: ; return to shader part epilog 983; 984; GFX12-LABEL: getresinfo_1darray: 985; GFX12: ; %bb.0: ; %main_body 986; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16 ; encoding: [0x44,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 987; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 988; GFX12-NEXT: ; return to shader part epilog 989main_body: 990 %mip = extractelement <2 x i16> %coords, i32 0 991 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 992 ret <4 x float> %v 993} 994 995define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 996; GFX9-LABEL: getresinfo_2darray: 997; GFX9: ; %bb.0: ; %main_body 998; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00] 999; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1000; GFX9-NEXT: ; return to shader part epilog 1001; 1002; GFX10-LABEL: getresinfo_2darray: 1003; GFX10: ; %bb.0: ; %main_body 1004; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x28,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 1005; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1006; GFX10-NEXT: ; return to shader part epilog 1007; 1008; GFX11-LABEL: getresinfo_2darray: 1009; GFX11: ; %bb.0: ; %main_body 1010; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16 ; encoding: [0x94,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 1011; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1012; GFX11-NEXT: ; return to shader part epilog 1013; 1014; GFX12-LABEL: getresinfo_2darray: 1015; GFX12: ; %bb.0: ; %main_body 1016; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16 ; encoding: [0x45,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 1017; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1018; GFX12-NEXT: ; return to shader part epilog 1019main_body: 1020 %mip = extractelement <2 x i16> %coords, i32 0 1021 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 1022 ret <4 x float> %v 1023} 1024 1025define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1026; GFX9-LABEL: getresinfo_2dmsaa: 1027; GFX9: ; %bb.0: ; %main_body 1028; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x38,0xf0,0x00,0x00,0x00,0x00] 1029; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1030; GFX9-NEXT: ; return to shader part epilog 1031; 1032; GFX10-LABEL: getresinfo_2dmsaa: 1033; GFX10: ; %bb.0: ; %main_body 1034; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x30,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 1035; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1036; GFX10-NEXT: ; return to shader part epilog 1037; 1038; GFX11-LABEL: getresinfo_2dmsaa: 1039; GFX11: ; %bb.0: ; %main_body 1040; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16 ; encoding: [0x98,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 1041; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1042; GFX11-NEXT: ; return to shader part epilog 1043; 1044; GFX12-LABEL: getresinfo_2dmsaa: 1045; GFX12: ; %bb.0: ; %main_body 1046; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16 ; encoding: [0x46,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 1047; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1048; GFX12-NEXT: ; return to shader part epilog 1049main_body: 1050 %mip = extractelement <2 x i16> %coords, i32 0 1051 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 1052 ret <4 x float> %v 1053} 1054 1055define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1056; GFX9-LABEL: getresinfo_2darraymsaa: 1057; GFX9: ; %bb.0: ; %main_body 1058; GFX9-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da ; encoding: [0x00,0xdf,0x38,0xf0,0x00,0x00,0x00,0x00] 1059; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1060; GFX9-NEXT: ; return to shader part epilog 1061; 1062; GFX10-LABEL: getresinfo_2darraymsaa: 1063; GFX10: ; %bb.0: ; %main_body 1064; GFX10-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x38,0x1f,0x38,0xf0,0x00,0x00,0x00,0x40] 1065; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1066; GFX10-NEXT: ; return to shader part epilog 1067; 1068; GFX11-LABEL: getresinfo_2darraymsaa: 1069; GFX11: ; %bb.0: ; %main_body 1070; GFX11-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16 ; encoding: [0x9c,0x0f,0x5d,0xf0,0x00,0x00,0x00,0x00] 1071; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1072; GFX11-NEXT: ; return to shader part epilog 1073; 1074; GFX12-LABEL: getresinfo_2darraymsaa: 1075; GFX12: ; %bb.0: ; %main_body 1076; GFX12-NEXT: image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16 ; encoding: [0x47,0xc0,0xc5,0xd3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 1077; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1078; GFX12-NEXT: ; return to shader part epilog 1079main_body: 1080 %mip = extractelement <2 x i16> %coords, i32 0 1081 %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 1082 ret <4 x float> %v 1083} 1084 1085define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1086; GFX9-LABEL: load_1d_V1: 1087; GFX9: ; %bb.0: ; %main_body 1088; GFX9-NEXT: image_load v0, v0, s[0:7] dmask:0x8 unorm a16 ; encoding: [0x00,0x98,0x00,0xf0,0x00,0x00,0x00,0x00] 1089; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1090; GFX9-NEXT: ; return to shader part epilog 1091; 1092; GFX10-LABEL: load_1d_V1: 1093; GFX10: ; %bb.0: ; %main_body 1094; GFX10-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x18,0x00,0xf0,0x00,0x00,0x00,0x40] 1095; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1096; GFX10-NEXT: ; return to shader part epilog 1097; 1098; GFX11-LABEL: load_1d_V1: 1099; GFX11: ; %bb.0: ; %main_body 1100; GFX11-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x08,0x01,0xf0,0x00,0x00,0x00,0x00] 1101; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1102; GFX11-NEXT: ; return to shader part epilog 1103; 1104; GFX12-LABEL: load_1d_V1: 1105; GFX12: ; %bb.0: ; %main_body 1106; GFX12-NEXT: image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0x00,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 1107; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1108; GFX12-NEXT: ; return to shader part epilog 1109main_body: 1110 %s = extractelement <2 x i16> %coords, i32 0 1111 %v = call float @llvm.amdgcn.image.load.1d.f32.i16(i32 8, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 1112 ret float %v 1113} 1114 1115define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1116; GFX9-LABEL: load_1d_V2: 1117; GFX9: ; %bb.0: ; %main_body 1118; GFX9-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 unorm a16 ; encoding: [0x00,0x99,0x00,0xf0,0x00,0x00,0x00,0x00] 1119; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1120; GFX9-NEXT: ; return to shader part epilog 1121; 1122; GFX10-LABEL: load_1d_V2: 1123; GFX10: ; %bb.0: ; %main_body 1124; GFX10-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x19,0x00,0xf0,0x00,0x00,0x00,0x40] 1125; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1126; GFX10-NEXT: ; return to shader part epilog 1127; 1128; GFX11-LABEL: load_1d_V2: 1129; GFX11: ; %bb.0: ; %main_body 1130; GFX11-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x09,0x01,0xf0,0x00,0x00,0x00,0x00] 1131; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1132; GFX11-NEXT: ; return to shader part epilog 1133; 1134; GFX12-LABEL: load_1d_V2: 1135; GFX12: ; %bb.0: ; %main_body 1136; GFX12-NEXT: image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x00,0x40,0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] 1137; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1138; GFX12-NEXT: ; return to shader part epilog 1139main_body: 1140 %s = extractelement <2 x i16> %coords, i32 0 1141 %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32 9, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 1142 ret <2 x float> %v 1143} 1144 1145define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, <2 x i16> %coords) { 1146; GFX9-LABEL: store_1d_V1: 1147; GFX9: ; %bb.0: ; %main_body 1148; GFX9-NEXT: image_store v0, v1, s[0:7] dmask:0x2 unorm a16 ; encoding: [0x00,0x92,0x20,0xf0,0x01,0x00,0x00,0x00] 1149; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1150; 1151; GFX10-LABEL: store_1d_V1: 1152; GFX10: ; %bb.0: ; %main_body 1153; GFX10-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x12,0x20,0xf0,0x01,0x00,0x00,0x40] 1154; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1155; 1156; GFX11-LABEL: store_1d_V1: 1157; GFX11: ; %bb.0: ; %main_body 1158; GFX11-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x02,0x19,0xf0,0x01,0x00,0x00,0x00] 1159; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1160; 1161; GFX12-LABEL: store_1d_V1: 1162; GFX12: ; %bb.0: ; %main_body 1163; GFX12-NEXT: image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0x81,0xd0,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00] 1164; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1165main_body: 1166 %s = extractelement <2 x i16> %coords, i32 0 1167 call void @llvm.amdgcn.image.store.1d.f32.i16(float %vdata, i32 2, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 1168 ret void 1169} 1170 1171define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, <2 x i16> %coords) { 1172; GFX9-LABEL: store_1d_V2: 1173; GFX9: ; %bb.0: ; %main_body 1174; GFX9-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc unorm a16 ; encoding: [0x00,0x9c,0x20,0xf0,0x02,0x00,0x00,0x00] 1175; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1176; 1177; GFX10-LABEL: store_1d_V2: 1178; GFX10: ; %bb.0: ; %main_body 1179; GFX10-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x00,0x1c,0x20,0xf0,0x02,0x00,0x00,0x40] 1180; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1181; 1182; GFX11-LABEL: store_1d_V2: 1183; GFX11: ; %bb.0: ; %main_body 1184; GFX11-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm a16 ; encoding: [0x80,0x0c,0x19,0xf0,0x02,0x00,0x00,0x00] 1185; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1186; 1187; GFX12-LABEL: store_1d_V2: 1188; GFX12: ; %bb.0: ; %main_body 1189; GFX12-NEXT: image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D a16 ; encoding: [0x40,0x80,0x01,0xd3,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00] 1190; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1191main_body: 1192 %s = extractelement <2 x i16> %coords, i32 0 1193 call void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float> %vdata, i32 12, i16 %s, <8 x i32> %rsrc, i32 0, i32 0) 1194 ret void 1195} 1196 1197define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1198; GFX9-LABEL: load_1d_glc: 1199; GFX9: ; %bb.0: ; %main_body 1200; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc a16 ; encoding: [0x00,0xbf,0x00,0xf0,0x00,0x00,0x00,0x00] 1201; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1202; GFX9-NEXT: ; return to shader part epilog 1203; 1204; GFX10-LABEL: load_1d_glc: 1205; GFX10: ; %bb.0: ; %main_body 1206; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x00,0x3f,0x00,0xf0,0x00,0x00,0x00,0x40] 1207; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1208; GFX10-NEXT: ; return to shader part epilog 1209; 1210; GFX11-LABEL: load_1d_glc: 1211; GFX11: ; %bb.0: ; %main_body 1212; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x80,0x4f,0x01,0xf0,0x00,0x00,0x00,0x00] 1213; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1214; GFX11-NEXT: ; return to shader part epilog 1215; 1216; GFX12-LABEL: load_1d_glc: 1217; GFX12: ; %bb.0: ; %main_body 1218; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_NT a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00] 1219; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1220; GFX12-NEXT: ; return to shader part epilog 1221main_body: 1222 %s = extractelement <2 x i16> %coords, i32 0 1223 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1) 1224 ret <4 x float> %v 1225} 1226 1227define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1228; GFX9-LABEL: load_1d_slc: 1229; GFX9: ; %bb.0: ; %main_body 1230; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc a16 ; encoding: [0x00,0x9f,0x00,0xf2,0x00,0x00,0x00,0x00] 1231; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1232; GFX9-NEXT: ; return to shader part epilog 1233; 1234; GFX10-LABEL: load_1d_slc: 1235; GFX10: ; %bb.0: ; %main_body 1236; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x00,0x1f,0x00,0xf2,0x00,0x00,0x00,0x40] 1237; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1238; GFX10-NEXT: ; return to shader part epilog 1239; 1240; GFX11-LABEL: load_1d_slc: 1241; GFX11: ; %bb.0: ; %main_body 1242; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x80,0x1f,0x01,0xf0,0x00,0x00,0x00,0x00] 1243; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1244; GFX11-NEXT: ; return to shader part epilog 1245; 1246; GFX12-LABEL: load_1d_slc: 1247; GFX12: ; %bb.0: ; %main_body 1248; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_HT a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00] 1249; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1250; GFX12-NEXT: ; return to shader part epilog 1251main_body: 1252 %s = extractelement <2 x i16> %coords, i32 0 1253 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2) 1254 ret <4 x float> %v 1255} 1256 1257define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) { 1258; GFX9-LABEL: load_1d_glc_slc: 1259; GFX9: ; %bb.0: ; %main_body 1260; GFX9-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc a16 ; encoding: [0x00,0xbf,0x00,0xf2,0x00,0x00,0x00,0x00] 1261; GFX9-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x0f,0x8c,0xbf] 1262; GFX9-NEXT: ; return to shader part epilog 1263; 1264; GFX10-LABEL: load_1d_glc_slc: 1265; GFX10: ; %bb.0: ; %main_body 1266; GFX10-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x00,0x3f,0x00,0xf2,0x00,0x00,0x00,0x40] 1267; GFX10-NEXT: s_waitcnt vmcnt(0) ; encoding: [0x70,0x3f,0x8c,0xbf] 1268; GFX10-NEXT: ; return to shader part epilog 1269; 1270; GFX11-LABEL: load_1d_glc_slc: 1271; GFX11: ; %bb.0: ; %main_body 1272; GFX11-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x80,0x5f,0x01,0xf0,0x00,0x00,0x00,0x00] 1273; GFX11-NEXT: s_waitcnt vmcnt(0) ; encoding: [0xf7,0x03,0x89,0xbf] 1274; GFX11-NEXT: ; return to shader part epilog 1275; 1276; GFX12-LABEL: load_1d_glc_slc: 1277; GFX12: ; %bb.0: ; %main_body 1278; GFX12-NEXT: image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_LU a16 ; encoding: [0x40,0x00,0xc0,0xd3,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00] 1279; GFX12-NEXT: s_wait_loadcnt 0x0 ; encoding: [0x00,0x00,0xc0,0xbf] 1280; GFX12-NEXT: ; return to shader part epilog 1281main_body: 1282 %s = extractelement <2 x i16> %coords, i32 0 1283 %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3) 1284 ret <4 x float> %v 1285} 1286 1287define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 1288; GFX9-LABEL: store_1d_glc: 1289; GFX9: ; %bb.0: ; %main_body 1290; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc a16 ; encoding: [0x00,0xbf,0x20,0xf0,0x04,0x00,0x00,0x00] 1291; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1292; 1293; GFX10-LABEL: store_1d_glc: 1294; GFX10: ; %bb.0: ; %main_body 1295; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x00,0x3f,0x20,0xf0,0x04,0x00,0x00,0x40] 1296; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1297; 1298; GFX11-LABEL: store_1d_glc: 1299; GFX11: ; %bb.0: ; %main_body 1300; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16 ; encoding: [0x80,0x4f,0x19,0xf0,0x04,0x00,0x00,0x00] 1301; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1302; 1303; GFX12-LABEL: store_1d_glc: 1304; GFX12: ; %bb.0: ; %main_body 1305; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_NT a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x10,0x00,0x04,0x00,0x00,0x00] 1306; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1307main_body: 1308 %s = extractelement <2 x i16> %coords, i32 0 1309 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1) 1310 ret void 1311} 1312 1313define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 1314; GFX9-LABEL: store_1d_slc: 1315; GFX9: ; %bb.0: ; %main_body 1316; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc a16 ; encoding: [0x00,0x9f,0x20,0xf2,0x04,0x00,0x00,0x00] 1317; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1318; 1319; GFX10-LABEL: store_1d_slc: 1320; GFX10: ; %bb.0: ; %main_body 1321; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x00,0x1f,0x20,0xf2,0x04,0x00,0x00,0x40] 1322; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1323; 1324; GFX11-LABEL: store_1d_slc: 1325; GFX11: ; %bb.0: ; %main_body 1326; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a16 ; encoding: [0x80,0x1f,0x19,0xf0,0x04,0x00,0x00,0x00] 1327; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1328; 1329; GFX12-LABEL: store_1d_slc: 1330; GFX12: ; %bb.0: ; %main_body 1331; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_HT a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x20,0x00,0x04,0x00,0x00,0x00] 1332; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1333main_body: 1334 %s = extractelement <2 x i16> %coords, i32 0 1335 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2) 1336 ret void 1337} 1338 1339define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) { 1340; GFX9-LABEL: store_1d_glc_slc: 1341; GFX9: ; %bb.0: ; %main_body 1342; GFX9-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc a16 ; encoding: [0x00,0xbf,0x20,0xf2,0x04,0x00,0x00,0x00] 1343; GFX9-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1344; 1345; GFX10-LABEL: store_1d_glc_slc: 1346; GFX10: ; %bb.0: ; %main_body 1347; GFX10-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x00,0x3f,0x20,0xf2,0x04,0x00,0x00,0x40] 1348; GFX10-NEXT: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf] 1349; 1350; GFX11-LABEL: store_1d_glc_slc: 1351; GFX11: ; %bb.0: ; %main_body 1352; GFX11-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a16 ; encoding: [0x80,0x5f,0x19,0xf0,0x04,0x00,0x00,0x00] 1353; GFX11-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1354; 1355; GFX12-LABEL: store_1d_glc_slc: 1356; GFX12: ; %bb.0: ; %main_body 1357; GFX12-NEXT: image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_RT_WB a16 ; encoding: [0x40,0x80,0xc1,0xd3,0x00,0x00,0x30,0x00,0x04,0x00,0x00,0x00] 1358; GFX12-NEXT: s_endpgm ; encoding: [0x00,0x00,0xb0,0xbf] 1359main_body: 1360 %s = extractelement <2 x i16> %coords, i32 0 1361 call void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float> %vdata, i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3) 1362 ret void 1363} 1364 1365define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) #0 { 1366; GFX9-LABEL: getresinfo_dmask0: 1367; GFX9: ; %bb.0: ; %main_body 1368; GFX9-NEXT: ; return to shader part epilog 1369; 1370; GFX10-LABEL: getresinfo_dmask0: 1371; GFX10: ; %bb.0: ; %main_body 1372; GFX10-NEXT: ; return to shader part epilog 1373; 1374; GFX11-LABEL: getresinfo_dmask0: 1375; GFX11: ; %bb.0: ; %main_body 1376; GFX11-NEXT: ; return to shader part epilog 1377; 1378; GFX12-LABEL: getresinfo_dmask0: 1379; GFX12: ; %bb.0: ; %main_body 1380; GFX12-NEXT: ; return to shader part epilog 1381main_body: 1382 %mip = extractelement <2 x i16> %coords, i32 0 1383 %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 0, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0) 1384 ret <4 x float> %r 1385} 1386 1387declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #1 1388declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1 1389declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1390declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1391declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1 1392declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1393declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1394declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1 1395 1396declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1 1397declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1398declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1 1399declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1 1400declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #1 1401declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #1 1402 1403declare void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float>, i32, i16, <8 x i32>, i32, i32) #0 1404declare void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0 1405declare void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1406declare void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1407declare void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0 1408declare void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1409declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1410declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0 1411 1412declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #0 1413declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1414declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0 1415declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0 1416declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #0 1417declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #0 1418 1419declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1420declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1421declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1422declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1423declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1424declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1425declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1426declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #2 1427 1428declare float @llvm.amdgcn.image.load.1d.f32.i16(i32, i16, <8 x i32>, i32, i32) #1 1429declare float @llvm.amdgcn.image.load.2d.f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #1 1430declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32, i16, <8 x i32>, i32, i32) #1 1431declare void @llvm.amdgcn.image.store.1d.f32.i16(float, i32, i16, <8 x i32>, i32, i32) #0 1432declare void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float>, i32, i16, <8 x i32>, i32, i32) #0 1433 1434attributes #0 = { nounwind } 1435attributes #1 = { nounwind readonly } 1436attributes #2 = { nounwind readnone } 1437