88 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12-SDAG %s3; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12-GISEL %s4 5declare {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh8.intersect.ray(i64, float, i8, <3 x float>, <3 x float>, i32, <4 x i32>)6 7define amdgpu_ps <10 x float> @image_bvh8_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, i32 %offset, <4 x i32> inreg %tdescr, ptr addrspace(1) %origin, ptr addrspace(1) %dir) {8; GFX12-SDAG-LABEL: image_bvh8_intersect_ray:9; GFX12-SDAG: ; %bb.0: ; %main_body10; GFX12-SDAG-NEXT: v_dual_mov_b32 v21, v8 :: v_dual_mov_b32 v20, v711; GFX12-SDAG-NEXT: v_dual_mov_b32 v19, v6 :: v_dual_mov_b32 v18, v512; GFX12-SDAG-NEXT: v_dual_mov_b32 v17, v4 :: v_dual_mov_b32 v16, v313; GFX12-SDAG-NEXT: v_mov_b32_e32 v3, 014; GFX12-SDAG-NEXT: image_bvh8_intersect_ray v[0:9], [v[0:1], v[2:3], v[16:18], v[19:21], v9], s[0:3]15; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x016; GFX12-SDAG-NEXT: global_store_b96 v[10:11], v[16:18], off17; GFX12-SDAG-NEXT: global_store_b96 v[12:13], v[19:21], off18; GFX12-SDAG-NEXT: ; return to shader part epilog19;20; GFX12-GISEL-LABEL: image_bvh8_intersect_ray:21; GFX12-GISEL: ; %bb.0: ; %main_body22; GFX12-GISEL-NEXT: v_dual_mov_b32 v14, v3 :: v_dual_mov_b32 v15, v423; GFX12-GISEL-NEXT: v_dual_mov_b32 v16, v5 :: v_dual_mov_b32 v17, v624; GFX12-GISEL-NEXT: v_dual_mov_b32 v18, v7 :: v_dual_mov_b32 v19, v825; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 026; GFX12-GISEL-NEXT: image_bvh8_intersect_ray v[0:9], [v[0:1], v[2:3], v[14:16], v[17:19], v9], s[0:3]27; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x028; GFX12-GISEL-NEXT: global_store_b96 v[10:11], v[14:16], off29; GFX12-GISEL-NEXT: global_store_b96 v[12:13], v[17:19], off30; GFX12-GISEL-NEXT: ; return to shader part epilog31main_body:32 %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 033 %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 134 %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 235 %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 036 %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 137 %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 238 %v = call {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh8.intersect.ray(i64 %node_ptr, float %ray_extent, i8 0, <3 x float> %ray_origin, <3 x float> %ray_dir, i32 %offset, <4 x i32> %tdescr)39 %a = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 040 %r = bitcast <10 x i32> %a to <10 x float>41 %o = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 142 store <3 x float> %o, ptr addrspace(1) %origin43 %d = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 244 store <3 x float> %d, ptr addrspace(1) %dir45 ret <10 x float> %r46}47 48define amdgpu_ps <10 x float> @image_bvh8_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, i32 %offset, <4 x i32> inreg %tdescr, ptr addrspace(1) %origin, ptr addrspace(1) %dir) {49; GFX12-SDAG-LABEL: image_bvh8_intersect_ray_1:50; GFX12-SDAG: ; %bb.0: ; %main_body51; GFX12-SDAG-NEXT: v_dual_mov_b32 v21, v8 :: v_dual_mov_b32 v20, v752; GFX12-SDAG-NEXT: v_dual_mov_b32 v19, v6 :: v_dual_mov_b32 v18, v553; GFX12-SDAG-NEXT: v_dual_mov_b32 v17, v4 :: v_dual_mov_b32 v16, v354; GFX12-SDAG-NEXT: v_mov_b32_e32 v3, 155; GFX12-SDAG-NEXT: image_bvh8_intersect_ray v[0:9], [v[0:1], v[2:3], v[16:18], v[19:21], v9], s[0:3]56; GFX12-SDAG-NEXT: s_wait_bvhcnt 0x057; GFX12-SDAG-NEXT: global_store_b96 v[10:11], v[16:18], off58; GFX12-SDAG-NEXT: global_store_b96 v[12:13], v[19:21], off59; GFX12-SDAG-NEXT: ; return to shader part epilog60;61; GFX12-GISEL-LABEL: image_bvh8_intersect_ray_1:62; GFX12-GISEL: ; %bb.0: ; %main_body63; GFX12-GISEL-NEXT: v_dual_mov_b32 v14, v3 :: v_dual_mov_b32 v15, v464; GFX12-GISEL-NEXT: v_dual_mov_b32 v16, v5 :: v_dual_mov_b32 v17, v665; GFX12-GISEL-NEXT: v_dual_mov_b32 v18, v7 :: v_dual_mov_b32 v19, v866; GFX12-GISEL-NEXT: v_mov_b32_e32 v3, 167; GFX12-GISEL-NEXT: image_bvh8_intersect_ray v[0:9], [v[0:1], v[2:3], v[14:16], v[17:19], v9], s[0:3]68; GFX12-GISEL-NEXT: s_wait_bvhcnt 0x069; GFX12-GISEL-NEXT: global_store_b96 v[10:11], v[14:16], off70; GFX12-GISEL-NEXT: global_store_b96 v[12:13], v[17:19], off71; GFX12-GISEL-NEXT: ; return to shader part epilog72main_body:73 %ray_origin0 = insertelement <3 x float> poison, float %ray_origin_x, i32 074 %ray_origin1 = insertelement <3 x float> %ray_origin0, float %ray_origin_y, i32 175 %ray_origin = insertelement <3 x float> %ray_origin1, float %ray_origin_z, i32 276 %ray_dir0 = insertelement <3 x float> poison, float %ray_dir_x, i32 077 %ray_dir1 = insertelement <3 x float> %ray_dir0, float %ray_dir_y, i32 178 %ray_dir = insertelement <3 x float> %ray_dir1, float %ray_dir_z, i32 279 %v = call {<10 x i32>, <3 x float>, <3 x float>} @llvm.amdgcn.image.bvh8.intersect.ray(i64 %node_ptr, float %ray_extent, i8 1, <3 x float> %ray_origin, <3 x float> %ray_dir, i32 %offset, <4 x i32> %tdescr)80 %a = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 081 %r = bitcast <10 x i32> %a to <10 x float>82 %o = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 183 store <3 x float> %o, ptr addrspace(1) %origin84 %d = extractvalue {<10 x i32>, <3 x float>, <3 x float>} %v, 285 store <3 x float> %d, ptr addrspace(1) %dir86 ret <10 x float> %r87}88