brintos

brintos / llvm-project-archived public Read only

0
0
Text · 51.5 KiB · 713f82e Raw
1179 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s3; RUN: llc -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX10 %s4; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX10PLUS,GFX11 %s5; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12 %s6 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_body10; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm a1611; GFX9-NEXT:    s_waitcnt vmcnt(0)12; GFX9-NEXT:    ; return to shader part epilog13;14; GFX10PLUS-LABEL: load_1d:15; GFX10PLUS:       ; %bb.0: ; %main_body16; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a1617; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)18; GFX10PLUS-NEXT:    ; return to shader part epilog19;20; GFX12-LABEL: load_1d:21; GFX12:       ; %bb.0: ; %main_body22; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a1623; GFX12-NEXT:    s_wait_loadcnt 0x024; GFX12-NEXT:    ; return to shader part epilog25main_body:26  %s = extractelement <2 x i16> %coords, i32 027  %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)28  ret <4 x float> %v29}30 31define amdgpu_ps <4 x float> @load_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {32; GFX9-LABEL: load_2d:33; GFX9:       ; %bb.0: ; %main_body34; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm a1635; GFX9-NEXT:    s_waitcnt vmcnt(0)36; GFX9-NEXT:    ; return to shader part epilog37;38; GFX10PLUS-LABEL: load_2d:39; GFX10PLUS:       ; %bb.0: ; %main_body40; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a1641; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)42; GFX10PLUS-NEXT:    ; return to shader part epilog43;44; GFX12-LABEL: load_2d:45; GFX12:       ; %bb.0: ; %main_body46; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a1647; GFX12-NEXT:    s_wait_loadcnt 0x048; GFX12-NEXT:    ; return to shader part epilog49main_body:50  %s = extractelement <2 x i16> %coords, i32 051  %t = extractelement <2 x i16> %coords, i32 152  %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)53  ret <4 x float> %v54}55 56define amdgpu_ps <4 x float> @load_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {57; GFX9-LABEL: load_3d:58; GFX9:       ; %bb.0: ; %main_body59; GFX9-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a1660; GFX9-NEXT:    s_waitcnt vmcnt(0)61; GFX9-NEXT:    ; return to shader part epilog62;63; GFX10PLUS-LABEL: load_3d:64; GFX10PLUS:       ; %bb.0: ; %main_body65; GFX10PLUS-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a1666; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)67; GFX10PLUS-NEXT:    ; return to shader part epilog68;69; GFX12-LABEL: load_3d:70; GFX12:       ; %bb.0: ; %main_body71; GFX12-NEXT:    image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a1672; GFX12-NEXT:    s_wait_loadcnt 0x073; GFX12-NEXT:    ; return to shader part epilog74main_body:75  %s = extractelement <2 x i16> %coords_lo, i32 076  %t = extractelement <2 x i16> %coords_lo, i32 177  %r = extractelement <2 x i16> %coords_hi, i32 078  %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)79  ret <4 x float> %v80}81 82define amdgpu_ps <4 x float> @load_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {83; GFX9-LABEL: load_cube:84; GFX9:       ; %bb.0: ; %main_body85; GFX9-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da86; GFX9-NEXT:    s_waitcnt vmcnt(0)87; GFX9-NEXT:    ; return to shader part epilog88;89; GFX10PLUS-LABEL: load_cube:90; GFX10PLUS:       ; %bb.0: ; %main_body91; GFX10PLUS-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a1692; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)93; GFX10PLUS-NEXT:    ; return to shader part epilog94;95; GFX12-LABEL: load_cube:96; GFX12:       ; %bb.0: ; %main_body97; GFX12-NEXT:    image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a1698; GFX12-NEXT:    s_wait_loadcnt 0x099; GFX12-NEXT:    ; return to shader part epilog100main_body:101  %s = extractelement <2 x i16> %coords_lo, i32 0102  %t = extractelement <2 x i16> %coords_lo, i32 1103  %slice = extractelement <2 x i16> %coords_hi, i32 0104  %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)105  ret <4 x float> %v106}107 108define amdgpu_ps <4 x float> @load_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {109; GFX9-LABEL: load_1darray:110; GFX9:       ; %bb.0: ; %main_body111; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm a16 da112; GFX9-NEXT:    s_waitcnt vmcnt(0)113; GFX9-NEXT:    ; return to shader part epilog114;115; GFX10PLUS-LABEL: load_1darray:116; GFX10PLUS:       ; %bb.0: ; %main_body117; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16118; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)119; GFX10PLUS-NEXT:    ; return to shader part epilog120;121; GFX12-LABEL: load_1darray:122; GFX12:       ; %bb.0: ; %main_body123; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16124; GFX12-NEXT:    s_wait_loadcnt 0x0125; GFX12-NEXT:    ; return to shader part epilog126main_body:127  %s = extractelement <2 x i16> %coords, i32 0128  %slice = extractelement <2 x i16> %coords, i32 1129  %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)130  ret <4 x float> %v131}132 133define amdgpu_ps <4 x float> @load_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {134; GFX9-LABEL: load_2darray:135; GFX9:       ; %bb.0: ; %main_body136; GFX9-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da137; GFX9-NEXT:    s_waitcnt vmcnt(0)138; GFX9-NEXT:    ; return to shader part epilog139;140; GFX10PLUS-LABEL: load_2darray:141; GFX10PLUS:       ; %bb.0: ; %main_body142; GFX10PLUS-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16143; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)144; GFX10PLUS-NEXT:    ; return to shader part epilog145;146; GFX12-LABEL: load_2darray:147; GFX12:       ; %bb.0: ; %main_body148; GFX12-NEXT:    image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16149; GFX12-NEXT:    s_wait_loadcnt 0x0150; GFX12-NEXT:    ; return to shader part epilog151main_body:152  %s = extractelement <2 x i16> %coords_lo, i32 0153  %t = extractelement <2 x i16> %coords_lo, i32 1154  %slice = extractelement <2 x i16> %coords_hi, i32 0155  %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)156  ret <4 x float> %v157}158 159define amdgpu_ps <4 x float> @load_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {160; GFX9-LABEL: load_2dmsaa:161; GFX9:       ; %bb.0: ; %main_body162; GFX9-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16163; GFX9-NEXT:    s_waitcnt vmcnt(0)164; GFX9-NEXT:    ; return to shader part epilog165;166; GFX10PLUS-LABEL: load_2dmsaa:167; GFX10PLUS:       ; %bb.0: ; %main_body168; GFX10PLUS-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16169; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)170; GFX10PLUS-NEXT:    ; return to shader part epilog171;172; GFX12-LABEL: load_2dmsaa:173; GFX12:       ; %bb.0: ; %main_body174; GFX12-NEXT:    image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16175; GFX12-NEXT:    s_wait_loadcnt 0x0176; GFX12-NEXT:    ; return to shader part epilog177main_body:178  %s = extractelement <2 x i16> %coords_lo, i32 0179  %t = extractelement <2 x i16> %coords_lo, i32 1180  %fragid = extractelement <2 x i16> %coords_hi, i32 0181  %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)182  ret <4 x float> %v183}184 185define amdgpu_ps <4 x float> @load_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {186; GFX9-LABEL: load_2darraymsaa:187; GFX9:       ; %bb.0: ; %main_body188; GFX9-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da189; GFX9-NEXT:    s_waitcnt vmcnt(0)190; GFX9-NEXT:    ; return to shader part epilog191;192; GFX10PLUS-LABEL: load_2darraymsaa:193; GFX10PLUS:       ; %bb.0: ; %main_body194; GFX10PLUS-NEXT:    image_load v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16195; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)196; GFX10PLUS-NEXT:    ; return to shader part epilog197;198; GFX12-LABEL: load_2darraymsaa:199; GFX12:       ; %bb.0: ; %main_body200; GFX12-NEXT:    image_load v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16201; GFX12-NEXT:    s_wait_loadcnt 0x0202; GFX12-NEXT:    ; return to shader part epilog203main_body:204  %s = extractelement <2 x i16> %coords_lo, i32 0205  %t = extractelement <2 x i16> %coords_lo, i32 1206  %slice = extractelement <2 x i16> %coords_hi, i32 0207  %fragid = extractelement <2 x i16> %coords_hi, i32 1208  %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)209  ret <4 x float> %v210}211 212define amdgpu_ps <4 x float> @load_mip_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {213; GFX9-LABEL: load_mip_1d:214; GFX9:       ; %bb.0: ; %main_body215; GFX9-NEXT:    image_load_mip v[0:3], v0, s[0:7] dmask:0xf unorm a16216; GFX9-NEXT:    s_waitcnt vmcnt(0)217; GFX9-NEXT:    ; return to shader part epilog218;219; GFX10PLUS-LABEL: load_mip_1d:220; GFX10PLUS:       ; %bb.0: ; %main_body221; GFX10PLUS-NEXT:    image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16222; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)223; GFX10PLUS-NEXT:    ; return to shader part epilog224;225; GFX12-LABEL: load_mip_1d:226; GFX12:       ; %bb.0: ; %main_body227; GFX12-NEXT:    image_load_mip v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16228; GFX12-NEXT:    s_wait_loadcnt 0x0229; GFX12-NEXT:    ; return to shader part epilog230main_body:231  %s = extractelement <2 x i16> %coords, i32 0232  %mip = extractelement <2 x i16> %coords, i32 1233  %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)234  ret <4 x float> %v235}236 237define amdgpu_ps <4 x float> @load_mip_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {238; GFX9-LABEL: load_mip_2d:239; GFX9:       ; %bb.0: ; %main_body240; GFX9-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16241; GFX9-NEXT:    s_waitcnt vmcnt(0)242; GFX9-NEXT:    ; return to shader part epilog243;244; GFX10PLUS-LABEL: load_mip_2d:245; GFX10PLUS:       ; %bb.0: ; %main_body246; GFX10PLUS-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16247; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)248; GFX10PLUS-NEXT:    ; return to shader part epilog249;250; GFX12-LABEL: load_mip_2d:251; GFX12:       ; %bb.0: ; %main_body252; GFX12-NEXT:    image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16253; GFX12-NEXT:    s_wait_loadcnt 0x0254; GFX12-NEXT:    ; return to shader part epilog255main_body:256  %s = extractelement <2 x i16> %coords_lo, i32 0257  %t = extractelement <2 x i16> %coords_lo, i32 1258  %mip = extractelement <2 x i16> %coords_hi, i32 0259  %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)260  ret <4 x float> %v261}262 263define amdgpu_ps <4 x float> @load_mip_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {264; GFX9-LABEL: load_mip_3d:265; GFX9:       ; %bb.0: ; %main_body266; GFX9-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16267; GFX9-NEXT:    s_waitcnt vmcnt(0)268; GFX9-NEXT:    ; return to shader part epilog269;270; GFX10PLUS-LABEL: load_mip_3d:271; GFX10PLUS:       ; %bb.0: ; %main_body272; GFX10PLUS-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16273; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)274; GFX10PLUS-NEXT:    ; return to shader part epilog275;276; GFX12-LABEL: load_mip_3d:277; GFX12:       ; %bb.0: ; %main_body278; GFX12-NEXT:    image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16279; GFX12-NEXT:    s_wait_loadcnt 0x0280; GFX12-NEXT:    ; return to shader part epilog281main_body:282  %s = extractelement <2 x i16> %coords_lo, i32 0283  %t = extractelement <2 x i16> %coords_lo, i32 1284  %r = extractelement <2 x i16> %coords_hi, i32 0285  %mip = extractelement <2 x i16> %coords_hi, i32 1286  %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)287  ret <4 x float> %v288}289 290define amdgpu_ps <4 x float> @load_mip_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {291; GFX9-LABEL: load_mip_cube:292; GFX9:       ; %bb.0: ; %main_body293; GFX9-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da294; GFX9-NEXT:    s_waitcnt vmcnt(0)295; GFX9-NEXT:    ; return to shader part epilog296;297; GFX10PLUS-LABEL: load_mip_cube:298; GFX10PLUS:       ; %bb.0: ; %main_body299; GFX10PLUS-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16300; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)301; GFX10PLUS-NEXT:    ; return to shader part epilog302;303; GFX12-LABEL: load_mip_cube:304; GFX12:       ; %bb.0: ; %main_body305; GFX12-NEXT:    image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16306; GFX12-NEXT:    s_wait_loadcnt 0x0307; GFX12-NEXT:    ; return to shader part epilog308main_body:309  %s = extractelement <2 x i16> %coords_lo, i32 0310  %t = extractelement <2 x i16> %coords_lo, i32 1311  %slice = extractelement <2 x i16> %coords_hi, i32 0312  %mip = extractelement <2 x i16> %coords_hi, i32 1313  %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)314  ret <4 x float> %v315}316 317define amdgpu_ps <4 x float> @load_mip_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {318; GFX9-LABEL: load_mip_1darray:319; GFX9:       ; %bb.0: ; %main_body320; GFX9-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da321; GFX9-NEXT:    s_waitcnt vmcnt(0)322; GFX9-NEXT:    ; return to shader part epilog323;324; GFX10PLUS-LABEL: load_mip_1darray:325; GFX10PLUS:       ; %bb.0: ; %main_body326; GFX10PLUS-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16327; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)328; GFX10PLUS-NEXT:    ; return to shader part epilog329;330; GFX12-LABEL: load_mip_1darray:331; GFX12:       ; %bb.0: ; %main_body332; GFX12-NEXT:    image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16333; GFX12-NEXT:    s_wait_loadcnt 0x0334; GFX12-NEXT:    ; return to shader part epilog335main_body:336  %s = extractelement <2 x i16> %coords_lo, i32 0337  %slice = extractelement <2 x i16> %coords_lo, i32 1338  %mip = extractelement <2 x i16> %coords_hi, i32 0339  %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)340  ret <4 x float> %v341}342 343define amdgpu_ps <4 x float> @load_mip_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {344; GFX9-LABEL: load_mip_2darray:345; GFX9:       ; %bb.0: ; %main_body346; GFX9-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf unorm a16 da347; GFX9-NEXT:    s_waitcnt vmcnt(0)348; GFX9-NEXT:    ; return to shader part epilog349;350; GFX10PLUS-LABEL: load_mip_2darray:351; GFX10PLUS:       ; %bb.0: ; %main_body352; GFX10PLUS-NEXT:    image_load_mip v[0:3], v[0:1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16353; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)354; GFX10PLUS-NEXT:    ; return to shader part epilog355;356; GFX12-LABEL: load_mip_2darray:357; GFX12:       ; %bb.0: ; %main_body358; GFX12-NEXT:    image_load_mip v[0:3], [v0, v1], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16359; GFX12-NEXT:    s_wait_loadcnt 0x0360; GFX12-NEXT:    ; return to shader part epilog361main_body:362  %s = extractelement <2 x i16> %coords_lo, i32 0363  %t = extractelement <2 x i16> %coords_lo, i32 1364  %slice = extractelement <2 x i16> %coords_hi, i32 0365  %mip = extractelement <2 x i16> %coords_hi, i32 1366  %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)367  ret <4 x float> %v368}369 370define amdgpu_ps void @store_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {371; GFX9-LABEL: store_1d:372; GFX9:       ; %bb.0: ; %main_body373; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16374; GFX9-NEXT:    s_endpgm375;376; GFX10PLUS-LABEL: store_1d:377; GFX10PLUS:       ; %bb.0: ; %main_body378; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16379; GFX10PLUS-NEXT:    s_endpgm380;381; GFX12-LABEL: store_1d:382; GFX12:       ; %bb.0: ; %main_body383; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16384; GFX12-NEXT:    s_endpgm385main_body:386  %s = extractelement <2 x i16> %coords, i32 0387  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)388  ret void389}390 391define amdgpu_ps void @store_2d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {392; GFX9-LABEL: store_2d:393; GFX9:       ; %bb.0: ; %main_body394; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16395; GFX9-NEXT:    s_endpgm396;397; GFX10PLUS-LABEL: store_2d:398; GFX10PLUS:       ; %bb.0: ; %main_body399; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16400; GFX10PLUS-NEXT:    s_endpgm401;402; GFX12-LABEL: store_2d:403; GFX12:       ; %bb.0: ; %main_body404; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16405; GFX12-NEXT:    s_endpgm406main_body:407  %s = extractelement <2 x i16> %coords, i32 0408  %t = extractelement <2 x i16> %coords, i32 1409  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)410  ret void411}412 413define amdgpu_ps void @store_3d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {414; GFX9-LABEL: store_3d:415; GFX9:       ; %bb.0: ; %main_body416; GFX9-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16417; GFX9-NEXT:    s_endpgm418;419; GFX10PLUS-LABEL: store_3d:420; GFX10PLUS:       ; %bb.0: ; %main_body421; GFX10PLUS-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16422; GFX10PLUS-NEXT:    s_endpgm423;424; GFX12-LABEL: store_3d:425; GFX12:       ; %bb.0: ; %main_body426; GFX12-NEXT:    image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16427; GFX12-NEXT:    s_endpgm428main_body:429  %s = extractelement <2 x i16> %coords_lo, i32 0430  %t = extractelement <2 x i16> %coords_lo, i32 1431  %r = extractelement <2 x i16> %coords_hi, i32 0432  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)433  ret void434}435 436define amdgpu_ps void @store_cube(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {437; GFX9-LABEL: store_cube:438; GFX9:       ; %bb.0: ; %main_body439; GFX9-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da440; GFX9-NEXT:    s_endpgm441;442; GFX10PLUS-LABEL: store_cube:443; GFX10PLUS:       ; %bb.0: ; %main_body444; GFX10PLUS-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16445; GFX10PLUS-NEXT:    s_endpgm446;447; GFX12-LABEL: store_cube:448; GFX12:       ; %bb.0: ; %main_body449; GFX12-NEXT:    image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16450; GFX12-NEXT:    s_endpgm451main_body:452  %s = extractelement <2 x i16> %coords_lo, i32 0453  %t = extractelement <2 x i16> %coords_lo, i32 1454  %slice = extractelement <2 x i16> %coords_hi, i32 0455  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)456  ret void457}458 459define amdgpu_ps void @store_1darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {460; GFX9-LABEL: store_1darray:461; GFX9:       ; %bb.0: ; %main_body462; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm a16 da463; GFX9-NEXT:    s_endpgm464;465; GFX10PLUS-LABEL: store_1darray:466; GFX10PLUS:       ; %bb.0: ; %main_body467; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16468; GFX10PLUS-NEXT:    s_endpgm469;470; GFX12-LABEL: store_1darray:471; GFX12:       ; %bb.0: ; %main_body472; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16473; GFX12-NEXT:    s_endpgm474main_body:475  %s = extractelement <2 x i16> %coords, i32 0476  %slice = extractelement <2 x i16> %coords, i32 1477  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)478  ret void479}480 481define amdgpu_ps void @store_2darray(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {482; GFX9-LABEL: store_2darray:483; GFX9:       ; %bb.0: ; %main_body484; GFX9-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da485; GFX9-NEXT:    s_endpgm486;487; GFX10PLUS-LABEL: store_2darray:488; GFX10PLUS:       ; %bb.0: ; %main_body489; GFX10PLUS-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16490; GFX10PLUS-NEXT:    s_endpgm491;492; GFX12-LABEL: store_2darray:493; GFX12:       ; %bb.0: ; %main_body494; GFX12-NEXT:    image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16495; GFX12-NEXT:    s_endpgm496main_body:497  %s = extractelement <2 x i16> %coords_lo, i32 0498  %t = extractelement <2 x i16> %coords_lo, i32 1499  %slice = extractelement <2 x i16> %coords_hi, i32 0500  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)501  ret void502}503 504define amdgpu_ps void @store_2dmsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {505; GFX9-LABEL: store_2dmsaa:506; GFX9:       ; %bb.0: ; %main_body507; GFX9-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16508; GFX9-NEXT:    s_endpgm509;510; GFX10PLUS-LABEL: store_2dmsaa:511; GFX10PLUS:       ; %bb.0: ; %main_body512; GFX10PLUS-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16513; GFX10PLUS-NEXT:    s_endpgm514;515; GFX12-LABEL: store_2dmsaa:516; GFX12:       ; %bb.0: ; %main_body517; GFX12-NEXT:    image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16518; GFX12-NEXT:    s_endpgm519main_body:520  %s = extractelement <2 x i16> %coords_lo, i32 0521  %t = extractelement <2 x i16> %coords_lo, i32 1522  %fragid = extractelement <2 x i16> %coords_hi, i32 0523  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)524  ret void525}526 527define amdgpu_ps void @store_2darraymsaa(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords_lo, <2 x i16> %coords_hi) {528; GFX9-LABEL: store_2darraymsaa:529; GFX9:       ; %bb.0: ; %main_body530; GFX9-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da531; GFX9-NEXT:    s_endpgm532;533; GFX10PLUS-LABEL: store_2darraymsaa:534; GFX10PLUS:       ; %bb.0: ; %main_body535; GFX10PLUS-NEXT:    image_store v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16536; GFX10PLUS-NEXT:    s_endpgm537;538; GFX12-LABEL: store_2darraymsaa:539; GFX12:       ; %bb.0: ; %main_body540; GFX12-NEXT:    image_store v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16541; GFX12-NEXT:    s_endpgm542main_body:543  %s = extractelement <2 x i16> %coords_lo, i32 0544  %t = extractelement <2 x i16> %coords_lo, i32 1545  %slice = extractelement <2 x i16> %coords_hi, i32 0546  %fragid = extractelement <2 x i16> %coords_hi, i32 1547  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)548  ret void549}550 551define amdgpu_ps void @store_mip_1d(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {552; GFX9-LABEL: store_mip_1d:553; GFX9:       ; %bb.0: ; %main_body554; GFX9-NEXT:    image_store_mip v[0:3], v4, s[0:7] dmask:0xf unorm a16555; GFX9-NEXT:    s_endpgm556;557; GFX10PLUS-LABEL: store_mip_1d:558; GFX10PLUS:       ; %bb.0: ; %main_body559; GFX10PLUS-NEXT:    image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16560; GFX10PLUS-NEXT:    s_endpgm561;562; GFX12-LABEL: store_mip_1d:563; GFX12:       ; %bb.0: ; %main_body564; GFX12-NEXT:    image_store_mip v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16565; GFX12-NEXT:    s_endpgm566main_body:567  %s = extractelement <2 x i16> %coords, i32 0568  %mip = extractelement <2 x i16> %coords, i32 1569  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)570  ret void571}572 573define 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) {574; GFX9-LABEL: store_mip_2d:575; GFX9:       ; %bb.0: ; %main_body576; GFX9-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16577; GFX9-NEXT:    s_endpgm578;579; GFX10PLUS-LABEL: store_mip_2d:580; GFX10PLUS:       ; %bb.0: ; %main_body581; GFX10PLUS-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16582; GFX10PLUS-NEXT:    s_endpgm583;584; GFX12-LABEL: store_mip_2d:585; GFX12:       ; %bb.0: ; %main_body586; GFX12-NEXT:    image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16587; GFX12-NEXT:    s_endpgm588main_body:589  %s = extractelement <2 x i16> %coords_lo, i32 0590  %t = extractelement <2 x i16> %coords_lo, i32 1591  %mip = extractelement <2 x i16> %coords_hi, i32 0592  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)593  ret void594}595 596define 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) {597; GFX9-LABEL: store_mip_3d:598; GFX9:       ; %bb.0: ; %main_body599; GFX9-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16600; GFX9-NEXT:    s_endpgm601;602; GFX10PLUS-LABEL: store_mip_3d:603; GFX10PLUS:       ; %bb.0: ; %main_body604; GFX10PLUS-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16605; GFX10PLUS-NEXT:    s_endpgm606;607; GFX12-LABEL: store_mip_3d:608; GFX12:       ; %bb.0: ; %main_body609; GFX12-NEXT:    image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16610; GFX12-NEXT:    s_endpgm611main_body:612  %s = extractelement <2 x i16> %coords_lo, i32 0613  %t = extractelement <2 x i16> %coords_lo, i32 1614  %r = extractelement <2 x i16> %coords_hi, i32 0615  %mip = extractelement <2 x i16> %coords_hi, i32 1616  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)617  ret void618}619 620define 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) {621; GFX9-LABEL: store_mip_cube:622; GFX9:       ; %bb.0: ; %main_body623; GFX9-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da624; GFX9-NEXT:    s_endpgm625;626; GFX10PLUS-LABEL: store_mip_cube:627; GFX10PLUS:       ; %bb.0: ; %main_body628; GFX10PLUS-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16629; GFX10PLUS-NEXT:    s_endpgm630;631; GFX12-LABEL: store_mip_cube:632; GFX12:       ; %bb.0: ; %main_body633; GFX12-NEXT:    image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16634; GFX12-NEXT:    s_endpgm635main_body:636  %s = extractelement <2 x i16> %coords_lo, i32 0637  %t = extractelement <2 x i16> %coords_lo, i32 1638  %slice = extractelement <2 x i16> %coords_hi, i32 0639  %mip = extractelement <2 x i16> %coords_hi, i32 1640  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)641  ret void642}643 644define 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) {645; GFX9-LABEL: store_mip_1darray:646; GFX9:       ; %bb.0: ; %main_body647; GFX9-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da648; GFX9-NEXT:    s_endpgm649;650; GFX10PLUS-LABEL: store_mip_1darray:651; GFX10PLUS:       ; %bb.0: ; %main_body652; GFX10PLUS-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16653; GFX10PLUS-NEXT:    s_endpgm654;655; GFX12-LABEL: store_mip_1darray:656; GFX12:       ; %bb.0: ; %main_body657; GFX12-NEXT:    image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16658; GFX12-NEXT:    s_endpgm659main_body:660  %s = extractelement <2 x i16> %coords_lo, i32 0661  %slice = extractelement <2 x i16> %coords_lo, i32 1662  %mip = extractelement <2 x i16> %coords_hi, i32 0663  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)664  ret void665}666 667define 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) {668; GFX9-LABEL: store_mip_2darray:669; GFX9:       ; %bb.0: ; %main_body670; GFX9-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf unorm a16 da671; GFX9-NEXT:    s_endpgm672;673; GFX10PLUS-LABEL: store_mip_2darray:674; GFX10PLUS:       ; %bb.0: ; %main_body675; GFX10PLUS-NEXT:    image_store_mip v[0:3], v[4:5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16676; GFX10PLUS-NEXT:    s_endpgm677;678; GFX12-LABEL: store_mip_2darray:679; GFX12:       ; %bb.0: ; %main_body680; GFX12-NEXT:    image_store_mip v[0:3], [v4, v5], s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16681; GFX12-NEXT:    s_endpgm682main_body:683  %s = extractelement <2 x i16> %coords_lo, i32 0684  %t = extractelement <2 x i16> %coords_lo, i32 1685  %slice = extractelement <2 x i16> %coords_hi, i32 0686  %mip = extractelement <2 x i16> %coords_hi, i32 1687  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)688  ret void689}690 691define amdgpu_ps <4 x float> @getresinfo_1d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {692; GFX9-LABEL: getresinfo_1d:693; GFX9:       ; %bb.0: ; %main_body694; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16695; GFX9-NEXT:    s_waitcnt vmcnt(0)696; GFX9-NEXT:    ; return to shader part epilog697;698; GFX10PLUS-LABEL: getresinfo_1d:699; GFX10PLUS:       ; %bb.0: ; %main_body700; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm a16701; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)702; GFX10PLUS-NEXT:    ; return to shader part epilog703;704; GFX12-LABEL: getresinfo_1d:705; GFX12:       ; %bb.0: ; %main_body706; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D a16707; GFX12-NEXT:    s_wait_loadcnt 0x0708; GFX12-NEXT:    ; return to shader part epilog709main_body:710  %mip = extractelement <2 x i16> %coords, i32 0711  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)712  ret <4 x float> %v713}714 715define amdgpu_ps <4 x float> @getresinfo_2d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {716; GFX9-LABEL: getresinfo_2d:717; GFX9:       ; %bb.0: ; %main_body718; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16719; GFX9-NEXT:    s_waitcnt vmcnt(0)720; GFX9-NEXT:    ; return to shader part epilog721;722; GFX10PLUS-LABEL: getresinfo_2d:723; GFX10PLUS:       ; %bb.0: ; %main_body724; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D unorm a16725; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)726; GFX10PLUS-NEXT:    ; return to shader part epilog727;728; GFX12-LABEL: getresinfo_2d:729; GFX12:       ; %bb.0: ; %main_body730; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D a16731; GFX12-NEXT:    s_wait_loadcnt 0x0732; GFX12-NEXT:    ; return to shader part epilog733main_body:734  %mip = extractelement <2 x i16> %coords, i32 0735  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)736  ret <4 x float> %v737}738 739define amdgpu_ps <4 x float> @getresinfo_3d(<8 x i32> inreg %rsrc, <2 x i16> %coords) {740; GFX9-LABEL: getresinfo_3d:741; GFX9:       ; %bb.0: ; %main_body742; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16743; GFX9-NEXT:    s_waitcnt vmcnt(0)744; GFX9-NEXT:    ; return to shader part epilog745;746; GFX10PLUS-LABEL: getresinfo_3d:747; GFX10PLUS:       ; %bb.0: ; %main_body748; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D unorm a16749; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)750; GFX10PLUS-NEXT:    ; return to shader part epilog751;752; GFX12-LABEL: getresinfo_3d:753; GFX12:       ; %bb.0: ; %main_body754; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_3D a16755; GFX12-NEXT:    s_wait_loadcnt 0x0756; GFX12-NEXT:    ; return to shader part epilog757main_body:758  %mip = extractelement <2 x i16> %coords, i32 0759  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)760  ret <4 x float> %v761}762 763define amdgpu_ps <4 x float> @getresinfo_cube(<8 x i32> inreg %rsrc, <2 x i16> %coords) {764; GFX9-LABEL: getresinfo_cube:765; GFX9:       ; %bb.0: ; %main_body766; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da767; GFX9-NEXT:    s_waitcnt vmcnt(0)768; GFX9-NEXT:    ; return to shader part epilog769;770; GFX10PLUS-LABEL: getresinfo_cube:771; GFX10PLUS:       ; %bb.0: ; %main_body772; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE unorm a16773; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)774; GFX10PLUS-NEXT:    ; return to shader part epilog775;776; GFX12-LABEL: getresinfo_cube:777; GFX12:       ; %bb.0: ; %main_body778; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_CUBE a16779; GFX12-NEXT:    s_wait_loadcnt 0x0780; GFX12-NEXT:    ; return to shader part epilog781main_body:782  %mip = extractelement <2 x i16> %coords, i32 0783  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)784  ret <4 x float> %v785}786 787define amdgpu_ps <4 x float> @getresinfo_1darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {788; GFX9-LABEL: getresinfo_1darray:789; GFX9:       ; %bb.0: ; %main_body790; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da791; GFX9-NEXT:    s_waitcnt vmcnt(0)792; GFX9-NEXT:    ; return to shader part epilog793;794; GFX10PLUS-LABEL: getresinfo_1darray:795; GFX10PLUS:       ; %bb.0: ; %main_body796; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY unorm a16797; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)798; GFX10PLUS-NEXT:    ; return to shader part epilog799;800; GFX12-LABEL: getresinfo_1darray:801; GFX12:       ; %bb.0: ; %main_body802; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D_ARRAY a16803; GFX12-NEXT:    s_wait_loadcnt 0x0804; GFX12-NEXT:    ; return to shader part epilog805main_body:806  %mip = extractelement <2 x i16> %coords, i32 0807  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)808  ret <4 x float> %v809}810 811define amdgpu_ps <4 x float> @getresinfo_2darray(<8 x i32> inreg %rsrc, <2 x i16> %coords) {812; GFX9-LABEL: getresinfo_2darray:813; GFX9:       ; %bb.0: ; %main_body814; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da815; GFX9-NEXT:    s_waitcnt vmcnt(0)816; GFX9-NEXT:    ; return to shader part epilog817;818; GFX10PLUS-LABEL: getresinfo_2darray:819; GFX10PLUS:       ; %bb.0: ; %main_body820; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm a16821; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)822; GFX10PLUS-NEXT:    ; return to shader part epilog823;824; GFX12-LABEL: getresinfo_2darray:825; GFX12:       ; %bb.0: ; %main_body826; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY a16827; GFX12-NEXT:    s_wait_loadcnt 0x0828; GFX12-NEXT:    ; return to shader part epilog829main_body:830  %mip = extractelement <2 x i16> %coords, i32 0831  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)832  ret <4 x float> %v833}834 835define amdgpu_ps <4 x float> @getresinfo_2dmsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {836; GFX9-LABEL: getresinfo_2dmsaa:837; GFX9:       ; %bb.0: ; %main_body838; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16839; GFX9-NEXT:    s_waitcnt vmcnt(0)840; GFX9-NEXT:    ; return to shader part epilog841;842; GFX10PLUS-LABEL: getresinfo_2dmsaa:843; GFX10PLUS:       ; %bb.0: ; %main_body844; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA unorm a16845; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)846; GFX10PLUS-NEXT:    ; return to shader part epilog847;848; GFX12-LABEL: getresinfo_2dmsaa:849; GFX12:       ; %bb.0: ; %main_body850; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA a16851; GFX12-NEXT:    s_wait_loadcnt 0x0852; GFX12-NEXT:    ; return to shader part epilog853main_body:854  %mip = extractelement <2 x i16> %coords, i32 0855  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)856  ret <4 x float> %v857}858 859define amdgpu_ps <4 x float> @getresinfo_2darraymsaa(<8 x i32> inreg %rsrc, <2 x i16> %coords) {860; GFX9-LABEL: getresinfo_2darraymsaa:861; GFX9:       ; %bb.0: ; %main_body862; GFX9-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf unorm a16 da863; GFX9-NEXT:    s_waitcnt vmcnt(0)864; GFX9-NEXT:    ; return to shader part epilog865;866; GFX10PLUS-LABEL: getresinfo_2darraymsaa:867; GFX10PLUS:       ; %bb.0: ; %main_body868; GFX10PLUS-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY unorm a16869; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)870; GFX10PLUS-NEXT:    ; return to shader part epilog871;872; GFX12-LABEL: getresinfo_2darraymsaa:873; GFX12:       ; %bb.0: ; %main_body874; GFX12-NEXT:    image_get_resinfo v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY a16875; GFX12-NEXT:    s_wait_loadcnt 0x0876; GFX12-NEXT:    ; return to shader part epilog877main_body:878  %mip = extractelement <2 x i16> %coords, i32 0879  %v = call <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32 15, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)880  ret <4 x float> %v881}882 883define amdgpu_ps float @load_1d_V1(<8 x i32> inreg %rsrc, <2 x i16> %coords) {884; GFX9-LABEL: load_1d_V1:885; GFX9:       ; %bb.0: ; %main_body886; GFX9-NEXT:    image_load v0, v0, s[0:7] dmask:0x8 unorm a16887; GFX9-NEXT:    s_waitcnt vmcnt(0)888; GFX9-NEXT:    ; return to shader part epilog889;890; GFX10PLUS-LABEL: load_1d_V1:891; GFX10PLUS:       ; %bb.0: ; %main_body892; GFX10PLUS-NEXT:    image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D unorm a16893; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)894; GFX10PLUS-NEXT:    ; return to shader part epilog895;896; GFX12-LABEL: load_1d_V1:897; GFX12:       ; %bb.0: ; %main_body898; GFX12-NEXT:    image_load v0, v0, s[0:7] dmask:0x8 dim:SQ_RSRC_IMG_1D a16899; GFX12-NEXT:    s_wait_loadcnt 0x0900; GFX12-NEXT:    ; return to shader part epilog901main_body:902  %s = extractelement <2 x i16> %coords, i32 0903  %v = call float @llvm.amdgcn.image.load.1d.f32.i16(i32 8, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)904  ret float %v905}906 907define amdgpu_ps <2 x float> @load_1d_V2(<8 x i32> inreg %rsrc, <2 x i16> %coords) {908; GFX9-LABEL: load_1d_V2:909; GFX9:       ; %bb.0: ; %main_body910; GFX9-NEXT:    image_load v[0:1], v0, s[0:7] dmask:0x9 unorm a16911; GFX9-NEXT:    s_waitcnt vmcnt(0)912; GFX9-NEXT:    ; return to shader part epilog913;914; GFX10PLUS-LABEL: load_1d_V2:915; GFX10PLUS:       ; %bb.0: ; %main_body916; GFX10PLUS-NEXT:    image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D unorm a16917; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)918; GFX10PLUS-NEXT:    ; return to shader part epilog919;920; GFX12-LABEL: load_1d_V2:921; GFX12:       ; %bb.0: ; %main_body922; GFX12-NEXT:    image_load v[0:1], v0, s[0:7] dmask:0x9 dim:SQ_RSRC_IMG_1D a16923; GFX12-NEXT:    s_wait_loadcnt 0x0924; GFX12-NEXT:    ; return to shader part epilog925main_body:926  %s = extractelement <2 x i16> %coords, i32 0927  %v = call <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32 9, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)928  ret <2 x float> %v929}930 931define amdgpu_ps void @store_1d_V1(<8 x i32> inreg %rsrc, float %vdata, <2 x i16> %coords) {932; GFX9-LABEL: store_1d_V1:933; GFX9:       ; %bb.0: ; %main_body934; GFX9-NEXT:    image_store v0, v1, s[0:7] dmask:0x2 unorm a16935; GFX9-NEXT:    s_endpgm936;937; GFX10PLUS-LABEL: store_1d_V1:938; GFX10PLUS:       ; %bb.0: ; %main_body939; GFX10PLUS-NEXT:    image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D unorm a16940; GFX10PLUS-NEXT:    s_endpgm941;942; GFX12-LABEL: store_1d_V1:943; GFX12:       ; %bb.0: ; %main_body944; GFX12-NEXT:    image_store v0, v1, s[0:7] dmask:0x2 dim:SQ_RSRC_IMG_1D a16945; GFX12-NEXT:    s_endpgm946main_body:947  %s = extractelement <2 x i16> %coords, i32 0948  call void @llvm.amdgcn.image.store.1d.f32.i16(float %vdata, i32 2, i16 %s, <8 x i32> %rsrc, i32 0, i32 0)949  ret void950}951 952define amdgpu_ps void @store_1d_V2(<8 x i32> inreg %rsrc, <2 x float> %vdata, <2 x i16> %coords) {953; GFX9-LABEL: store_1d_V2:954; GFX9:       ; %bb.0: ; %main_body955; GFX9-NEXT:    image_store v[0:1], v2, s[0:7] dmask:0xc unorm a16956; GFX9-NEXT:    s_endpgm957;958; GFX10PLUS-LABEL: store_1d_V2:959; GFX10PLUS:       ; %bb.0: ; %main_body960; GFX10PLUS-NEXT:    image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D unorm a16961; GFX10PLUS-NEXT:    s_endpgm962;963; GFX12-LABEL: store_1d_V2:964; GFX12:       ; %bb.0: ; %main_body965; GFX12-NEXT:    image_store v[0:1], v2, s[0:7] dmask:0xc dim:SQ_RSRC_IMG_1D a16966; GFX12-NEXT:    s_endpgm967main_body:968  %s = extractelement <2 x i16> %coords, i32 0969  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)970  ret void971}972 973define amdgpu_ps <4 x float> @load_1d_glc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {974; GFX9-LABEL: load_1d_glc:975; GFX9:       ; %bb.0: ; %main_body976; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc a16977; GFX9-NEXT:    s_waitcnt vmcnt(0)978; GFX9-NEXT:    ; return to shader part epilog979;980; GFX10PLUS-LABEL: load_1d_glc:981; GFX10PLUS:       ; %bb.0: ; %main_body982; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a16983; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)984; GFX10PLUS-NEXT:    ; return to shader part epilog985;986; GFX12-LABEL: load_1d_glc:987; GFX12:       ; %bb.0: ; %main_body988; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_NT a16989; GFX12-NEXT:    s_wait_loadcnt 0x0990; GFX12-NEXT:    ; return to shader part epilog991main_body:992  %s = extractelement <2 x i16> %coords, i32 0993  %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 1)994  ret <4 x float> %v995}996 997define amdgpu_ps <4 x float> @load_1d_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {998; GFX9-LABEL: load_1d_slc:999; GFX9:       ; %bb.0: ; %main_body1000; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm slc a161001; GFX9-NEXT:    s_waitcnt vmcnt(0)1002; GFX9-NEXT:    ; return to shader part epilog1003;1004; GFX10PLUS-LABEL: load_1d_slc:1005; GFX10PLUS:       ; %bb.0: ; %main_body1006; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a161007; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)1008; GFX10PLUS-NEXT:    ; return to shader part epilog1009;1010; GFX12-LABEL: load_1d_slc:1011; GFX12:       ; %bb.0: ; %main_body1012; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_HT a161013; GFX12-NEXT:    s_wait_loadcnt 0x01014; GFX12-NEXT:    ; return to shader part epilog1015main_body:1016  %s = extractelement <2 x i16> %coords, i32 01017  %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 2)1018  ret <4 x float> %v1019}1020 1021define amdgpu_ps <4 x float> @load_1d_glc_slc(<8 x i32> inreg %rsrc, <2 x i16> %coords) {1022; GFX9-LABEL: load_1d_glc_slc:1023; GFX9:       ; %bb.0: ; %main_body1024; GFX9-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf unorm glc slc a161025; GFX9-NEXT:    s_waitcnt vmcnt(0)1026; GFX9-NEXT:    ; return to shader part epilog1027;1028; GFX10PLUS-LABEL: load_1d_glc_slc:1029; GFX10PLUS:       ; %bb.0: ; %main_body1030; GFX10PLUS-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a161031; GFX10PLUS-NEXT:    s_waitcnt vmcnt(0)1032; GFX10PLUS-NEXT:    ; return to shader part epilog1033;1034; GFX12-LABEL: load_1d_glc_slc:1035; GFX12:       ; %bb.0: ; %main_body1036; GFX12-NEXT:    image_load v[0:3], v0, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_LOAD_LU a161037; GFX12-NEXT:    s_wait_loadcnt 0x01038; GFX12-NEXT:    ; return to shader part epilog1039main_body:1040  %s = extractelement <2 x i16> %coords, i32 01041  %v = call <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32 15, i16 %s, <8 x i32> %rsrc, i32 0, i32 3)1042  ret <4 x float> %v1043}1044 1045define amdgpu_ps void @store_1d_glc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {1046; GFX9-LABEL: store_1d_glc:1047; GFX9:       ; %bb.0: ; %main_body1048; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc a161049; GFX9-NEXT:    s_endpgm1050;1051; GFX10PLUS-LABEL: store_1d_glc:1052; GFX10PLUS:       ; %bb.0: ; %main_body1053; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc a161054; GFX10PLUS-NEXT:    s_endpgm1055;1056; GFX12-LABEL: store_1d_glc:1057; GFX12:       ; %bb.0: ; %main_body1058; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_NT a161059; GFX12-NEXT:    s_endpgm1060main_body:1061  %s = extractelement <2 x i16> %coords, i32 01062  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)1063  ret void1064}1065 1066define amdgpu_ps void @store_1d_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {1067; GFX9-LABEL: store_1d_slc:1068; GFX9:       ; %bb.0: ; %main_body1069; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm slc a161070; GFX9-NEXT:    s_endpgm1071;1072; GFX10PLUS-LABEL: store_1d_slc:1073; GFX10PLUS:       ; %bb.0: ; %main_body1074; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm slc a161075; GFX10PLUS-NEXT:    s_endpgm1076;1077; GFX12-LABEL: store_1d_slc:1078; GFX12:       ; %bb.0: ; %main_body1079; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_HT a161080; GFX12-NEXT:    s_endpgm1081main_body:1082  %s = extractelement <2 x i16> %coords, i32 01083  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)1084  ret void1085}1086 1087define amdgpu_ps void @store_1d_glc_slc(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) {1088; GFX9-LABEL: store_1d_glc_slc:1089; GFX9:       ; %bb.0: ; %main_body1090; GFX9-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf unorm glc slc a161091; GFX9-NEXT:    s_endpgm1092;1093; GFX10PLUS-LABEL: store_1d_glc_slc:1094; GFX10PLUS:       ; %bb.0: ; %main_body1095; GFX10PLUS-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D unorm glc slc a161096; GFX10PLUS-NEXT:    s_endpgm1097;1098; GFX12-LABEL: store_1d_glc_slc:1099; GFX12:       ; %bb.0: ; %main_body1100; GFX12-NEXT:    image_store v[0:3], v4, s[0:7] dmask:0xf dim:SQ_RSRC_IMG_1D th:TH_STORE_WB a161101; GFX12-NEXT:    s_endpgm1102main_body:1103  %s = extractelement <2 x i16> %coords, i32 01104  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)1105  ret void1106}1107 1108define amdgpu_ps <4 x float> @getresinfo_dmask0(<8 x i32> inreg %rsrc, <4 x float> %vdata, <2 x i16> %coords) #0 {1109; GFX9-LABEL: getresinfo_dmask0:1110; GFX9:       ; %bb.0: ; %main_body1111; GFX9-NEXT:    ; return to shader part epilog1112;1113; GFX10PLUS-LABEL: getresinfo_dmask0:1114; GFX10PLUS:       ; %bb.0: ; %main_body1115; GFX10PLUS-NEXT:    ; return to shader part epilog1116;1117; GFX12-LABEL: getresinfo_dmask0:1118; GFX12:       ; %bb.0: ; %main_body1119; GFX12-NEXT:    ; return to shader part epilog1120main_body:1121  %mip = extractelement <2 x i16> %coords, i32 01122  %r = call <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32 0, i16 %mip, <8 x i32> %rsrc, i32 0, i32 0)1123  ret <4 x float> %r1124}1125 1126declare <4 x float> @llvm.amdgcn.image.load.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #11127declare <4 x float> @llvm.amdgcn.image.load.2d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #11128declare <4 x float> @llvm.amdgcn.image.load.3d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11129declare <4 x float> @llvm.amdgcn.image.load.cube.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11130declare <4 x float> @llvm.amdgcn.image.load.1darray.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #11131declare <4 x float> @llvm.amdgcn.image.load.2darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11132declare <4 x float> @llvm.amdgcn.image.load.2dmsaa.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11133declare <4 x float> @llvm.amdgcn.image.load.2darraymsaa.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #11134 1135declare <4 x float> @llvm.amdgcn.image.load.mip.1d.v4f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #11136declare <4 x float> @llvm.amdgcn.image.load.mip.2d.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11137declare <4 x float> @llvm.amdgcn.image.load.mip.3d.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #11138declare <4 x float> @llvm.amdgcn.image.load.mip.cube.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #11139declare <4 x float> @llvm.amdgcn.image.load.mip.1darray.v4f32.i16(i32, i16, i16, i16, <8 x i32>, i32, i32) #11140declare <4 x float> @llvm.amdgcn.image.load.mip.2darray.v4f32.i16(i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #11141 1142declare void @llvm.amdgcn.image.store.1d.v4f32.i16(<4 x float>, i32, i16, <8 x i32>, i32, i32) #01143declare void @llvm.amdgcn.image.store.2d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #01144declare void @llvm.amdgcn.image.store.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01145declare void @llvm.amdgcn.image.store.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01146declare void @llvm.amdgcn.image.store.1darray.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #01147declare void @llvm.amdgcn.image.store.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01148declare void @llvm.amdgcn.image.store.2dmsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01149declare void @llvm.amdgcn.image.store.2darraymsaa.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #01150 1151declare void @llvm.amdgcn.image.store.mip.1d.v4f32.i16(<4 x float>, i32, i16, i16, <8 x i32>, i32, i32) #01152declare void @llvm.amdgcn.image.store.mip.2d.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01153declare void @llvm.amdgcn.image.store.mip.3d.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #01154declare void @llvm.amdgcn.image.store.mip.cube.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #01155declare void @llvm.amdgcn.image.store.mip.1darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, <8 x i32>, i32, i32) #01156declare void @llvm.amdgcn.image.store.mip.2darray.v4f32.i16(<4 x float>, i32, i16, i16, i16, i16, <8 x i32>, i32, i32) #01157 1158declare <4 x float> @llvm.amdgcn.image.getresinfo.1d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21159declare <4 x float> @llvm.amdgcn.image.getresinfo.2d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21160declare <4 x float> @llvm.amdgcn.image.getresinfo.3d.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21161declare <4 x float> @llvm.amdgcn.image.getresinfo.cube.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21162declare <4 x float> @llvm.amdgcn.image.getresinfo.1darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21163declare <4 x float> @llvm.amdgcn.image.getresinfo.2darray.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21164declare <4 x float> @llvm.amdgcn.image.getresinfo.2dmsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21165declare <4 x float> @llvm.amdgcn.image.getresinfo.2darraymsaa.v4f32.i16(i32, i16, <8 x i32>, i32, i32) #21166 1167declare float @llvm.amdgcn.image.load.1d.f32.i16(i32, i16, <8 x i32>, i32, i32) #11168declare float @llvm.amdgcn.image.load.2d.f32.i16(i32, i16, i16, <8 x i32>, i32, i32) #11169declare <2 x float> @llvm.amdgcn.image.load.1d.v2f32.i16(i32, i16, <8 x i32>, i32, i32) #11170declare void @llvm.amdgcn.image.store.1d.f32.i16(float, i32, i16, <8 x i32>, i32, i32) #01171declare void @llvm.amdgcn.image.store.1d.v2f32.i16(<2 x float>, i32, i16, <8 x i32>, i32, i32) #01172 1173attributes #0 = { nounwind }1174attributes #1 = { nounwind readonly }1175attributes #2 = { nounwind readnone }1176;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:1177; GFX10: {{.*}}1178; GFX11: {{.*}}1179