CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
153 lines
7.9 KiB
LLVM
153 lines
7.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 < %s | FileCheck %s --check-prefixes=GFX11,SDAG-GFX11,SDAG-GFX11-TRUE16
|
|
; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck %s --check-prefixes=GFX11,SDAG-GFX11,SDAG-GFX11-FAKE16
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1100 -mattr=+real-true16 < %s | FileCheck %s --check-prefixes=GFX11,GISEL-GFX11,GISEL-GFX11-TRUE16
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1100 -mattr=-real-true16 < %s | FileCheck %s --check-prefixes=GFX11,GISEL-GFX11,GISEL-GFX11-FAKE16
|
|
|
|
declare half @llvm.amdgcn.fdot2.f16.f16(<2 x half> %a, <2 x half> %b, half %c)
|
|
|
|
define amdgpu_kernel void @test_llvm_amdgcn_fdot2_f16_f16(
|
|
; SDAG-GFX11-TRUE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16:
|
|
; SDAG-GFX11-TRUE16: ; %bb.0: ; %entry
|
|
; SDAG-GFX11-TRUE16-NEXT: s_load_b256 s[0:7], s[4:5], 0x24
|
|
; SDAG-GFX11-TRUE16-NEXT: v_mov_b32_e32 v1, 0
|
|
; SDAG-GFX11-TRUE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SDAG-GFX11-TRUE16-NEXT: s_load_b32 s2, s[2:3], 0x0
|
|
; SDAG-GFX11-TRUE16-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; SDAG-GFX11-TRUE16-NEXT: global_load_d16_b16 v0, v1, s[6:7]
|
|
; SDAG-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; SDAG-GFX11-TRUE16-NEXT: v_dot2_f16_f16 v0.l, s2, s3, v0.l
|
|
; SDAG-GFX11-TRUE16-NEXT: global_store_b16 v1, v0, s[0:1]
|
|
; SDAG-GFX11-TRUE16-NEXT: s_endpgm
|
|
;
|
|
; SDAG-GFX11-FAKE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16:
|
|
; SDAG-GFX11-FAKE16: ; %bb.0: ; %entry
|
|
; SDAG-GFX11-FAKE16-NEXT: s_load_b256 s[0:7], s[4:5], 0x24
|
|
; SDAG-GFX11-FAKE16-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-GFX11-FAKE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SDAG-GFX11-FAKE16-NEXT: s_load_b32 s2, s[2:3], 0x0
|
|
; SDAG-GFX11-FAKE16-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; SDAG-GFX11-FAKE16-NEXT: global_load_u16 v1, v0, s[6:7]
|
|
; SDAG-GFX11-FAKE16-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; SDAG-GFX11-FAKE16-NEXT: v_dot2_f16_f16 v1, s2, s3, v1
|
|
; SDAG-GFX11-FAKE16-NEXT: global_store_b16 v0, v1, s[0:1]
|
|
; SDAG-GFX11-FAKE16-NEXT: s_endpgm
|
|
;
|
|
; GISEL-GFX11-TRUE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16:
|
|
; GISEL-GFX11-TRUE16: ; %bb.0: ; %entry
|
|
; GISEL-GFX11-TRUE16-NEXT: s_load_b256 s[0:7], s[4:5], 0x24
|
|
; GISEL-GFX11-TRUE16-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-GFX11-TRUE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GISEL-GFX11-TRUE16-NEXT: s_load_b32 s2, s[2:3], 0x0
|
|
; GISEL-GFX11-TRUE16-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; GISEL-GFX11-TRUE16-NEXT: global_load_d16_b16 v0, v1, s[6:7]
|
|
; GISEL-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
|
|
; GISEL-GFX11-TRUE16-NEXT: v_dot2_f16_f16 v0.l, s2, s3, v0.l
|
|
; GISEL-GFX11-TRUE16-NEXT: global_store_b16 v1, v0, s[0:1]
|
|
; GISEL-GFX11-TRUE16-NEXT: s_endpgm
|
|
;
|
|
; GISEL-GFX11-FAKE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16:
|
|
; GISEL-GFX11-FAKE16: ; %bb.0: ; %entry
|
|
; GISEL-GFX11-FAKE16-NEXT: s_load_b256 s[0:7], s[4:5], 0x24
|
|
; GISEL-GFX11-FAKE16-NEXT: v_mov_b32_e32 v0, 0
|
|
; GISEL-GFX11-FAKE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GISEL-GFX11-FAKE16-NEXT: s_load_b32 s2, s[2:3], 0x0
|
|
; GISEL-GFX11-FAKE16-NEXT: s_load_b32 s3, s[4:5], 0x0
|
|
; GISEL-GFX11-FAKE16-NEXT: global_load_u16 v1, v0, s[6:7]
|
|
; GISEL-GFX11-FAKE16-NEXT: s_waitcnt vmcnt(0)
|
|
; GISEL-GFX11-FAKE16-NEXT: v_readfirstlane_b32 s4, v1
|
|
; GISEL-GFX11-FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
|
|
; GISEL-GFX11-FAKE16-NEXT: v_mov_b32_e32 v1, s4
|
|
; GISEL-GFX11-FAKE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GISEL-GFX11-FAKE16-NEXT: v_dot2_f16_f16 v1, s2, s3, v1
|
|
; GISEL-GFX11-FAKE16-NEXT: global_store_b16 v0, v1, s[0:1]
|
|
; GISEL-GFX11-FAKE16-NEXT: s_endpgm
|
|
ptr addrspace(1) %r,
|
|
ptr addrspace(1) %a,
|
|
ptr addrspace(1) %b,
|
|
ptr addrspace(1) %c) {
|
|
entry:
|
|
%a.val = load <2 x half>, ptr addrspace(1) %a
|
|
%b.val = load <2 x half>, ptr addrspace(1) %b
|
|
%c.val = load half, ptr addrspace(1) %c
|
|
%r.val = call half @llvm.amdgcn.fdot2.f16.f16(<2 x half> %a.val, <2 x half> %b.val, half %c.val)
|
|
store half %r.val, ptr addrspace(1) %r
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_kernel void @test_llvm_amdgcn_fdot2_f16_f16_dpp(
|
|
; SDAG-GFX11-TRUE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16_dpp:
|
|
; SDAG-GFX11-TRUE16: ; %bb.0: ; %entry
|
|
; SDAG-GFX11-TRUE16-NEXT: s_load_b128 s[0:3], s[4:5], 0x24
|
|
; SDAG-GFX11-TRUE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SDAG-GFX11-TRUE16-NEXT: scratch_load_b32 v1, off, s1
|
|
; SDAG-GFX11-TRUE16-NEXT: scratch_load_b32 v2, off, s2
|
|
; SDAG-GFX11-TRUE16-NEXT: scratch_load_d16_b16 v0, off, s3
|
|
; SDAG-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(2)
|
|
; SDAG-GFX11-TRUE16-NEXT: v_mov_b32_dpp v1, v1 quad_perm:[1,0,0,0] row_mask:0xf bank_mask:0xf bound_ctrl:1
|
|
; SDAG-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(0)
|
|
; SDAG-GFX11-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; SDAG-GFX11-TRUE16-NEXT: v_dot2_f16_f16 v0.l, v1, v2, v0.l
|
|
; SDAG-GFX11-TRUE16-NEXT: scratch_store_b16 off, v0, s0
|
|
; SDAG-GFX11-TRUE16-NEXT: s_endpgm
|
|
;
|
|
; SDAG-GFX11-FAKE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16_dpp:
|
|
; SDAG-GFX11-FAKE16: ; %bb.0: ; %entry
|
|
; SDAG-GFX11-FAKE16-NEXT: s_load_b128 s[0:3], s[4:5], 0x24
|
|
; SDAG-GFX11-FAKE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; SDAG-GFX11-FAKE16-NEXT: scratch_load_b32 v0, off, s2
|
|
; SDAG-GFX11-FAKE16-NEXT: scratch_load_u16 v1, off, s3
|
|
; SDAG-GFX11-FAKE16-NEXT: scratch_load_b32 v2, off, s1
|
|
; SDAG-GFX11-FAKE16-NEXT: s_waitcnt vmcnt(0)
|
|
; SDAG-GFX11-FAKE16-NEXT: v_dot2_f16_f16_e64_dpp v0, v2, v0, v1 quad_perm:[1,0,0,0] row_mask:0xf bank_mask:0xf bound_ctrl:1
|
|
; SDAG-GFX11-FAKE16-NEXT: scratch_store_b16 off, v0, s0
|
|
; SDAG-GFX11-FAKE16-NEXT: s_endpgm
|
|
;
|
|
; GISEL-GFX11-TRUE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16_dpp:
|
|
; GISEL-GFX11-TRUE16: ; %bb.0: ; %entry
|
|
; GISEL-GFX11-TRUE16-NEXT: s_load_b128 s[0:3], s[4:5], 0x24
|
|
; GISEL-GFX11-TRUE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GISEL-GFX11-TRUE16-NEXT: scratch_load_b32 v1, off, s1
|
|
; GISEL-GFX11-TRUE16-NEXT: scratch_load_b32 v2, off, s2
|
|
; GISEL-GFX11-TRUE16-NEXT: scratch_load_d16_b16 v0, off, s3
|
|
; GISEL-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(2)
|
|
; GISEL-GFX11-TRUE16-NEXT: v_mov_b32_dpp v1, v1 quad_perm:[1,0,0,0] row_mask:0xf bank_mask:0xf bound_ctrl:1
|
|
; GISEL-GFX11-TRUE16-NEXT: s_waitcnt vmcnt(0)
|
|
; GISEL-GFX11-TRUE16-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GISEL-GFX11-TRUE16-NEXT: v_dot2_f16_f16 v0.l, v1, v2, v0.l
|
|
; GISEL-GFX11-TRUE16-NEXT: scratch_store_b16 off, v0, s0
|
|
; GISEL-GFX11-TRUE16-NEXT: s_endpgm
|
|
;
|
|
; GISEL-GFX11-FAKE16-LABEL: test_llvm_amdgcn_fdot2_f16_f16_dpp:
|
|
; GISEL-GFX11-FAKE16: ; %bb.0: ; %entry
|
|
; GISEL-GFX11-FAKE16-NEXT: s_load_b128 s[0:3], s[4:5], 0x24
|
|
; GISEL-GFX11-FAKE16-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GISEL-GFX11-FAKE16-NEXT: scratch_load_b32 v0, off, s1
|
|
; GISEL-GFX11-FAKE16-NEXT: scratch_load_b32 v1, off, s2
|
|
; GISEL-GFX11-FAKE16-NEXT: scratch_load_u16 v2, off, s3
|
|
; GISEL-GFX11-FAKE16-NEXT: s_waitcnt vmcnt(0)
|
|
; GISEL-GFX11-FAKE16-NEXT: v_dot2_f16_f16_e64_dpp v0, v0, v1, v2 quad_perm:[1,0,0,0] row_mask:0xf bank_mask:0xf bound_ctrl:1
|
|
; GISEL-GFX11-FAKE16-NEXT: scratch_store_b16 off, v0, s0
|
|
; GISEL-GFX11-FAKE16-NEXT: s_endpgm
|
|
ptr addrspace(5) %r,
|
|
ptr addrspace(5) %a,
|
|
ptr addrspace(5) %b,
|
|
ptr addrspace(5) %c) {
|
|
entry:
|
|
%a.val = load <2 x half>, ptr addrspace(5) %a
|
|
%b.val = load <2 x half>, ptr addrspace(5) %b
|
|
%c.val = load half, ptr addrspace(5) %c
|
|
%a.val.i32 = bitcast <2 x half> %a.val to i32
|
|
%dpp = call i32 @llvm.amdgcn.update.dpp.i32(i32 %a.val.i32, i32 %a.val.i32, i32 1, i32 15, i32 15, i1 1)
|
|
%a.val.dpp.v2half = bitcast i32 %dpp to <2 x half>
|
|
%r.val = call half @llvm.amdgcn.fdot2.f16.f16(<2 x half> %a.val.dpp.v2half, <2 x half> %b.val, half %c.val)
|
|
store half %r.val, ptr addrspace(5) %r
|
|
ret void
|
|
}
|
|
|
|
declare i32 @llvm.amdgcn.update.dpp.i32(i32, i32, i32, i32, i32, i1)
|
|
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
|
|
; GFX11: {{.*}}
|
|
; GISEL-GFX11: {{.*}}
|
|
; SDAG-GFX11: {{.*}}
|