brintos

brintos / llvm-project-archived public Read only

0
0
Text · 51.7 KiB · c23afeb Raw
1037 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1030 < %s | FileCheck -check-prefixes=GCN,GFX10,GFX1030 %s3; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1013 < %s | FileCheck -check-prefixes=GCN,GFX10,GFX1013 %s4; RUN: llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GCN,GFX11 %s5; RUN: not llc -global-isel -mtriple=amdgcn -mcpu=gfx1012 < %s -filetype=null 2>&1 | FileCheck -check-prefix=ERR %s6 7; uint4 llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(uint node_ptr, float ray_extent, float3 ray_origin, float3 ray_dir, float3 ray_inv_dir, uint4 texture_descr)8; uint4 llvm.amdgcn.image.bvh.intersect.ray.i32.v4f16(uint node_ptr, float ray_extent, float3 ray_origin, half3 ray_dir, half3 ray_inv_dir, uint4 texture_descr)9; uint4 llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(ulong node_ptr, float ray_extent, float3 ray_origin, float3 ray_dir, float3 ray_inv_dir, uint4 texture_descr)10; uint4 llvm.amdgcn.image.bvh.intersect.ray.i64.v4f16(ulong node_ptr, float ray_extent, float3 ray_origin, half3 ray_dir, half3 ray_inv_dir, uint4 texture_descr)11 12declare <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(i32, float, <3 x float>, <3 x float>, <3 x float>, <4 x i32>)13declare <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f16(i32, float, <3 x float>, <3 x half>, <3 x half>, <4 x i32>)14declare <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(i64, float, <3 x float>, <3 x float>, <3 x float>, <4 x i32>)15declare <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f16(i64, float, <3 x float>, <3 x half>, <3 x half>, <4 x i32>)16declare i32 @llvm.amdgcn.workitem.id.x()17 18define amdgpu_ps <4 x float> @image_bvh_intersect_ray(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> inreg %tdescr) {19; GCN-LABEL: image_bvh_intersect_ray:20; GCN:       ; %bb.0:21; GCN-NEXT:    image_bvh_intersect_ray v[0:3], v[0:10], s[0:3]22; GCN-NEXT:    s_waitcnt vmcnt(0)23; GCN-NEXT:    ; return to shader part epilog24; ERR: in function image_bvh_intersect_ray{{.*}}intrinsic not supported on subtarget25  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)26  %r = bitcast <4 x i32> %v to <4 x float>27  ret <4 x float> %r28}29 30define amdgpu_ps <4 x float> @image_bvh_intersect_ray_flat(i32 %node_ptr, float %ray_extent, float %ray_origin_x, float %ray_origin_y, float %ray_origin_z, float %ray_dir_x, float %ray_dir_y, float %ray_dir_z, float %ray_inv_dir_x, float %ray_inv_dir_y, float %ray_inv_dir_z, <4 x i32> inreg %tdescr) {31; GCN-LABEL: image_bvh_intersect_ray_flat:32; GCN:       ; %bb.0:33; GCN-NEXT:    image_bvh_intersect_ray v[0:3], v[0:10], s[0:3]34; GCN-NEXT:    s_waitcnt vmcnt(0)35; GCN-NEXT:    ; return to shader part epilog36  %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 037  %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 138  %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 239  %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 040  %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 141  %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 242  %ray_inv_dir0 = insertelement <3 x float> poison, float %ray_inv_dir_x, i32 043  %ray_inv_dir1 = insertelement <3 x float> %ray_inv_dir0, float %ray_inv_dir_y, i32 144  %ray_inv_dir = insertelement <3 x float> %ray_inv_dir1, float %ray_inv_dir_z, i32 245  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)46 %r = bitcast <4 x i32> %v to <4 x float>47 ret <4 x float> %r48}49 50define amdgpu_ps <4 x float> @image_bvh_intersect_ray_a16(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> inreg %tdescr) {51; GFX10-LABEL: image_bvh_intersect_ray_a16:52; GFX10:       ; %bb.0:53; GFX10-NEXT:    v_lshrrev_b32_e32 v9, 16, v554; GFX10-NEXT:    v_and_b32_e32 v10, 0xffff, v755; GFX10-NEXT:    v_and_b32_e32 v8, 0xffff, v856; GFX10-NEXT:    v_lshlrev_b32_e32 v9, 16, v957; GFX10-NEXT:    v_lshlrev_b32_e32 v10, 16, v1058; GFX10-NEXT:    v_alignbit_b32 v7, v8, v7, 1659; GFX10-NEXT:    v_and_or_b32 v5, 0xffff, v5, v960; GFX10-NEXT:    v_and_or_b32 v6, 0xffff, v6, v1061; GFX10-NEXT:    image_bvh_intersect_ray v[0:3], v[0:7], s[0:3] a1662; GFX10-NEXT:    s_waitcnt vmcnt(0)63; GFX10-NEXT:    ; return to shader part epilog64;65; GFX11-LABEL: image_bvh_intersect_ray_a16:66; GFX11:       ; %bb.0:67; GFX11-NEXT:    v_and_b32_e32 v9, 0xffff, v768; GFX11-NEXT:    v_and_b32_e32 v10, 0xffff, v869; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)70; GFX11-NEXT:    v_lshl_or_b32 v8, v5, 16, v971; GFX11-NEXT:    v_perm_b32 v9, v5, v7, 0x706030272; GFX11-NEXT:    v_lshl_or_b32 v10, v6, 16, v1073; GFX11-NEXT:    image_bvh_intersect_ray v[0:3], [v0, v1, v[2:4], v[8:10]], s[0:3] a1674; GFX11-NEXT:    s_waitcnt vmcnt(0)75; GFX11-NEXT:    ; return to shader part epilog76  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f16(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)77  %r = bitcast <4 x i32> %v to <4 x float>78  ret <4 x float> %r79}80 81define amdgpu_ps <4 x float> @image_bvh64_intersect_ray(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> inreg %tdescr) {82; GCN-LABEL: image_bvh64_intersect_ray:83; GCN:       ; %bb.0:84; GCN-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:11], s[0:3]85; GCN-NEXT:    s_waitcnt vmcnt(0)86; GCN-NEXT:    ; return to shader part epilog87  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)88  %r = bitcast <4 x i32> %v to <4 x float>89  ret <4 x float> %r90}91 92define amdgpu_ps <4 x float> @image_bvh64_intersect_ray_flat(<2 x i32> %node_ptr_vec, float %ray_extent, float %ray_origin_x, float %ray_origin_y, float %ray_origin_z, float %ray_dir_x, float %ray_dir_y, float %ray_dir_z, float %ray_inv_dir_x, float %ray_inv_dir_y, float %ray_inv_dir_z, <4 x i32> inreg %tdescr) {93; GCN-LABEL: image_bvh64_intersect_ray_flat:94; GCN:       ; %bb.0:95; GCN-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:11], s[0:3]96; GCN-NEXT:    s_waitcnt vmcnt(0)97; GCN-NEXT:    ; return to shader part epilog98  %node_ptr = bitcast <2 x i32> %node_ptr_vec to i6499  %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 0100  %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 1101  %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 2102  %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 0103  %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 1104  %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 2105  %ray_inv_dir0 = insertelement <3 x float> poison, float %ray_inv_dir_x, i32 0106  %ray_inv_dir1 = insertelement <3 x float> %ray_inv_dir0, float %ray_inv_dir_y, i32 1107  %ray_inv_dir = insertelement <3 x float> %ray_inv_dir1, float %ray_inv_dir_z, i32 2108  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)109 %r = bitcast <4 x i32> %v to <4 x float>110 ret <4 x float> %r111}112 113define amdgpu_ps <4 x float> @image_bvh64_intersect_ray_a16(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> inreg %tdescr) {114; GFX10-LABEL: image_bvh64_intersect_ray_a16:115; GFX10:       ; %bb.0:116; GFX10-NEXT:    v_lshrrev_b32_e32 v10, 16, v6117; GFX10-NEXT:    v_and_b32_e32 v11, 0xffff, v8118; GFX10-NEXT:    v_and_b32_e32 v9, 0xffff, v9119; GFX10-NEXT:    v_lshlrev_b32_e32 v10, 16, v10120; GFX10-NEXT:    v_lshlrev_b32_e32 v11, 16, v11121; GFX10-NEXT:    v_alignbit_b32 v8, v9, v8, 16122; GFX10-NEXT:    v_and_or_b32 v6, 0xffff, v6, v10123; GFX10-NEXT:    v_and_or_b32 v7, 0xffff, v7, v11124; GFX10-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:8], s[0:3] a16125; GFX10-NEXT:    s_waitcnt vmcnt(0)126; GFX10-NEXT:    ; return to shader part epilog127;128; GFX11-LABEL: image_bvh64_intersect_ray_a16:129; GFX11:       ; %bb.0:130; GFX11-NEXT:    v_and_b32_e32 v10, 0xffff, v8131; GFX11-NEXT:    v_and_b32_e32 v11, 0xffff, v9132; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)133; GFX11-NEXT:    v_lshl_or_b32 v9, v6, 16, v10134; GFX11-NEXT:    v_perm_b32 v10, v6, v8, 0x7060302135; GFX11-NEXT:    v_lshl_or_b32 v11, v7, 16, v11136; GFX11-NEXT:    image_bvh64_intersect_ray v[0:3], [v[0:1], v2, v[3:5], v[9:11]], s[0:3] a16137; GFX11-NEXT:    s_waitcnt vmcnt(0)138; GFX11-NEXT:    ; return to shader part epilog139  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f16(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)140  %r = bitcast <4 x i32> %v to <4 x float>141  ret <4 x float> %r142}143 144define amdgpu_ps <4 x float> @image_bvh_intersect_ray_vgpr_descr(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr) {145; GFX1030-LABEL: image_bvh_intersect_ray_vgpr_descr:146; GFX1030:       ; %bb.0:147; GFX1030-NEXT:    v_mov_b32_e32 v15, v0148; GFX1030-NEXT:    v_mov_b32_e32 v16, v1149; GFX1030-NEXT:    v_mov_b32_e32 v17, v2150; GFX1030-NEXT:    v_mov_b32_e32 v18, v3151; GFX1030-NEXT:    v_mov_b32_e32 v19, v4152; GFX1030-NEXT:    v_mov_b32_e32 v20, v5153; GFX1030-NEXT:    v_mov_b32_e32 v21, v6154; GFX1030-NEXT:    v_mov_b32_e32 v22, v7155; GFX1030-NEXT:    v_mov_b32_e32 v23, v8156; GFX1030-NEXT:    v_mov_b32_e32 v24, v9157; GFX1030-NEXT:    v_mov_b32_e32 v25, v10158; GFX1030-NEXT:    s_mov_b32 s1, exec_lo159; GFX1030-NEXT:  .LBB6_1: ; =>This Inner Loop Header: Depth=1160; GFX1030-NEXT:    v_readfirstlane_b32 s4, v11161; GFX1030-NEXT:    v_readfirstlane_b32 s5, v12162; GFX1030-NEXT:    v_readfirstlane_b32 s6, v13163; GFX1030-NEXT:    v_readfirstlane_b32 s7, v14164; GFX1030-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[11:12]165; GFX1030-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[13:14]166; GFX1030-NEXT:    s_and_b32 s0, vcc_lo, s0167; GFX1030-NEXT:    s_and_saveexec_b32 s0, s0168; GFX1030-NEXT:    image_bvh_intersect_ray v[0:3], v[15:25], s[4:7]169; GFX1030-NEXT:    ; implicit-def: $vgpr11170; GFX1030-NEXT:    ; implicit-def: $vgpr15171; GFX1030-NEXT:    ; implicit-def: $vgpr16172; GFX1030-NEXT:    ; implicit-def: $vgpr17173; GFX1030-NEXT:    ; implicit-def: $vgpr18174; GFX1030-NEXT:    ; implicit-def: $vgpr19175; GFX1030-NEXT:    ; implicit-def: $vgpr20176; GFX1030-NEXT:    ; implicit-def: $vgpr21177; GFX1030-NEXT:    ; implicit-def: $vgpr22178; GFX1030-NEXT:    ; implicit-def: $vgpr23179; GFX1030-NEXT:    ; implicit-def: $vgpr24180; GFX1030-NEXT:    ; implicit-def: $vgpr25181; GFX1030-NEXT:    ; implicit-def: $vgpr13_vgpr14182; GFX1030-NEXT:    s_xor_b32 exec_lo, exec_lo, s0183; GFX1030-NEXT:    s_cbranch_execnz .LBB6_1184; GFX1030-NEXT:  ; %bb.2:185; GFX1030-NEXT:    s_mov_b32 exec_lo, s1186; GFX1030-NEXT:    s_waitcnt vmcnt(0)187; GFX1030-NEXT:    ; return to shader part epilog188;189; GFX1013-LABEL: image_bvh_intersect_ray_vgpr_descr:190; GFX1013:       ; %bb.0:191; GFX1013-NEXT:    s_mov_b32 s1, exec_lo192; GFX1013-NEXT:  .LBB6_1: ; =>This Inner Loop Header: Depth=1193; GFX1013-NEXT:    v_readfirstlane_b32 s4, v11194; GFX1013-NEXT:    v_readfirstlane_b32 s5, v12195; GFX1013-NEXT:    v_readfirstlane_b32 s6, v13196; GFX1013-NEXT:    v_readfirstlane_b32 s7, v14197; GFX1013-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[11:12]198; GFX1013-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[13:14]199; GFX1013-NEXT:    s_and_b32 s0, vcc_lo, s0200; GFX1013-NEXT:    s_and_saveexec_b32 s0, s0201; GFX1013-NEXT:    image_bvh_intersect_ray v[15:18], v[0:10], s[4:7]202; GFX1013-NEXT:    ; implicit-def: $vgpr11203; GFX1013-NEXT:    ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10204; GFX1013-NEXT:    ; implicit-def: $vgpr13_vgpr14205; GFX1013-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)206; GFX1013-NEXT:    s_xor_b32 exec_lo, exec_lo, s0207; GFX1013-NEXT:    s_cbranch_execnz .LBB6_1208; GFX1013-NEXT:  ; %bb.2:209; GFX1013-NEXT:    s_mov_b32 exec_lo, s1210; GFX1013-NEXT:    s_waitcnt vmcnt(0)211; GFX1013-NEXT:    v_mov_b32_e32 v0, v15212; GFX1013-NEXT:    v_mov_b32_e32 v1, v16213; GFX1013-NEXT:    v_mov_b32_e32 v2, v17214; GFX1013-NEXT:    v_mov_b32_e32 v3, v18215; GFX1013-NEXT:    ; return to shader part epilog216;217; GFX11-LABEL: image_bvh_intersect_ray_vgpr_descr:218; GFX11:       ; %bb.0:219; GFX11-NEXT:    v_dual_mov_b32 v18, v0 :: v_dual_mov_b32 v19, v1220; GFX11-NEXT:    v_dual_mov_b32 v15, v2 :: v_dual_mov_b32 v16, v3221; GFX11-NEXT:    v_mov_b32_e32 v17, v4222; GFX11-NEXT:    s_mov_b32 s1, exec_lo223; GFX11-NEXT:  .LBB6_1: ; =>This Inner Loop Header: Depth=1224; GFX11-NEXT:    v_readfirstlane_b32 s4, v11225; GFX11-NEXT:    v_readfirstlane_b32 s5, v12226; GFX11-NEXT:    v_readfirstlane_b32 s6, v13227; GFX11-NEXT:    v_readfirstlane_b32 s7, v14228; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)229; GFX11-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[11:12]230; GFX11-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[13:14]231; GFX11-NEXT:    s_and_b32 s0, vcc_lo, s0232; GFX11-NEXT:    s_delay_alu instid0(SALU_CYCLE_1)233; GFX11-NEXT:    s_and_saveexec_b32 s0, s0234; GFX11-NEXT:    image_bvh_intersect_ray v[0:3], [v18, v19, v[15:17], v[5:7], v[8:10]], s[4:7]235; GFX11-NEXT:    ; implicit-def: $vgpr11236; GFX11-NEXT:    ; implicit-def: $vgpr18237; GFX11-NEXT:    ; implicit-def: $vgpr19238; GFX11-NEXT:    ; implicit-def: $vgpr15_vgpr16_vgpr17239; GFX11-NEXT:    ; implicit-def: $vgpr5_vgpr6_vgpr7240; GFX11-NEXT:    ; implicit-def: $vgpr8_vgpr9_vgpr10241; GFX11-NEXT:    ; implicit-def: $vgpr13_vgpr14242; GFX11-NEXT:    s_xor_b32 exec_lo, exec_lo, s0243; GFX11-NEXT:    s_cbranch_execnz .LBB6_1244; GFX11-NEXT:  ; %bb.2:245; GFX11-NEXT:    s_mov_b32 exec_lo, s1246; GFX11-NEXT:    s_waitcnt vmcnt(0)247; GFX11-NEXT:    ; return to shader part epilog248  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)249  %r = bitcast <4 x i32> %v to <4 x float>250  ret <4 x float> %r251}252 253define amdgpu_ps <4 x float> @image_bvh_intersect_ray_a16_vgpr_descr(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr) {254; GFX1030-LABEL: image_bvh_intersect_ray_a16_vgpr_descr:255; GFX1030:       ; %bb.0:256; GFX1030-NEXT:    v_mov_b32_e32 v13, v0257; GFX1030-NEXT:    v_mov_b32_e32 v14, v1258; GFX1030-NEXT:    v_lshrrev_b32_e32 v0, 16, v5259; GFX1030-NEXT:    v_and_b32_e32 v1, 0xffff, v7260; GFX1030-NEXT:    v_mov_b32_e32 v15, v2261; GFX1030-NEXT:    v_and_b32_e32 v2, 0xffff, v8262; GFX1030-NEXT:    v_mov_b32_e32 v16, v3263; GFX1030-NEXT:    v_lshlrev_b32_e32 v0, 16, v0264; GFX1030-NEXT:    v_lshlrev_b32_e32 v1, 16, v1265; GFX1030-NEXT:    v_mov_b32_e32 v17, v4266; GFX1030-NEXT:    v_alignbit_b32 v20, v2, v7, 16267; GFX1030-NEXT:    s_mov_b32 s1, exec_lo268; GFX1030-NEXT:    v_and_or_b32 v18, 0xffff, v5, v0269; GFX1030-NEXT:    v_and_or_b32 v19, 0xffff, v6, v1270; GFX1030-NEXT:  .LBB7_1: ; =>This Inner Loop Header: Depth=1271; GFX1030-NEXT:    v_readfirstlane_b32 s4, v9272; GFX1030-NEXT:    v_readfirstlane_b32 s5, v10273; GFX1030-NEXT:    v_readfirstlane_b32 s6, v11274; GFX1030-NEXT:    v_readfirstlane_b32 s7, v12275; GFX1030-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[9:10]276; GFX1030-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[11:12]277; GFX1030-NEXT:    s_and_b32 s0, vcc_lo, s0278; GFX1030-NEXT:    s_and_saveexec_b32 s0, s0279; GFX1030-NEXT:    image_bvh_intersect_ray v[0:3], v[13:20], s[4:7] a16280; GFX1030-NEXT:    ; implicit-def: $vgpr9281; GFX1030-NEXT:    ; implicit-def: $vgpr13282; GFX1030-NEXT:    ; implicit-def: $vgpr14283; GFX1030-NEXT:    ; implicit-def: $vgpr15284; GFX1030-NEXT:    ; implicit-def: $vgpr16285; GFX1030-NEXT:    ; implicit-def: $vgpr17286; GFX1030-NEXT:    ; implicit-def: $vgpr18287; GFX1030-NEXT:    ; implicit-def: $vgpr19288; GFX1030-NEXT:    ; implicit-def: $vgpr20289; GFX1030-NEXT:    ; implicit-def: $vgpr11_vgpr12290; GFX1030-NEXT:    s_xor_b32 exec_lo, exec_lo, s0291; GFX1030-NEXT:    s_cbranch_execnz .LBB7_1292; GFX1030-NEXT:  ; %bb.2:293; GFX1030-NEXT:    s_mov_b32 exec_lo, s1294; GFX1030-NEXT:    s_waitcnt vmcnt(0)295; GFX1030-NEXT:    ; return to shader part epilog296;297; GFX1013-LABEL: image_bvh_intersect_ray_a16_vgpr_descr:298; GFX1013:       ; %bb.0:299; GFX1013-NEXT:    v_lshrrev_b32_e32 v13, 16, v5300; GFX1013-NEXT:    v_and_b32_e32 v14, 0xffff, v7301; GFX1013-NEXT:    v_and_b32_e32 v8, 0xffff, v8302; GFX1013-NEXT:    s_mov_b32 s1, exec_lo303; GFX1013-NEXT:    v_lshlrev_b32_e32 v13, 16, v13304; GFX1013-NEXT:    v_lshlrev_b32_e32 v14, 16, v14305; GFX1013-NEXT:    v_alignbit_b32 v7, v8, v7, 16306; GFX1013-NEXT:    v_and_or_b32 v5, 0xffff, v5, v13307; GFX1013-NEXT:    v_and_or_b32 v6, 0xffff, v6, v14308; GFX1013-NEXT:  .LBB7_1: ; =>This Inner Loop Header: Depth=1309; GFX1013-NEXT:    v_readfirstlane_b32 s4, v9310; GFX1013-NEXT:    v_readfirstlane_b32 s5, v10311; GFX1013-NEXT:    v_readfirstlane_b32 s6, v11312; GFX1013-NEXT:    v_readfirstlane_b32 s7, v12313; GFX1013-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[9:10]314; GFX1013-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[11:12]315; GFX1013-NEXT:    s_and_b32 s0, vcc_lo, s0316; GFX1013-NEXT:    s_and_saveexec_b32 s0, s0317; GFX1013-NEXT:    image_bvh_intersect_ray v[13:16], v[0:7], s[4:7] a16318; GFX1013-NEXT:    ; implicit-def: $vgpr9319; GFX1013-NEXT:    ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7320; GFX1013-NEXT:    ; implicit-def: $vgpr11_vgpr12321; GFX1013-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)322; GFX1013-NEXT:    s_xor_b32 exec_lo, exec_lo, s0323; GFX1013-NEXT:    s_cbranch_execnz .LBB7_1324; GFX1013-NEXT:  ; %bb.2:325; GFX1013-NEXT:    s_mov_b32 exec_lo, s1326; GFX1013-NEXT:    s_waitcnt vmcnt(0)327; GFX1013-NEXT:    v_mov_b32_e32 v0, v13328; GFX1013-NEXT:    v_mov_b32_e32 v1, v14329; GFX1013-NEXT:    v_mov_b32_e32 v2, v15330; GFX1013-NEXT:    v_mov_b32_e32 v3, v16331; GFX1013-NEXT:    ; return to shader part epilog332;333; GFX11-LABEL: image_bvh_intersect_ray_a16_vgpr_descr:334; GFX11:       ; %bb.0:335; GFX11-NEXT:    v_dual_mov_b32 v16, v0 :: v_dual_mov_b32 v17, v1336; GFX11-NEXT:    v_dual_mov_b32 v15, v4 :: v_dual_and_b32 v0, 0xffff, v7337; GFX11-NEXT:    v_and_b32_e32 v1, 0xffff, v8338; GFX11-NEXT:    v_dual_mov_b32 v13, v2 :: v_dual_mov_b32 v14, v3339; GFX11-NEXT:    s_mov_b32 s1, exec_lo340; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_3)341; GFX11-NEXT:    v_lshl_or_b32 v4, v5, 16, v0342; GFX11-NEXT:    v_perm_b32 v5, v5, v7, 0x7060302343; GFX11-NEXT:    v_lshl_or_b32 v6, v6, 16, v1344; GFX11-NEXT:  .LBB7_1: ; =>This Inner Loop Header: Depth=1345; GFX11-NEXT:    v_readfirstlane_b32 s4, v9346; GFX11-NEXT:    v_readfirstlane_b32 s5, v10347; GFX11-NEXT:    v_readfirstlane_b32 s6, v11348; GFX11-NEXT:    v_readfirstlane_b32 s7, v12349; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)350; GFX11-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[9:10]351; GFX11-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[11:12]352; GFX11-NEXT:    s_and_b32 s0, vcc_lo, s0353; GFX11-NEXT:    s_delay_alu instid0(SALU_CYCLE_1)354; GFX11-NEXT:    s_and_saveexec_b32 s0, s0355; GFX11-NEXT:    image_bvh_intersect_ray v[0:3], [v16, v17, v[13:15], v[4:6]], s[4:7] a16356; GFX11-NEXT:    ; implicit-def: $vgpr9357; GFX11-NEXT:    ; implicit-def: $vgpr16358; GFX11-NEXT:    ; implicit-def: $vgpr17359; GFX11-NEXT:    ; implicit-def: $vgpr13_vgpr14_vgpr15360; GFX11-NEXT:    ; implicit-def: $vgpr4_vgpr5_vgpr6361; GFX11-NEXT:    ; implicit-def: $vgpr11_vgpr12362; GFX11-NEXT:    s_xor_b32 exec_lo, exec_lo, s0363; GFX11-NEXT:    s_cbranch_execnz .LBB7_1364; GFX11-NEXT:  ; %bb.2:365; GFX11-NEXT:    s_mov_b32 exec_lo, s1366; GFX11-NEXT:    s_waitcnt vmcnt(0)367; GFX11-NEXT:    ; return to shader part epilog368  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f16(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)369  %r = bitcast <4 x i32> %v to <4 x float>370  ret <4 x float> %r371}372 373define amdgpu_ps <4 x float> @image_bvh64_intersect_ray_vgpr_descr(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr) {374; GFX1030-LABEL: image_bvh64_intersect_ray_vgpr_descr:375; GFX1030:       ; %bb.0:376; GFX1030-NEXT:    v_mov_b32_e32 v16, v0377; GFX1030-NEXT:    v_mov_b32_e32 v17, v1378; GFX1030-NEXT:    v_mov_b32_e32 v18, v2379; GFX1030-NEXT:    v_mov_b32_e32 v19, v3380; GFX1030-NEXT:    v_mov_b32_e32 v20, v4381; GFX1030-NEXT:    v_mov_b32_e32 v21, v5382; GFX1030-NEXT:    v_mov_b32_e32 v22, v6383; GFX1030-NEXT:    v_mov_b32_e32 v23, v7384; GFX1030-NEXT:    v_mov_b32_e32 v24, v8385; GFX1030-NEXT:    v_mov_b32_e32 v25, v9386; GFX1030-NEXT:    v_mov_b32_e32 v26, v10387; GFX1030-NEXT:    v_mov_b32_e32 v27, v11388; GFX1030-NEXT:    s_mov_b32 s1, exec_lo389; GFX1030-NEXT:  .LBB8_1: ; =>This Inner Loop Header: Depth=1390; GFX1030-NEXT:    v_readfirstlane_b32 s4, v12391; GFX1030-NEXT:    v_readfirstlane_b32 s5, v13392; GFX1030-NEXT:    v_readfirstlane_b32 s6, v14393; GFX1030-NEXT:    v_readfirstlane_b32 s7, v15394; GFX1030-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[12:13]395; GFX1030-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[14:15]396; GFX1030-NEXT:    s_and_b32 s0, vcc_lo, s0397; GFX1030-NEXT:    s_and_saveexec_b32 s0, s0398; GFX1030-NEXT:    image_bvh64_intersect_ray v[0:3], v[16:27], s[4:7]399; GFX1030-NEXT:    ; implicit-def: $vgpr12400; GFX1030-NEXT:    ; implicit-def: $vgpr16401; GFX1030-NEXT:    ; implicit-def: $vgpr17402; GFX1030-NEXT:    ; implicit-def: $vgpr18403; GFX1030-NEXT:    ; implicit-def: $vgpr19404; GFX1030-NEXT:    ; implicit-def: $vgpr20405; GFX1030-NEXT:    ; implicit-def: $vgpr21406; GFX1030-NEXT:    ; implicit-def: $vgpr22407; GFX1030-NEXT:    ; implicit-def: $vgpr23408; GFX1030-NEXT:    ; implicit-def: $vgpr24409; GFX1030-NEXT:    ; implicit-def: $vgpr25410; GFX1030-NEXT:    ; implicit-def: $vgpr26411; GFX1030-NEXT:    ; implicit-def: $vgpr27412; GFX1030-NEXT:    ; implicit-def: $vgpr14_vgpr15413; GFX1030-NEXT:    s_xor_b32 exec_lo, exec_lo, s0414; GFX1030-NEXT:    s_cbranch_execnz .LBB8_1415; GFX1030-NEXT:  ; %bb.2:416; GFX1030-NEXT:    s_mov_b32 exec_lo, s1417; GFX1030-NEXT:    s_waitcnt vmcnt(0)418; GFX1030-NEXT:    ; return to shader part epilog419;420; GFX1013-LABEL: image_bvh64_intersect_ray_vgpr_descr:421; GFX1013:       ; %bb.0:422; GFX1013-NEXT:    s_mov_b32 s1, exec_lo423; GFX1013-NEXT:  .LBB8_1: ; =>This Inner Loop Header: Depth=1424; GFX1013-NEXT:    v_readfirstlane_b32 s4, v12425; GFX1013-NEXT:    v_readfirstlane_b32 s5, v13426; GFX1013-NEXT:    v_readfirstlane_b32 s6, v14427; GFX1013-NEXT:    v_readfirstlane_b32 s7, v15428; GFX1013-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[12:13]429; GFX1013-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[14:15]430; GFX1013-NEXT:    s_and_b32 s0, vcc_lo, s0431; GFX1013-NEXT:    s_and_saveexec_b32 s0, s0432; GFX1013-NEXT:    image_bvh64_intersect_ray v[16:19], v[0:11], s[4:7]433; GFX1013-NEXT:    ; implicit-def: $vgpr12434; GFX1013-NEXT:    ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11435; GFX1013-NEXT:    ; implicit-def: $vgpr14_vgpr15436; GFX1013-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)437; GFX1013-NEXT:    s_xor_b32 exec_lo, exec_lo, s0438; GFX1013-NEXT:    s_cbranch_execnz .LBB8_1439; GFX1013-NEXT:  ; %bb.2:440; GFX1013-NEXT:    s_mov_b32 exec_lo, s1441; GFX1013-NEXT:    s_waitcnt vmcnt(0)442; GFX1013-NEXT:    v_mov_b32_e32 v0, v16443; GFX1013-NEXT:    v_mov_b32_e32 v1, v17444; GFX1013-NEXT:    v_mov_b32_e32 v2, v18445; GFX1013-NEXT:    v_mov_b32_e32 v3, v19446; GFX1013-NEXT:    ; return to shader part epilog447;448; GFX11-LABEL: image_bvh64_intersect_ray_vgpr_descr:449; GFX11:       ; %bb.0:450; GFX11-NEXT:    v_dual_mov_b32 v19, v0 :: v_dual_mov_b32 v20, v1451; GFX11-NEXT:    v_dual_mov_b32 v21, v2 :: v_dual_mov_b32 v16, v3452; GFX11-NEXT:    v_dual_mov_b32 v17, v4 :: v_dual_mov_b32 v18, v5453; GFX11-NEXT:    s_mov_b32 s1, exec_lo454; GFX11-NEXT:  .LBB8_1: ; =>This Inner Loop Header: Depth=1455; GFX11-NEXT:    v_readfirstlane_b32 s4, v12456; GFX11-NEXT:    v_readfirstlane_b32 s5, v13457; GFX11-NEXT:    v_readfirstlane_b32 s6, v14458; GFX11-NEXT:    v_readfirstlane_b32 s7, v15459; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)460; GFX11-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[12:13]461; GFX11-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[14:15]462; GFX11-NEXT:    s_and_b32 s0, vcc_lo, s0463; GFX11-NEXT:    s_delay_alu instid0(SALU_CYCLE_1)464; GFX11-NEXT:    s_and_saveexec_b32 s0, s0465; GFX11-NEXT:    image_bvh64_intersect_ray v[0:3], [v[19:20], v21, v[16:18], v[6:8], v[9:11]], s[4:7]466; GFX11-NEXT:    ; implicit-def: $vgpr12467; GFX11-NEXT:    ; implicit-def: $vgpr19_vgpr20468; GFX11-NEXT:    ; implicit-def: $vgpr21469; GFX11-NEXT:    ; implicit-def: $vgpr16_vgpr17_vgpr18470; GFX11-NEXT:    ; implicit-def: $vgpr6_vgpr7_vgpr8471; GFX11-NEXT:    ; implicit-def: $vgpr9_vgpr10_vgpr11472; GFX11-NEXT:    ; implicit-def: $vgpr14_vgpr15473; GFX11-NEXT:    s_xor_b32 exec_lo, exec_lo, s0474; GFX11-NEXT:    s_cbranch_execnz .LBB8_1475; GFX11-NEXT:  ; %bb.2:476; GFX11-NEXT:    s_mov_b32 exec_lo, s1477; GFX11-NEXT:    s_waitcnt vmcnt(0)478; GFX11-NEXT:    ; return to shader part epilog479  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)480  %r = bitcast <4 x i32> %v to <4 x float>481  ret <4 x float> %r482}483 484define amdgpu_ps <4 x float> @image_bvh64_intersect_ray_a16_vgpr_descr(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr) {485; GFX1030-LABEL: image_bvh64_intersect_ray_a16_vgpr_descr:486; GFX1030:       ; %bb.0:487; GFX1030-NEXT:    v_mov_b32_e32 v14, v0488; GFX1030-NEXT:    v_mov_b32_e32 v15, v1489; GFX1030-NEXT:    v_lshrrev_b32_e32 v0, 16, v6490; GFX1030-NEXT:    v_and_b32_e32 v1, 0xffff, v8491; GFX1030-NEXT:    v_mov_b32_e32 v16, v2492; GFX1030-NEXT:    v_and_b32_e32 v2, 0xffff, v9493; GFX1030-NEXT:    v_mov_b32_e32 v17, v3494; GFX1030-NEXT:    v_lshlrev_b32_e32 v0, 16, v0495; GFX1030-NEXT:    v_lshlrev_b32_e32 v1, 16, v1496; GFX1030-NEXT:    v_mov_b32_e32 v18, v4497; GFX1030-NEXT:    v_mov_b32_e32 v19, v5498; GFX1030-NEXT:    v_alignbit_b32 v22, v2, v8, 16499; GFX1030-NEXT:    v_and_or_b32 v20, 0xffff, v6, v0500; GFX1030-NEXT:    v_and_or_b32 v21, 0xffff, v7, v1501; GFX1030-NEXT:    s_mov_b32 s1, exec_lo502; GFX1030-NEXT:  .LBB9_1: ; =>This Inner Loop Header: Depth=1503; GFX1030-NEXT:    v_readfirstlane_b32 s4, v10504; GFX1030-NEXT:    v_readfirstlane_b32 s5, v11505; GFX1030-NEXT:    v_readfirstlane_b32 s6, v12506; GFX1030-NEXT:    v_readfirstlane_b32 s7, v13507; GFX1030-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[10:11]508; GFX1030-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[12:13]509; GFX1030-NEXT:    s_and_b32 s0, vcc_lo, s0510; GFX1030-NEXT:    s_and_saveexec_b32 s0, s0511; GFX1030-NEXT:    image_bvh64_intersect_ray v[0:3], v[14:22], s[4:7] a16512; GFX1030-NEXT:    ; implicit-def: $vgpr10513; GFX1030-NEXT:    ; implicit-def: $vgpr14514; GFX1030-NEXT:    ; implicit-def: $vgpr15515; GFX1030-NEXT:    ; implicit-def: $vgpr16516; GFX1030-NEXT:    ; implicit-def: $vgpr17517; GFX1030-NEXT:    ; implicit-def: $vgpr18518; GFX1030-NEXT:    ; implicit-def: $vgpr19519; GFX1030-NEXT:    ; implicit-def: $vgpr20520; GFX1030-NEXT:    ; implicit-def: $vgpr21521; GFX1030-NEXT:    ; implicit-def: $vgpr22522; GFX1030-NEXT:    ; implicit-def: $vgpr12_vgpr13523; GFX1030-NEXT:    s_xor_b32 exec_lo, exec_lo, s0524; GFX1030-NEXT:    s_cbranch_execnz .LBB9_1525; GFX1030-NEXT:  ; %bb.2:526; GFX1030-NEXT:    s_mov_b32 exec_lo, s1527; GFX1030-NEXT:    s_waitcnt vmcnt(0)528; GFX1030-NEXT:    ; return to shader part epilog529;530; GFX1013-LABEL: image_bvh64_intersect_ray_a16_vgpr_descr:531; GFX1013:       ; %bb.0:532; GFX1013-NEXT:    v_lshrrev_b32_e32 v14, 16, v6533; GFX1013-NEXT:    v_and_b32_e32 v15, 0xffff, v8534; GFX1013-NEXT:    v_and_b32_e32 v9, 0xffff, v9535; GFX1013-NEXT:    s_mov_b32 s1, exec_lo536; GFX1013-NEXT:    v_lshlrev_b32_e32 v14, 16, v14537; GFX1013-NEXT:    v_lshlrev_b32_e32 v15, 16, v15538; GFX1013-NEXT:    v_alignbit_b32 v8, v9, v8, 16539; GFX1013-NEXT:    v_and_or_b32 v6, 0xffff, v6, v14540; GFX1013-NEXT:    v_and_or_b32 v7, 0xffff, v7, v15541; GFX1013-NEXT:  .LBB9_1: ; =>This Inner Loop Header: Depth=1542; GFX1013-NEXT:    v_readfirstlane_b32 s4, v10543; GFX1013-NEXT:    v_readfirstlane_b32 s5, v11544; GFX1013-NEXT:    v_readfirstlane_b32 s6, v12545; GFX1013-NEXT:    v_readfirstlane_b32 s7, v13546; GFX1013-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[10:11]547; GFX1013-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[12:13]548; GFX1013-NEXT:    s_and_b32 s0, vcc_lo, s0549; GFX1013-NEXT:    s_and_saveexec_b32 s0, s0550; GFX1013-NEXT:    image_bvh64_intersect_ray v[14:17], v[0:8], s[4:7] a16551; GFX1013-NEXT:    ; implicit-def: $vgpr10552; GFX1013-NEXT:    ; implicit-def: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8553; GFX1013-NEXT:    ; implicit-def: $vgpr12_vgpr13554; GFX1013-NEXT:    s_waitcnt_depctr depctr_vm_vsrc(0)555; GFX1013-NEXT:    s_xor_b32 exec_lo, exec_lo, s0556; GFX1013-NEXT:    s_cbranch_execnz .LBB9_1557; GFX1013-NEXT:  ; %bb.2:558; GFX1013-NEXT:    s_mov_b32 exec_lo, s1559; GFX1013-NEXT:    s_waitcnt vmcnt(0)560; GFX1013-NEXT:    v_mov_b32_e32 v0, v14561; GFX1013-NEXT:    v_mov_b32_e32 v1, v15562; GFX1013-NEXT:    v_mov_b32_e32 v2, v16563; GFX1013-NEXT:    v_mov_b32_e32 v3, v17564; GFX1013-NEXT:    ; return to shader part epilog565;566; GFX11-LABEL: image_bvh64_intersect_ray_a16_vgpr_descr:567; GFX11:       ; %bb.0:568; GFX11-NEXT:    v_dual_mov_b32 v17, v0 :: v_dual_mov_b32 v18, v1569; GFX11-NEXT:    v_and_b32_e32 v0, 0xffff, v8570; GFX11-NEXT:    v_and_b32_e32 v1, 0xffff, v9571; GFX11-NEXT:    v_dual_mov_b32 v19, v2 :: v_dual_mov_b32 v14, v3572; GFX11-NEXT:    v_dual_mov_b32 v15, v4 :: v_dual_mov_b32 v16, v5573; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_4)574; GFX11-NEXT:    v_lshl_or_b32 v4, v6, 16, v0575; GFX11-NEXT:    v_perm_b32 v5, v6, v8, 0x7060302576; GFX11-NEXT:    v_lshl_or_b32 v6, v7, 16, v1577; GFX11-NEXT:    s_mov_b32 s1, exec_lo578; GFX11-NEXT:  .LBB9_1: ; =>This Inner Loop Header: Depth=1579; GFX11-NEXT:    v_readfirstlane_b32 s4, v10580; GFX11-NEXT:    v_readfirstlane_b32 s5, v11581; GFX11-NEXT:    v_readfirstlane_b32 s6, v12582; GFX11-NEXT:    v_readfirstlane_b32 s7, v13583; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)584; GFX11-NEXT:    v_cmp_eq_u64_e32 vcc_lo, s[4:5], v[10:11]585; GFX11-NEXT:    v_cmp_eq_u64_e64 s0, s[6:7], v[12:13]586; GFX11-NEXT:    s_and_b32 s0, vcc_lo, s0587; GFX11-NEXT:    s_delay_alu instid0(SALU_CYCLE_1)588; GFX11-NEXT:    s_and_saveexec_b32 s0, s0589; GFX11-NEXT:    image_bvh64_intersect_ray v[0:3], [v[17:18], v19, v[14:16], v[4:6]], s[4:7] a16590; GFX11-NEXT:    ; implicit-def: $vgpr10591; GFX11-NEXT:    ; implicit-def: $vgpr17_vgpr18592; GFX11-NEXT:    ; implicit-def: $vgpr19593; GFX11-NEXT:    ; implicit-def: $vgpr14_vgpr15_vgpr16594; GFX11-NEXT:    ; implicit-def: $vgpr4_vgpr5_vgpr6595; GFX11-NEXT:    ; implicit-def: $vgpr12_vgpr13596; GFX11-NEXT:    s_xor_b32 exec_lo, exec_lo, s0597; GFX11-NEXT:    s_cbranch_execnz .LBB9_1598; GFX11-NEXT:  ; %bb.2:599; GFX11-NEXT:    s_mov_b32 exec_lo, s1600; GFX11-NEXT:    s_waitcnt vmcnt(0)601; GFX11-NEXT:    ; return to shader part epilog602  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f16(i64 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)603  %r = bitcast <4 x i32> %v to <4 x float>604  ret <4 x float> %r605}606 607define amdgpu_kernel void @image_bvh_intersect_ray_nsa_reassign(ptr %p_node_ptr, ptr %p_ray, <4 x i32> %tdescr) {608; GFX1030-LABEL: image_bvh_intersect_ray_nsa_reassign:609; GFX1030:       ; %bb.0:610; GFX1030-NEXT:    s_load_dwordx8 s[0:7], s[4:5], 0x24611; GFX1030-NEXT:    v_lshlrev_b32_e32 v4, 2, v0612; GFX1030-NEXT:    v_mov_b32_e32 v5, 0x40400000613; GFX1030-NEXT:    v_mov_b32_e32 v6, 4.0614; GFX1030-NEXT:    v_mov_b32_e32 v7, 0x40a00000615; GFX1030-NEXT:    v_mov_b32_e32 v8, 0x40c00000616; GFX1030-NEXT:    v_mov_b32_e32 v9, 0x40e00000617; GFX1030-NEXT:    v_mov_b32_e32 v10, 0x41000000618; GFX1030-NEXT:    s_waitcnt lgkmcnt(0)619; GFX1030-NEXT:    v_mov_b32_e32 v0, s0620; GFX1030-NEXT:    v_mov_b32_e32 v1, s1621; GFX1030-NEXT:    v_mov_b32_e32 v2, s2622; GFX1030-NEXT:    v_mov_b32_e32 v3, s3623; GFX1030-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v4624; GFX1030-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo625; GFX1030-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v4626; GFX1030-NEXT:    v_add_co_ci_u32_e64 v3, null, 0, v3, vcc_lo627; GFX1030-NEXT:    flat_load_dword v0, v[0:1]628; GFX1030-NEXT:    flat_load_dword v1, v[2:3]629; GFX1030-NEXT:    v_mov_b32_e32 v2, 0630; GFX1030-NEXT:    v_mov_b32_e32 v3, 1.0631; GFX1030-NEXT:    v_mov_b32_e32 v4, 2.0632; GFX1030-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)633; GFX1030-NEXT:    image_bvh_intersect_ray v[0:3], v[0:10], s[4:7]634; GFX1030-NEXT:    s_waitcnt vmcnt(0)635; GFX1030-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]636; GFX1030-NEXT:    s_endpgm637;638; GFX1013-LABEL: image_bvh_intersect_ray_nsa_reassign:639; GFX1013:       ; %bb.0:640; GFX1013-NEXT:    s_load_dwordx8 s[8:15], s[4:5], 0x24641; GFX1013-NEXT:    v_lshlrev_b32_e32 v6, 2, v0642; GFX1013-NEXT:    v_mov_b32_e32 v7, 0x40a00000643; GFX1013-NEXT:    v_mov_b32_e32 v8, 0x40c00000644; GFX1013-NEXT:    v_mov_b32_e32 v9, 0x40e00000645; GFX1013-NEXT:    v_mov_b32_e32 v10, 0x41000000646; GFX1013-NEXT:    s_waitcnt lgkmcnt(0)647; GFX1013-NEXT:    v_mov_b32_e32 v0, s8648; GFX1013-NEXT:    v_mov_b32_e32 v1, s9649; GFX1013-NEXT:    v_mov_b32_e32 v2, s10650; GFX1013-NEXT:    v_mov_b32_e32 v3, s11651; GFX1013-NEXT:    v_add_co_u32 v4, vcc_lo, v0, v6652; GFX1013-NEXT:    v_add_co_ci_u32_e32 v5, vcc_lo, 0, v1, vcc_lo653; GFX1013-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v6654; GFX1013-NEXT:    v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo655; GFX1013-NEXT:    v_mov_b32_e32 v6, 4.0656; GFX1013-NEXT:    flat_load_dword v0, v[4:5]657; GFX1013-NEXT:    flat_load_dword v1, v[2:3]658; GFX1013-NEXT:    v_mov_b32_e32 v2, 0659; GFX1013-NEXT:    v_mov_b32_e32 v3, 1.0660; GFX1013-NEXT:    v_mov_b32_e32 v4, 2.0661; GFX1013-NEXT:    v_mov_b32_e32 v5, 0x40400000662; GFX1013-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)663; GFX1013-NEXT:    image_bvh_intersect_ray v[0:3], v[0:10], s[12:15]664; GFX1013-NEXT:    s_waitcnt vmcnt(0)665; GFX1013-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]666; GFX1013-NEXT:    s_endpgm667;668; GFX11-LABEL: image_bvh_intersect_ray_nsa_reassign:669; GFX11:       ; %bb.0:670; GFX11-NEXT:    s_load_b256 s[0:7], s[4:5], 0x24671; GFX11-NEXT:    v_and_b32_e32 v0, 0x3ff, v0672; GFX11-NEXT:    s_mov_b32 s10, 0x40a00000673; GFX11-NEXT:    s_mov_b32 s9, 4.0674; GFX11-NEXT:    s_mov_b32 s8, 0x40400000675; GFX11-NEXT:    s_mov_b32 s12, 0x40c00000676; GFX11-NEXT:    v_lshlrev_b32_e32 v4, 2, v0677; GFX11-NEXT:    s_mov_b32 s14, 0x41000000678; GFX11-NEXT:    s_mov_b32 s13, 0x40e00000679; GFX11-NEXT:    v_mov_b32_e32 v6, s12680; GFX11-NEXT:    v_dual_mov_b32 v8, s14 :: v_dual_mov_b32 v7, s13681; GFX11-NEXT:    s_waitcnt lgkmcnt(0)682; GFX11-NEXT:    v_dual_mov_b32 v2, s2 :: v_dual_mov_b32 v3, s3683; GFX11-NEXT:    s_mov_b32 s2, 2.0684; GFX11-NEXT:    v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1685; GFX11-NEXT:    s_mov_b32 s0, 0686; GFX11-NEXT:    s_mov_b32 s1, 1.0687; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)688; GFX11-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v4689; GFX11-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo690; GFX11-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v4691; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)692; GFX11-NEXT:    v_add_co_ci_u32_e64 v3, null, 0, v3, vcc_lo693; GFX11-NEXT:    flat_load_b32 v9, v[0:1]694; GFX11-NEXT:    flat_load_b32 v10, v[2:3]695; GFX11-NEXT:    v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v3, s8696; GFX11-NEXT:    v_dual_mov_b32 v1, s1 :: v_dual_mov_b32 v2, s2697; GFX11-NEXT:    v_dual_mov_b32 v4, s9 :: v_dual_mov_b32 v5, s10698; GFX11-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)699; GFX11-NEXT:    image_bvh_intersect_ray v[0:3], [v9, v10, v[0:2], v[3:5], v[6:8]], s[4:7]700; GFX11-NEXT:    s_waitcnt vmcnt(0)701; GFX11-NEXT:    flat_store_b128 v[0:1], v[0:3]702; GFX11-NEXT:    s_endpgm703  %lid = tail call i32 @llvm.amdgcn.workitem.id.x()704  %gep_node_ptr = getelementptr inbounds i32, ptr %p_node_ptr, i32 %lid705  %node_ptr = load i32, ptr %gep_node_ptr, align 4706  %gep_ray = getelementptr inbounds float, ptr %p_ray, i32 %lid707  %ray_extent = load float, ptr %gep_ray, align 4708  %ray_origin0 = insertelement <3 x float> poison, float 0.0, i32 0709  %ray_origin1 = insertelement <3 x float> %ray_origin0, float 1.0, i32 1710  %ray_origin = insertelement <3 x float> %ray_origin1, float 2.0, i32 2711  %ray_dir0 = insertelement <3 x float> poison, float 3.0, i32 0712  %ray_dir1 = insertelement <3 x float> %ray_dir0, float 4.0, i32 1713  %ray_dir = insertelement <3 x float> %ray_dir1, float 5.0, i32 2714  %ray_inv_dir0 = insertelement <3 x float> poison, float 6.0, i32 0715  %ray_inv_dir1 = insertelement <3 x float> %ray_inv_dir0, float 7.0, i32 1716  %ray_inv_dir = insertelement <3 x float> %ray_inv_dir1, float 8.0, i32 2717  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f32(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)718  store <4 x i32> %v, ptr poison719  ret void720}721 722define amdgpu_kernel void @image_bvh_intersect_ray_a16_nsa_reassign(ptr %p_node_ptr, ptr %p_ray, <4 x i32> %tdescr) {723; GFX1030-LABEL: image_bvh_intersect_ray_a16_nsa_reassign:724; GFX1030:       ; %bb.0:725; GFX1030-NEXT:    s_load_dwordx8 s[0:7], s[4:5], 0x24726; GFX1030-NEXT:    v_lshlrev_b32_e32 v4, 2, v0727; GFX1030-NEXT:    v_mov_b32_e32 v5, 0x44004200728; GFX1030-NEXT:    v_mov_b32_e32 v6, 0x46004500729; GFX1030-NEXT:    v_mov_b32_e32 v7, 0x48004700730; GFX1030-NEXT:    s_waitcnt lgkmcnt(0)731; GFX1030-NEXT:    v_mov_b32_e32 v0, s0732; GFX1030-NEXT:    v_mov_b32_e32 v1, s1733; GFX1030-NEXT:    v_mov_b32_e32 v2, s2734; GFX1030-NEXT:    v_mov_b32_e32 v3, s3735; GFX1030-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v4736; GFX1030-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo737; GFX1030-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v4738; GFX1030-NEXT:    v_add_co_ci_u32_e64 v3, null, 0, v3, vcc_lo739; GFX1030-NEXT:    flat_load_dword v0, v[0:1]740; GFX1030-NEXT:    flat_load_dword v1, v[2:3]741; GFX1030-NEXT:    v_mov_b32_e32 v2, 0742; GFX1030-NEXT:    v_mov_b32_e32 v3, 1.0743; GFX1030-NEXT:    v_mov_b32_e32 v4, 2.0744; GFX1030-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)745; GFX1030-NEXT:    image_bvh_intersect_ray v[0:3], v[0:7], s[4:7] a16746; GFX1030-NEXT:    s_waitcnt vmcnt(0)747; GFX1030-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]748; GFX1030-NEXT:    s_endpgm749;750; GFX1013-LABEL: image_bvh_intersect_ray_a16_nsa_reassign:751; GFX1013:       ; %bb.0:752; GFX1013-NEXT:    s_load_dwordx8 s[8:15], s[4:5], 0x24753; GFX1013-NEXT:    v_lshlrev_b32_e32 v6, 2, v0754; GFX1013-NEXT:    v_mov_b32_e32 v7, 0x48004700755; GFX1013-NEXT:    s_waitcnt lgkmcnt(0)756; GFX1013-NEXT:    v_mov_b32_e32 v0, s8757; GFX1013-NEXT:    v_mov_b32_e32 v1, s9758; GFX1013-NEXT:    v_mov_b32_e32 v2, s10759; GFX1013-NEXT:    v_mov_b32_e32 v3, s11760; GFX1013-NEXT:    v_add_co_u32 v4, vcc_lo, v0, v6761; GFX1013-NEXT:    v_add_co_ci_u32_e32 v5, vcc_lo, 0, v1, vcc_lo762; GFX1013-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v6763; GFX1013-NEXT:    v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo764; GFX1013-NEXT:    v_mov_b32_e32 v6, 0x46004500765; GFX1013-NEXT:    flat_load_dword v0, v[4:5]766; GFX1013-NEXT:    flat_load_dword v1, v[2:3]767; GFX1013-NEXT:    v_mov_b32_e32 v2, 0768; GFX1013-NEXT:    v_mov_b32_e32 v3, 1.0769; GFX1013-NEXT:    v_mov_b32_e32 v4, 2.0770; GFX1013-NEXT:    v_mov_b32_e32 v5, 0x44004200771; GFX1013-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)772; GFX1013-NEXT:    image_bvh_intersect_ray v[0:3], v[0:7], s[12:15] a16773; GFX1013-NEXT:    s_waitcnt vmcnt(0)774; GFX1013-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]775; GFX1013-NEXT:    s_endpgm776;777; GFX11-LABEL: image_bvh_intersect_ray_a16_nsa_reassign:778; GFX11:       ; %bb.0:779; GFX11-NEXT:    s_load_b256 s[0:7], s[4:5], 0x24780; GFX11-NEXT:    v_and_b32_e32 v0, 0x3ff, v0781; GFX11-NEXT:    s_mov_b32 s8, 0x42004600782; GFX11-NEXT:    s_mov_b32 s9, 0x44004700783; GFX11-NEXT:    s_mov_b32 s10, 0x45004800784; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)785; GFX11-NEXT:    v_lshlrev_b32_e32 v4, 2, v0786; GFX11-NEXT:    s_waitcnt lgkmcnt(0)787; GFX11-NEXT:    v_dual_mov_b32 v2, s2 :: v_dual_mov_b32 v3, s3788; GFX11-NEXT:    s_mov_b32 s2, 2.0789; GFX11-NEXT:    v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1790; GFX11-NEXT:    s_mov_b32 s0, 0791; GFX11-NEXT:    s_mov_b32 s1, 1.0792; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)793; GFX11-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v4794; GFX11-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo795; GFX11-NEXT:    v_add_co_u32 v2, vcc_lo, v2, v4796; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_1)797; GFX11-NEXT:    v_add_co_ci_u32_e64 v3, null, 0, v3, vcc_lo798; GFX11-NEXT:    flat_load_b32 v6, v[0:1]799; GFX11-NEXT:    flat_load_b32 v7, v[2:3]800; GFX11-NEXT:    v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v3, s8801; GFX11-NEXT:    v_dual_mov_b32 v1, s1 :: v_dual_mov_b32 v2, s2802; GFX11-NEXT:    v_dual_mov_b32 v4, s9 :: v_dual_mov_b32 v5, s10803; GFX11-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)804; GFX11-NEXT:    image_bvh_intersect_ray v[0:3], [v6, v7, v[0:2], v[3:5]], s[4:7] a16805; GFX11-NEXT:    s_waitcnt vmcnt(0)806; GFX11-NEXT:    flat_store_b128 v[0:1], v[0:3]807; GFX11-NEXT:    s_endpgm808  %lid = tail call i32 @llvm.amdgcn.workitem.id.x()809  %gep_node_ptr = getelementptr inbounds i32, ptr %p_node_ptr, i32 %lid810  %node_ptr = load i32, ptr %gep_node_ptr, align 4811  %gep_ray = getelementptr inbounds float, ptr %p_ray, i32 %lid812  %ray_extent = load float, ptr %gep_ray, align 4813  %ray_origin0 = insertelement <3 x float> poison, float 0.0, i32 0814  %ray_origin1 = insertelement <3 x float> %ray_origin0, float 1.0, i32 1815  %ray_origin = insertelement <3 x float> %ray_origin1, float 2.0, i32 2816  %ray_dir0 = insertelement <3 x half> poison, half 3.0, i32 0817  %ray_dir1 = insertelement <3 x half> %ray_dir0, half 4.0, i32 1818  %ray_dir = insertelement <3 x half> %ray_dir1, half 5.0, i32 2819  %ray_inv_dir0 = insertelement <3 x half> poison, half 6.0, i32 0820  %ray_inv_dir1 = insertelement <3 x half> %ray_inv_dir0, half 7.0, i32 1821  %ray_inv_dir = insertelement <3 x half> %ray_inv_dir1, half 8.0, i32 2822  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i32.v4f16(i32 %node_ptr, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)823  store <4 x i32> %v, ptr poison824  ret void825}826 827define amdgpu_kernel void @image_bvh64_intersect_ray_nsa_reassign(ptr %p_ray, <4 x i32> %tdescr) {828; GFX1030-LABEL: image_bvh64_intersect_ray_nsa_reassign:829; GFX1030:       ; %bb.0:830; GFX1030-NEXT:    s_clause 0x1831; GFX1030-NEXT:    s_load_dwordx2 s[6:7], s[4:5], 0x24832; GFX1030-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x34833; GFX1030-NEXT:    v_lshlrev_b32_e32 v2, 2, v0834; GFX1030-NEXT:    v_mov_b32_e32 v3, 0835; GFX1030-NEXT:    v_mov_b32_e32 v4, 1.0836; GFX1030-NEXT:    v_mov_b32_e32 v5, 2.0837; GFX1030-NEXT:    v_mov_b32_e32 v6, 0x40400000838; GFX1030-NEXT:    v_mov_b32_e32 v7, 4.0839; GFX1030-NEXT:    v_mov_b32_e32 v8, 0x40a00000840; GFX1030-NEXT:    v_mov_b32_e32 v9, 0x40c00000841; GFX1030-NEXT:    v_mov_b32_e32 v10, 0x40e00000842; GFX1030-NEXT:    v_mov_b32_e32 v11, 0x41000000843; GFX1030-NEXT:    s_waitcnt lgkmcnt(0)844; GFX1030-NEXT:    v_mov_b32_e32 v0, s6845; GFX1030-NEXT:    v_mov_b32_e32 v1, s7846; GFX1030-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v2847; GFX1030-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo848; GFX1030-NEXT:    flat_load_dword v2, v[0:1]849; GFX1030-NEXT:    v_mov_b32_e32 v0, 0xb36211c7850; GFX1030-NEXT:    v_bfrev_b32_e32 v1, 4.0851; GFX1030-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)852; GFX1030-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:11], s[0:3]853; GFX1030-NEXT:    s_waitcnt vmcnt(0)854; GFX1030-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]855; GFX1030-NEXT:    s_endpgm856;857; GFX1013-LABEL: image_bvh64_intersect_ray_nsa_reassign:858; GFX1013:       ; %bb.0:859; GFX1013-NEXT:    s_clause 0x1860; GFX1013-NEXT:    s_load_dwordx2 s[6:7], s[4:5], 0x24861; GFX1013-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x34862; GFX1013-NEXT:    v_lshlrev_b32_e32 v2, 2, v0863; GFX1013-NEXT:    v_mov_b32_e32 v3, 0864; GFX1013-NEXT:    v_mov_b32_e32 v4, 1.0865; GFX1013-NEXT:    v_mov_b32_e32 v5, 2.0866; GFX1013-NEXT:    v_mov_b32_e32 v6, 0x40400000867; GFX1013-NEXT:    v_mov_b32_e32 v7, 4.0868; GFX1013-NEXT:    v_mov_b32_e32 v8, 0x40a00000869; GFX1013-NEXT:    v_mov_b32_e32 v9, 0x40c00000870; GFX1013-NEXT:    v_mov_b32_e32 v10, 0x40e00000871; GFX1013-NEXT:    v_mov_b32_e32 v11, 0x41000000872; GFX1013-NEXT:    s_waitcnt lgkmcnt(0)873; GFX1013-NEXT:    v_mov_b32_e32 v0, s6874; GFX1013-NEXT:    v_mov_b32_e32 v1, s7875; GFX1013-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v2876; GFX1013-NEXT:    v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo877; GFX1013-NEXT:    flat_load_dword v2, v[0:1]878; GFX1013-NEXT:    v_mov_b32_e32 v0, 0xb36211c7879; GFX1013-NEXT:    v_bfrev_b32_e32 v1, 4.0880; GFX1013-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)881; GFX1013-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:11], s[0:3]882; GFX1013-NEXT:    s_waitcnt vmcnt(0)883; GFX1013-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]884; GFX1013-NEXT:    s_endpgm885;886; GFX11-LABEL: image_bvh64_intersect_ray_nsa_reassign:887; GFX11:       ; %bb.0:888; GFX11-NEXT:    s_clause 0x1889; GFX11-NEXT:    s_load_b64 s[6:7], s[4:5], 0x24890; GFX11-NEXT:    s_load_b128 s[0:3], s[4:5], 0x34891; GFX11-NEXT:    v_and_b32_e32 v0, 0x3ff, v0892; GFX11-NEXT:    s_mov_b32 s5, 1.0893; GFX11-NEXT:    s_mov_b32 s4, 0894; GFX11-NEXT:    v_mov_b32_e32 v9, 0xb36211c7895; GFX11-NEXT:    s_mov_b32 s8, 0x40400000896; GFX11-NEXT:    v_lshlrev_b32_e32 v2, 2, v0897; GFX11-NEXT:    s_mov_b32 s12, 0x40c00000898; GFX11-NEXT:    s_mov_b32 s10, 0x40a00000899; GFX11-NEXT:    s_mov_b32 s9, 4.0900; GFX11-NEXT:    s_mov_b32 s14, 0x41000000901; GFX11-NEXT:    s_mov_b32 s13, 0x40e00000902; GFX11-NEXT:    v_mov_b32_e32 v6, s12903; GFX11-NEXT:    v_bfrev_b32_e32 v10, 4.0904; GFX11-NEXT:    v_dual_mov_b32 v8, s14 :: v_dual_mov_b32 v3, s8905; GFX11-NEXT:    v_dual_mov_b32 v4, s9 :: v_dual_mov_b32 v7, s13906; GFX11-NEXT:    s_waitcnt lgkmcnt(0)907; GFX11-NEXT:    v_dual_mov_b32 v5, s10 :: v_dual_mov_b32 v0, s6908; GFX11-NEXT:    v_mov_b32_e32 v1, s7909; GFX11-NEXT:    s_mov_b32 s6, 2.0910; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)911; GFX11-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v2912; GFX11-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo913; GFX11-NEXT:    flat_load_b32 v11, v[0:1]914; GFX11-NEXT:    v_dual_mov_b32 v0, s4 :: v_dual_mov_b32 v1, s5915; GFX11-NEXT:    v_mov_b32_e32 v2, s6916; GFX11-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)917; GFX11-NEXT:    image_bvh64_intersect_ray v[0:3], [v[9:10], v11, v[0:2], v[3:5], v[6:8]], s[0:3]918; GFX11-NEXT:    s_waitcnt vmcnt(0)919; GFX11-NEXT:    flat_store_b128 v[0:1], v[0:3]920; GFX11-NEXT:    s_endpgm921  %lid = tail call i32 @llvm.amdgcn.workitem.id.x()922  %gep_ray = getelementptr inbounds float, ptr %p_ray, i32 %lid923  %ray_extent = load float, ptr %gep_ray, align 4924  %ray_origin0 = insertelement <3 x float> poison, float 0.0, i32 0925  %ray_origin1 = insertelement <3 x float> %ray_origin0, float 1.0, i32 1926  %ray_origin = insertelement <3 x float> %ray_origin1, float 2.0, i32 2927  %ray_dir0 = insertelement <3 x float> poison, float 3.0, i32 0928  %ray_dir1 = insertelement <3 x float> %ray_dir0, float 4.0, i32 1929  %ray_dir = insertelement <3 x float> %ray_dir1, float 5.0, i32 2930  %ray_inv_dir0 = insertelement <3 x float> poison, float 6.0, i32 0931  %ray_inv_dir1 = insertelement <3 x float> %ray_inv_dir0, float 7.0, i32 1932  %ray_inv_dir = insertelement <3 x float> %ray_inv_dir1, float 8.0, i32 2933  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f32(i64 1111111111111, float %ray_extent, <3 x float> %ray_origin, <3 x float> %ray_dir, <3 x float> %ray_inv_dir, <4 x i32> %tdescr)934  store <4 x i32> %v, ptr poison935  ret void936}937 938define amdgpu_kernel void @image_bvh64_intersect_ray_a16_nsa_reassign(ptr %p_ray, <4 x i32> %tdescr) {939; GFX1030-LABEL: image_bvh64_intersect_ray_a16_nsa_reassign:940; GFX1030:       ; %bb.0:941; GFX1030-NEXT:    s_clause 0x1942; GFX1030-NEXT:    s_load_dwordx2 s[6:7], s[4:5], 0x24943; GFX1030-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x34944; GFX1030-NEXT:    v_lshlrev_b32_e32 v2, 2, v0945; GFX1030-NEXT:    v_mov_b32_e32 v3, 0946; GFX1030-NEXT:    v_mov_b32_e32 v4, 1.0947; GFX1030-NEXT:    v_mov_b32_e32 v5, 2.0948; GFX1030-NEXT:    v_mov_b32_e32 v6, 0x44004200949; GFX1030-NEXT:    v_mov_b32_e32 v7, 0x46004500950; GFX1030-NEXT:    v_mov_b32_e32 v8, 0x48004700951; GFX1030-NEXT:    s_waitcnt lgkmcnt(0)952; GFX1030-NEXT:    v_mov_b32_e32 v0, s6953; GFX1030-NEXT:    v_mov_b32_e32 v1, s7954; GFX1030-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v2955; GFX1030-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo956; GFX1030-NEXT:    flat_load_dword v2, v[0:1]957; GFX1030-NEXT:    v_mov_b32_e32 v0, 0xb36211c6958; GFX1030-NEXT:    v_bfrev_b32_e32 v1, 4.0959; GFX1030-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)960; GFX1030-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:8], s[0:3] a16961; GFX1030-NEXT:    s_waitcnt vmcnt(0)962; GFX1030-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]963; GFX1030-NEXT:    s_endpgm964;965; GFX1013-LABEL: image_bvh64_intersect_ray_a16_nsa_reassign:966; GFX1013:       ; %bb.0:967; GFX1013-NEXT:    s_clause 0x1968; GFX1013-NEXT:    s_load_dwordx2 s[6:7], s[4:5], 0x24969; GFX1013-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x34970; GFX1013-NEXT:    v_lshlrev_b32_e32 v2, 2, v0971; GFX1013-NEXT:    v_mov_b32_e32 v3, 0972; GFX1013-NEXT:    v_mov_b32_e32 v4, 1.0973; GFX1013-NEXT:    v_mov_b32_e32 v5, 2.0974; GFX1013-NEXT:    v_mov_b32_e32 v6, 0x44004200975; GFX1013-NEXT:    v_mov_b32_e32 v7, 0x46004500976; GFX1013-NEXT:    v_mov_b32_e32 v8, 0x48004700977; GFX1013-NEXT:    s_waitcnt lgkmcnt(0)978; GFX1013-NEXT:    v_mov_b32_e32 v0, s6979; GFX1013-NEXT:    v_mov_b32_e32 v1, s7980; GFX1013-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v2981; GFX1013-NEXT:    v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo982; GFX1013-NEXT:    flat_load_dword v2, v[0:1]983; GFX1013-NEXT:    v_mov_b32_e32 v0, 0xb36211c6984; GFX1013-NEXT:    v_bfrev_b32_e32 v1, 4.0985; GFX1013-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)986; GFX1013-NEXT:    image_bvh64_intersect_ray v[0:3], v[0:8], s[0:3] a16987; GFX1013-NEXT:    s_waitcnt vmcnt(0)988; GFX1013-NEXT:    flat_store_dwordx4 v[0:1], v[0:3]989; GFX1013-NEXT:    s_endpgm990;991; GFX11-LABEL: image_bvh64_intersect_ray_a16_nsa_reassign:992; GFX11:       ; %bb.0:993; GFX11-NEXT:    s_clause 0x1994; GFX11-NEXT:    s_load_b64 s[6:7], s[4:5], 0x24995; GFX11-NEXT:    s_load_b128 s[0:3], s[4:5], 0x34996; GFX11-NEXT:    v_and_b32_e32 v0, 0x3ff, v0997; GFX11-NEXT:    s_mov_b32 s5, 1.0998; GFX11-NEXT:    s_mov_b32 s4, 0999; GFX11-NEXT:    s_mov_b32 s8, 0x420046001000; GFX11-NEXT:    s_mov_b32 s9, 0x440047001001; GFX11-NEXT:    v_lshlrev_b32_e32 v2, 2, v01002; GFX11-NEXT:    s_mov_b32 s10, 0x450048001003; GFX11-NEXT:    v_mov_b32_e32 v6, 0xb36211c61004; GFX11-NEXT:    v_bfrev_b32_e32 v7, 4.01005; GFX11-NEXT:    v_dual_mov_b32 v3, s8 :: v_dual_mov_b32 v4, s91006; GFX11-NEXT:    s_waitcnt lgkmcnt(0)1007; GFX11-NEXT:    v_dual_mov_b32 v5, s10 :: v_dual_mov_b32 v0, s61008; GFX11-NEXT:    v_mov_b32_e32 v1, s71009; GFX11-NEXT:    s_mov_b32 s6, 2.01010; GFX11-NEXT:    s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)1011; GFX11-NEXT:    v_add_co_u32 v0, vcc_lo, v0, v21012; GFX11-NEXT:    v_add_co_ci_u32_e64 v1, null, 0, v1, vcc_lo1013; GFX11-NEXT:    flat_load_b32 v8, v[0:1]1014; GFX11-NEXT:    v_dual_mov_b32 v0, s4 :: v_dual_mov_b32 v1, s51015; GFX11-NEXT:    v_mov_b32_e32 v2, s61016; GFX11-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)1017; GFX11-NEXT:    image_bvh64_intersect_ray v[0:3], [v[6:7], v8, v[0:2], v[3:5]], s[0:3] a161018; GFX11-NEXT:    s_waitcnt vmcnt(0)1019; GFX11-NEXT:    flat_store_b128 v[0:1], v[0:3]1020; GFX11-NEXT:    s_endpgm1021  %lid = tail call i32 @llvm.amdgcn.workitem.id.x()1022  %gep_ray = getelementptr inbounds float, ptr %p_ray, i32 %lid1023  %ray_extent = load float, ptr %gep_ray, align 41024  %ray_origin0 = insertelement <3 x float> poison, float 0.0, i32 01025  %ray_origin1 = insertelement <3 x float> %ray_origin0, float 1.0, i32 11026  %ray_origin = insertelement <3 x float> %ray_origin1, float 2.0, i32 21027  %ray_dir0 = insertelement <3 x half> poison, half 3.0, i32 01028  %ray_dir1 = insertelement <3 x half> %ray_dir0, half 4.0, i32 11029  %ray_dir = insertelement <3 x half> %ray_dir1, half 5.0, i32 21030  %ray_inv_dir0 = insertelement <3 x half> poison, half 6.0, i32 01031  %ray_inv_dir1 = insertelement <3 x half> %ray_inv_dir0, half 7.0, i32 11032  %ray_inv_dir = insertelement <3 x half> %ray_inv_dir1, half 8.0, i32 21033  %v = call <4 x i32> @llvm.amdgcn.image.bvh.intersect.ray.i64.v4f16(i64 1111111111110, float %ray_extent, <3 x float> %ray_origin, <3 x half> %ray_dir, <3 x half> %ray_inv_dir, <4 x i32> %tdescr)1034  store <4 x i32> %v, ptr poison1035  ret void1036}1037