91 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: not --crash llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 < %s 2>&1 | FileCheck -check-prefix=ERR %s3; RUN: not llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 < %s 2>&1 | FileCheck -check-prefix=ERR %s4; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12-SDAG %s5; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12-GISEL %s6 7declare {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh.dual.intersect.ray(i64, float, i8, <3 x float>, <3 x float>, <2 x i32>, <4 x i32>)8 9; ERR: in function image_bvh_dual_intersect_ray{{.*}}intrinsic not supported on subtarget10define amdgpu_ps <10 x float> @image_bvh_dual_intersect_ray(i64 %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, <2 x i32> %offsets, <4 x i32> inreg %tdescr, ptr addrspace(1) %origin, ptr addrspace(1) %dir) {11; GFX12-SDAG-LABEL: image_bvh_dual_intersect_ray:12; GFX12-SDAG: ; %bb.0: ; %main_body13; GFX12-SDAG-NEXT: v_dual_mov_b32 v22, v8 :: v_dual_mov_b32 v21, v714; GFX12-SDAG-NEXT: v_dual_mov_b32 v20, v6 :: v_dual_mov_b32 v19, v515; GFX12-SDAG-NEXT: v_dual_mov_b32 v18, v4 :: v_dual_mov_b32 v17, v316; GFX12-SDAG-NEXT: v_mov_b32_e32 v3, 017; GFX12-SDAG-NEXT: image_bvh_dual_intersect_ray v[0:9], [v[0:1], v[2:3], v[17:19], v[20:22], v[9:10]], s[0:3]18; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x019; GFX12-SDAG-NEXT: global_store_b96 v[11:12], v[17:19], off20; GFX12-SDAG-NEXT: global_store_b96 v[13:14], v[20:22], off21; GFX12-SDAG-NEXT: ; return to shader part epilog22;23; GFX12-GISEL-LABEL: image_bvh_dual_intersect_ray:24; GFX12-GISEL: ; %bb.0: ; %main_body25; GFX12-GISEL-NEXT: v_dual_mov_b32 v15, v3 :: v_dual_mov_b32 v16, v426; GFX12-GISEL-NEXT: v_dual_mov_b32 v17, v5 :: v_dual_mov_b32 v18, v627; GFX12-GISEL-NEXT: v_dual_mov_b32 v19, v7 :: v_dual_mov_b32 v20, v828; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 029; GFX12-GISEL-NEXT: image_bvh_dual_intersect_ray v[0:9], [v[0:1], v[2:3], v[15:17], v[18:20], v[9:10]], s[0:3]30; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x031; GFX12-GISEL-NEXT: global_store_b96 v[11:12], v[15:17], off32; GFX12-GISEL-NEXT: global_store_b96 v[13:14], v[18:20], off33; GFX12-GISEL-NEXT: ; return to shader part epilog34main_body:35 %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 036 %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 137 %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 238 %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 039 %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 140 %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 241 %v = call {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh.dual.intersect.ray(i64 %node_ptr, float %ray_extent, i8 0, <3 x float> %ray_origin, <3 x float> %ray_dir, <2 x i32> %offsets, <4 x i32> %tdescr)42 %a = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 043 %r = bitcast <10 x i32> %a to <10 x float>44 %o = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 145 store <3 x float> %o, ptr addrspace(1) %origin46 %d = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 247 store <3 x float> %d, ptr addrspace(1) %dir48 ret <10 x float> %r49}50 51define amdgpu_ps <10 x float> @image_bvh_dual_intersect_ray_1(i64 %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, <2 x i32> %offsets, <4 x i32> inreg %tdescr, ptr addrspace(1) %origin, ptr addrspace(1) %dir) {52; GFX12-SDAG-LABEL: image_bvh_dual_intersect_ray_1:53; GFX12-SDAG: ; %bb.0: ; %main_body54; GFX12-SDAG-NEXT: v_dual_mov_b32 v22, v8 :: v_dual_mov_b32 v21, v755; GFX12-SDAG-NEXT: v_dual_mov_b32 v20, v6 :: v_dual_mov_b32 v19, v556; GFX12-SDAG-NEXT: v_dual_mov_b32 v18, v4 :: v_dual_mov_b32 v17, v357; GFX12-SDAG-NEXT: v_mov_b32_e32 v3, 158; GFX12-SDAG-NEXT: image_bvh_dual_intersect_ray v[0:9], [v[0:1], v[2:3], v[17:19], v[20:22], v[9:10]], s[0:3]59; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x060; GFX12-SDAG-NEXT: global_store_b96 v[11:12], v[17:19], off61; GFX12-SDAG-NEXT: global_store_b96 v[13:14], v[20:22], off62; GFX12-SDAG-NEXT: ; return to shader part epilog63;64; GFX12-GISEL-LABEL: image_bvh_dual_intersect_ray_1:65; GFX12-GISEL: ; %bb.0: ; %main_body66; GFX12-GISEL-NEXT: v_dual_mov_b32 v15, v3 :: v_dual_mov_b32 v16, v467; GFX12-GISEL-NEXT: v_dual_mov_b32 v17, v5 :: v_dual_mov_b32 v18, v668; GFX12-GISEL-NEXT: v_dual_mov_b32 v19, v7 :: v_dual_mov_b32 v20, v869; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 170; GFX12-GISEL-NEXT: image_bvh_dual_intersect_ray v[0:9], [v[0:1], v[2:3], v[15:17], v[18:20], v[9:10]], s[0:3]71; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x072; GFX12-GISEL-NEXT: global_store_b96 v[11:12], v[15:17], off73; GFX12-GISEL-NEXT: global_store_b96 v[13:14], v[18:20], off74; GFX12-GISEL-NEXT: ; return to shader part epilog75main_body:76 %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 077 %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 178 %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 279 %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 080 %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 181 %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 282 %v = call {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh.dual.intersect.ray(i64 %node_ptr, float %ray_extent, i8 1, <3 x float> %ray_origin, <3 x float> %ray_dir, <2 x i32> %offsets, <4 x i32> %tdescr)83 %a = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 084 %r = bitcast <10 x i32> %a to <10 x float>85 %o = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 186 store <3 x float> %o, ptr addrspace(1) %origin87 %d = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 288 store <3 x float> %d, ptr addrspace(1) %dir89 ret <10 x float> %r90}91