368 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s3; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10 %s4; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 < %s | FileCheck -check-prefix=GFX11 %s5 6declare void @extern_func() #27 8define <4 x float> @non_preserved_vgpr_tuple8(<8 x i32> %rsrc, <4 x i32> %samp, float %bias, float %zcompare, float %s, float %t, float %clamp) {9; The vgpr tuple8 operand in image_gather4_c_b_cl instruction needs not be10; preserved across the call and should get 8 scratch registers.11; GFX9-LABEL: non_preserved_vgpr_tuple8:12; GFX9: ; %bb.0: ; %main_body13; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)14; GFX9-NEXT: s_mov_b32 s4, s3315; GFX9-NEXT: s_mov_b32 s33, s3216; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -117; GFX9-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill18; GFX9-NEXT: s_mov_b64 exec, s[6:7]19; GFX9-NEXT: v_mov_b32_e32 v36, v1620; GFX9-NEXT: v_mov_b32_e32 v35, v1521; GFX9-NEXT: v_mov_b32_e32 v34, v1422; GFX9-NEXT: v_mov_b32_e32 v33, v1323; GFX9-NEXT: v_mov_b32_e32 v32, v1224; GFX9-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill25; GFX9-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill26; GFX9-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill27; GFX9-NEXT: buffer_store_dword v43, off, s[0:3], s33 ; 4-byte Folded Spill28; GFX9-NEXT: ;;#ASMSTART29; GFX9-NEXT: ;;#ASMEND30; GFX9-NEXT: ;;#ASMSTART31; GFX9-NEXT: ;;#ASMEND32; GFX9-NEXT: ;;#ASMSTART33; GFX9-NEXT: ;;#ASMEND34; GFX9-NEXT: ;;#ASMSTART35; GFX9-NEXT: ;;#ASMEND36; GFX9-NEXT: image_gather4_c_b_cl v[40:43], v[32:36], s[4:11], s[4:7] dmask:0x137; GFX9-NEXT: s_addk_i32 s32, 0x80038; GFX9-NEXT: v_writelane_b32 v44, s4, 239; GFX9-NEXT: s_getpc_b64 s[4:5]40; GFX9-NEXT: s_add_u32 s4, s4, extern_func@gotpcrel32@lo+441; GFX9-NEXT: s_addc_u32 s5, s5, extern_func@gotpcrel32@hi+1242; GFX9-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x043; GFX9-NEXT: v_writelane_b32 v44, s30, 044; GFX9-NEXT: v_writelane_b32 v44, s31, 145; GFX9-NEXT: s_waitcnt lgkmcnt(0)46; GFX9-NEXT: s_swappc_b64 s[30:31], s[4:5]47; GFX9-NEXT: v_mov_b32_e32 v0, v4048; GFX9-NEXT: v_mov_b32_e32 v1, v4149; GFX9-NEXT: v_mov_b32_e32 v2, v4250; GFX9-NEXT: v_mov_b32_e32 v3, v4351; GFX9-NEXT: buffer_load_dword v43, off, s[0:3], s33 ; 4-byte Folded Reload52; GFX9-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload53; GFX9-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload54; GFX9-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload55; GFX9-NEXT: v_readlane_b32 s31, v44, 156; GFX9-NEXT: v_readlane_b32 s30, v44, 057; GFX9-NEXT: s_mov_b32 s32, s3358; GFX9-NEXT: v_readlane_b32 s4, v44, 259; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -160; GFX9-NEXT: buffer_load_dword v44, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload61; GFX9-NEXT: s_mov_b64 exec, s[6:7]62; GFX9-NEXT: s_mov_b32 s33, s463; GFX9-NEXT: s_waitcnt vmcnt(0)64; GFX9-NEXT: s_setpc_b64 s[30:31]65;66; GFX10-LABEL: non_preserved_vgpr_tuple8:67; GFX10: ; %bb.0: ; %main_body68; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)69; GFX10-NEXT: s_mov_b32 s4, s3370; GFX10-NEXT: s_mov_b32 s33, s3271; GFX10-NEXT: s_or_saveexec_b32 s5, -172; GFX10-NEXT: buffer_store_dword v44, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill73; GFX10-NEXT: s_waitcnt_depctr depctr_vm_vsrc(0)74; GFX10-NEXT: s_mov_b32 exec_lo, s575; GFX10-NEXT: v_mov_b32_e32 v36, v1676; GFX10-NEXT: v_mov_b32_e32 v35, v1577; GFX10-NEXT: v_mov_b32_e32 v34, v1478; GFX10-NEXT: v_mov_b32_e32 v33, v1379; GFX10-NEXT: v_mov_b32_e32 v32, v1280; GFX10-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill81; GFX10-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill82; GFX10-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill83; GFX10-NEXT: buffer_store_dword v43, off, s[0:3], s33 ; 4-byte Folded Spill84; GFX10-NEXT: ;;#ASMSTART85; GFX10-NEXT: ;;#ASMEND86; GFX10-NEXT: ;;#ASMSTART87; GFX10-NEXT: ;;#ASMEND88; GFX10-NEXT: ;;#ASMSTART89; GFX10-NEXT: ;;#ASMEND90; GFX10-NEXT: ;;#ASMSTART91; GFX10-NEXT: ;;#ASMEND92; GFX10-NEXT: image_gather4_c_b_cl v[40:43], v[32:36], s[4:11], s[4:7] dmask:0x1 dim:SQ_RSRC_IMG_2D93; GFX10-NEXT: s_addk_i32 s32, 0x40094; GFX10-NEXT: v_writelane_b32 v44, s4, 295; GFX10-NEXT: s_getpc_b64 s[4:5]96; GFX10-NEXT: s_add_u32 s4, s4, extern_func@gotpcrel32@lo+497; GFX10-NEXT: s_addc_u32 s5, s5, extern_func@gotpcrel32@hi+1298; GFX10-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x099; GFX10-NEXT: v_writelane_b32 v44, s30, 0100; GFX10-NEXT: v_writelane_b32 v44, s31, 1101; GFX10-NEXT: s_waitcnt lgkmcnt(0)102; GFX10-NEXT: s_swappc_b64 s[30:31], s[4:5]103; GFX10-NEXT: v_mov_b32_e32 v0, v40104; GFX10-NEXT: v_mov_b32_e32 v1, v41105; GFX10-NEXT: v_mov_b32_e32 v2, v42106; GFX10-NEXT: v_mov_b32_e32 v3, v43107; GFX10-NEXT: s_clause 0x3 ; 16-byte Folded Reload108; GFX10-NEXT: buffer_load_dword v43, off, s[0:3], s33109; GFX10-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:4110; GFX10-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:8111; GFX10-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:12112; GFX10-NEXT: v_readlane_b32 s31, v44, 1113; GFX10-NEXT: v_readlane_b32 s30, v44, 0114; GFX10-NEXT: s_mov_b32 s32, s33115; GFX10-NEXT: v_readlane_b32 s4, v44, 2116; GFX10-NEXT: s_or_saveexec_b32 s5, -1117; GFX10-NEXT: buffer_load_dword v44, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload118; GFX10-NEXT: s_waitcnt_depctr depctr_vm_vsrc(0)119; GFX10-NEXT: s_mov_b32 exec_lo, s5120; GFX10-NEXT: s_mov_b32 s33, s4121; GFX10-NEXT: s_waitcnt vmcnt(0)122; GFX10-NEXT: s_setpc_b64 s[30:31]123;124; GFX11-LABEL: non_preserved_vgpr_tuple8:125; GFX11: ; %bb.0: ; %main_body126; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)127; GFX11-NEXT: s_mov_b32 s0, s33128; GFX11-NEXT: s_mov_b32 s33, s32129; GFX11-NEXT: s_or_saveexec_b32 s1, -1130; GFX11-NEXT: scratch_store_b32 off, v44, s33 offset:16 ; 4-byte Folded Spill131; GFX11-NEXT: s_mov_b32 exec_lo, s1132; GFX11-NEXT: v_dual_mov_b32 v36, v16 :: v_dual_mov_b32 v35, v15133; GFX11-NEXT: v_dual_mov_b32 v34, v14 :: v_dual_mov_b32 v33, v13134; GFX11-NEXT: v_mov_b32_e32 v32, v12135; GFX11-NEXT: s_clause 0x3 ; 16-byte Folded Spill136; GFX11-NEXT: scratch_store_b32 off, v40, s33 offset:12137; GFX11-NEXT: scratch_store_b32 off, v41, s33 offset:8138; GFX11-NEXT: scratch_store_b32 off, v42, s33 offset:4139; GFX11-NEXT: scratch_store_b32 off, v43, s33140; GFX11-NEXT: ;;#ASMSTART141; GFX11-NEXT: ;;#ASMEND142; GFX11-NEXT: ;;#ASMSTART143; GFX11-NEXT: ;;#ASMEND144; GFX11-NEXT: ;;#ASMSTART145; GFX11-NEXT: ;;#ASMEND146; GFX11-NEXT: ;;#ASMSTART147; GFX11-NEXT: ;;#ASMEND148; GFX11-NEXT: image_gather4_c_b_cl v[40:43], v[32:36], s[0:7], s[0:3] dmask:0x1 dim:SQ_RSRC_IMG_2D149; GFX11-NEXT: s_add_i32 s32, s32, 32150; GFX11-NEXT: v_writelane_b32 v44, s0, 2151; GFX11-NEXT: s_getpc_b64 s[0:1]152; GFX11-NEXT: s_add_u32 s0, s0, extern_func@gotpcrel32@lo+4153; GFX11-NEXT: s_addc_u32 s1, s1, extern_func@gotpcrel32@hi+12154; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x0155; GFX11-NEXT: v_writelane_b32 v44, s30, 0156; GFX11-NEXT: v_writelane_b32 v44, s31, 1157; GFX11-NEXT: s_waitcnt lgkmcnt(0)158; GFX11-NEXT: s_swappc_b64 s[30:31], s[0:1]159; GFX11-NEXT: v_dual_mov_b32 v0, v40 :: v_dual_mov_b32 v1, v41160; GFX11-NEXT: v_dual_mov_b32 v2, v42 :: v_dual_mov_b32 v3, v43161; GFX11-NEXT: s_clause 0x3 ; 16-byte Folded Reload162; GFX11-NEXT: scratch_load_b32 v43, off, s33163; GFX11-NEXT: scratch_load_b32 v42, off, s33 offset:4164; GFX11-NEXT: scratch_load_b32 v41, off, s33 offset:8165; GFX11-NEXT: scratch_load_b32 v40, off, s33 offset:12166; GFX11-NEXT: v_readlane_b32 s31, v44, 1167; GFX11-NEXT: v_readlane_b32 s30, v44, 0168; GFX11-NEXT: s_mov_b32 s32, s33169; GFX11-NEXT: v_readlane_b32 s0, v44, 2170; GFX11-NEXT: s_or_saveexec_b32 s1, -1171; GFX11-NEXT: scratch_load_b32 v44, off, s33 offset:16 ; 4-byte Folded Reload172; GFX11-NEXT: s_mov_b32 exec_lo, s1173; GFX11-NEXT: s_mov_b32 s33, s0174; GFX11-NEXT: s_waitcnt vmcnt(0)175; GFX11-NEXT: s_setpc_b64 s[30:31]176 177 178 179 180 181 182 183 184 185 186main_body:187 call void asm sideeffect "", "~{v0},~{v1},~{v2},~{v3},~{v4},~{v5},~{v6},~{v7}"() #0188 call void asm sideeffect "", "~{v8},~{v9},~{v10},~{v11},~{v12},~{v13},~{v14},~{v15}"() #0189 call void asm sideeffect "", "~{v16},~{v17},~{v18},~{v19},~{v20},~{v21},~{v22},~{v23}"() #0190 call void asm sideeffect "", "~{v24},~{v25},~{v26},~{v27},~{v28},~{v29},~{v30},~{v31}"() #0191 %v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)192 call void @extern_func()193 ret <4 x float> %v194}195 196define <4 x float> @call_preserved_vgpr_tuple8(<8 x i32> %rsrc, <4 x i32> %samp, float %bias, float %zcompare, float %s, float %t, float %clamp) {197; The vgpr tuple8 operand in image_gather4_c_b_cl instruction needs to be preserved198; across the call and should get allcoated to 8 CSRs.199; Only the lower 5 sub-registers of the tuple are preserved.200; The upper 3 sub-registers are unused.201; GFX9-LABEL: call_preserved_vgpr_tuple8:202; GFX9: ; %bb.0: ; %main_body203; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)204; GFX9-NEXT: s_mov_b32 s4, s33205; GFX9-NEXT: s_mov_b32 s33, s32206; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -1207; GFX9-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill208; GFX9-NEXT: s_mov_b64 exec, s[6:7]209; GFX9-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill210; GFX9-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill211; GFX9-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill212; GFX9-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill213; GFX9-NEXT: buffer_store_dword v44, off, s[0:3], s33 ; 4-byte Folded Spill214; GFX9-NEXT: v_mov_b32_e32 v44, v16215; GFX9-NEXT: v_mov_b32_e32 v43, v15216; GFX9-NEXT: v_mov_b32_e32 v42, v14217; GFX9-NEXT: v_mov_b32_e32 v41, v13218; GFX9-NEXT: v_mov_b32_e32 v40, v12219; GFX9-NEXT: image_gather4_c_b_cl v[0:3], v[40:44], s[4:11], s[4:7] dmask:0x1220; GFX9-NEXT: s_addk_i32 s32, 0x800221; GFX9-NEXT: v_writelane_b32 v45, s4, 2222; GFX9-NEXT: s_getpc_b64 s[4:5]223; GFX9-NEXT: s_add_u32 s4, s4, extern_func@gotpcrel32@lo+4224; GFX9-NEXT: s_addc_u32 s5, s5, extern_func@gotpcrel32@hi+12225; GFX9-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x0226; GFX9-NEXT: v_writelane_b32 v45, s30, 0227; GFX9-NEXT: v_writelane_b32 v45, s31, 1228; GFX9-NEXT: s_waitcnt vmcnt(0)229; GFX9-NEXT: global_store_dwordx4 v[0:1], v[0:3], off230; GFX9-NEXT: s_waitcnt lgkmcnt(0)231; GFX9-NEXT: s_swappc_b64 s[30:31], s[4:5]232; GFX9-NEXT: image_gather4_c_b_cl v[0:3], v[40:44], s[4:11], s[4:7] dmask:0x1233; GFX9-NEXT: s_nop 0234; GFX9-NEXT: buffer_load_dword v44, off, s[0:3], s33 ; 4-byte Folded Reload235; GFX9-NEXT: buffer_load_dword v43, off, s[0:3], s33 offset:4 ; 4-byte Folded Reload236; GFX9-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:8 ; 4-byte Folded Reload237; GFX9-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:12 ; 4-byte Folded Reload238; GFX9-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:16 ; 4-byte Folded Reload239; GFX9-NEXT: v_readlane_b32 s31, v45, 1240; GFX9-NEXT: v_readlane_b32 s30, v45, 0241; GFX9-NEXT: s_mov_b32 s32, s33242; GFX9-NEXT: v_readlane_b32 s4, v45, 2243; GFX9-NEXT: s_or_saveexec_b64 s[6:7], -1244; GFX9-NEXT: buffer_load_dword v45, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload245; GFX9-NEXT: s_mov_b64 exec, s[6:7]246; GFX9-NEXT: s_mov_b32 s33, s4247; GFX9-NEXT: s_waitcnt vmcnt(0)248; GFX9-NEXT: s_setpc_b64 s[30:31]249;250; GFX10-LABEL: call_preserved_vgpr_tuple8:251; GFX10: ; %bb.0: ; %main_body252; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)253; GFX10-NEXT: s_mov_b32 s4, s33254; GFX10-NEXT: s_mov_b32 s33, s32255; GFX10-NEXT: s_or_saveexec_b32 s5, -1256; GFX10-NEXT: buffer_store_dword v45, off, s[0:3], s33 offset:20 ; 4-byte Folded Spill257; GFX10-NEXT: s_waitcnt_depctr depctr_vm_vsrc(0)258; GFX10-NEXT: s_mov_b32 exec_lo, s5259; GFX10-NEXT: buffer_store_dword v40, off, s[0:3], s33 offset:16 ; 4-byte Folded Spill260; GFX10-NEXT: buffer_store_dword v41, off, s[0:3], s33 offset:12 ; 4-byte Folded Spill261; GFX10-NEXT: buffer_store_dword v42, off, s[0:3], s33 offset:8 ; 4-byte Folded Spill262; GFX10-NEXT: buffer_store_dword v43, off, s[0:3], s33 offset:4 ; 4-byte Folded Spill263; GFX10-NEXT: buffer_store_dword v44, off, s[0:3], s33 ; 4-byte Folded Spill264; GFX10-NEXT: image_gather4_c_b_cl v[0:3], v[12:16], s[4:11], s[4:7] dmask:0x1 dim:SQ_RSRC_IMG_2D265; GFX10-NEXT: s_addk_i32 s32, 0x400266; GFX10-NEXT: v_writelane_b32 v45, s4, 2267; GFX10-NEXT: s_getpc_b64 s[4:5]268; GFX10-NEXT: s_add_u32 s4, s4, extern_func@gotpcrel32@lo+4269; GFX10-NEXT: s_addc_u32 s5, s5, extern_func@gotpcrel32@hi+12270; GFX10-NEXT: v_mov_b32_e32 v40, v16271; GFX10-NEXT: s_load_dwordx2 s[4:5], s[4:5], 0x0272; GFX10-NEXT: v_mov_b32_e32 v41, v15273; GFX10-NEXT: v_writelane_b32 v45, s30, 0274; GFX10-NEXT: v_mov_b32_e32 v42, v14275; GFX10-NEXT: v_mov_b32_e32 v43, v13276; GFX10-NEXT: v_mov_b32_e32 v44, v12277; GFX10-NEXT: v_writelane_b32 v45, s31, 1278; GFX10-NEXT: s_waitcnt vmcnt(0)279; GFX10-NEXT: global_store_dwordx4 v[0:1], v[0:3], off280; GFX10-NEXT: s_waitcnt lgkmcnt(0)281; GFX10-NEXT: s_swappc_b64 s[30:31], s[4:5]282; GFX10-NEXT: image_gather4_c_b_cl v[0:3], [v44, v43, v42, v41, v40], s[4:11], s[4:7] dmask:0x1 dim:SQ_RSRC_IMG_2D283; GFX10-NEXT: s_clause 0x4 ; 20-byte Folded Reload284; GFX10-NEXT: buffer_load_dword v44, off, s[0:3], s33285; GFX10-NEXT: buffer_load_dword v43, off, s[0:3], s33 offset:4286; GFX10-NEXT: buffer_load_dword v42, off, s[0:3], s33 offset:8287; GFX10-NEXT: buffer_load_dword v41, off, s[0:3], s33 offset:12288; GFX10-NEXT: buffer_load_dword v40, off, s[0:3], s33 offset:16289; GFX10-NEXT: v_readlane_b32 s31, v45, 1290; GFX10-NEXT: v_readlane_b32 s30, v45, 0291; GFX10-NEXT: s_mov_b32 s32, s33292; GFX10-NEXT: v_readlane_b32 s4, v45, 2293; GFX10-NEXT: s_or_saveexec_b32 s5, -1294; GFX10-NEXT: buffer_load_dword v45, off, s[0:3], s33 offset:20 ; 4-byte Folded Reload295; GFX10-NEXT: s_waitcnt_depctr depctr_vm_vsrc(0)296; GFX10-NEXT: s_mov_b32 exec_lo, s5297; GFX10-NEXT: s_mov_b32 s33, s4298; GFX10-NEXT: s_waitcnt vmcnt(0)299; GFX10-NEXT: s_setpc_b64 s[30:31]300;301; GFX11-LABEL: call_preserved_vgpr_tuple8:302; GFX11: ; %bb.0: ; %main_body303; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)304; GFX11-NEXT: s_mov_b32 s0, s33305; GFX11-NEXT: s_mov_b32 s33, s32306; GFX11-NEXT: s_or_saveexec_b32 s1, -1307; GFX11-NEXT: scratch_store_b32 off, v45, s33 offset:20 ; 4-byte Folded Spill308; GFX11-NEXT: s_mov_b32 exec_lo, s1309; GFX11-NEXT: s_clause 0x4 ; 20-byte Folded Spill310; GFX11-NEXT: scratch_store_b32 off, v40, s33 offset:16311; GFX11-NEXT: scratch_store_b32 off, v41, s33 offset:12312; GFX11-NEXT: scratch_store_b32 off, v42, s33 offset:8313; GFX11-NEXT: scratch_store_b32 off, v43, s33 offset:4314; GFX11-NEXT: scratch_store_b32 off, v44, s33315; GFX11-NEXT: image_gather4_c_b_cl v[0:3], v[12:16], s[0:7], s[0:3] dmask:0x1 dim:SQ_RSRC_IMG_2D316; GFX11-NEXT: s_add_i32 s32, s32, 32317; GFX11-NEXT: v_writelane_b32 v45, s0, 2318; GFX11-NEXT: s_getpc_b64 s[0:1]319; GFX11-NEXT: s_add_u32 s0, s0, extern_func@gotpcrel32@lo+4320; GFX11-NEXT: s_addc_u32 s1, s1, extern_func@gotpcrel32@hi+12321; GFX11-NEXT: v_dual_mov_b32 v40, v16 :: v_dual_mov_b32 v41, v15322; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x0323; GFX11-NEXT: v_writelane_b32 v45, s30, 0324; GFX11-NEXT: v_dual_mov_b32 v42, v14 :: v_dual_mov_b32 v43, v13325; GFX11-NEXT: v_mov_b32_e32 v44, v12326; GFX11-NEXT: v_writelane_b32 v45, s31, 1327; GFX11-NEXT: s_waitcnt vmcnt(0)328; GFX11-NEXT: global_store_b128 v[0:1], v[0:3], off329; GFX11-NEXT: s_waitcnt lgkmcnt(0)330; GFX11-NEXT: s_swappc_b64 s[30:31], s[0:1]331; GFX11-NEXT: image_gather4_c_b_cl v[0:3], [v44, v43, v42, v41, v40], s[0:7], s[0:3] dmask:0x1 dim:SQ_RSRC_IMG_2D332; GFX11-NEXT: s_clause 0x4 ; 20-byte Folded Reload333; GFX11-NEXT: scratch_load_b32 v44, off, s33334; GFX11-NEXT: scratch_load_b32 v43, off, s33 offset:4335; GFX11-NEXT: scratch_load_b32 v42, off, s33 offset:8336; GFX11-NEXT: scratch_load_b32 v41, off, s33 offset:12337; GFX11-NEXT: scratch_load_b32 v40, off, s33 offset:16338; GFX11-NEXT: v_readlane_b32 s31, v45, 1339; GFX11-NEXT: v_readlane_b32 s30, v45, 0340; GFX11-NEXT: s_mov_b32 s32, s33341; GFX11-NEXT: v_readlane_b32 s0, v45, 2342; GFX11-NEXT: s_or_saveexec_b32 s1, -1343; GFX11-NEXT: scratch_load_b32 v45, off, s33 offset:20 ; 4-byte Folded Reload344; GFX11-NEXT: s_mov_b32 exec_lo, s1345; GFX11-NEXT: s_mov_b32 s33, s0346; GFX11-NEXT: s_waitcnt vmcnt(0)347; GFX11-NEXT: s_setpc_b64 s[30:31]348 349 350 351 352 353 354 355main_body:356 %v = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)357 store <4 x float> %v, ptr addrspace(1) poison358 call void @extern_func()359 %v1 = call <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 1, float %bias, float %zcompare, float %s, float %t, float %clamp, <8 x i32> poison, <4 x i32> poison, i1 false, i32 0, i32 0)360 ret <4 x float> %v1361}362 363declare <4 x float> @llvm.amdgcn.image.gather4.c.b.cl.2d.v4f32.f32.f32(i32 immarg, float, float, float, float, float, <8 x i32>, <4 x i32>, i1 immarg, i32 immarg, i32 immarg) #1364 365attributes #0 = { nounwind writeonly }366attributes #1 = { nounwind readonly }367attributes #2 = { "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-implicitarg-ptr" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" }368