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
974 lines
41 KiB
LLVM
974 lines
41 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji < %s | FileCheck -check-prefixes=GFX8 %s
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9,GFX900 %s
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx942 < %s | FileCheck -check-prefixes=GFX9,GFX942 %s
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GFX11 %s
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1200 < %s | FileCheck -check-prefixes=GFX12 %s
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_uni(half inreg %x, half inreg %y, half inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX8-NEXT: v_fma_f16 v2, s16, v2, v3
|
|
; GFX8-NEXT: flat_store_short v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX900-NEXT: v_fma_f16 v2, s16, v2, v3
|
|
; GFX900-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s1
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s2
|
|
; GFX942-NEXT: v_fma_f16 v2, s0, v2, v3
|
|
; GFX942-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_fma_f16 v2.l, s0, s1, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX12-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %x, half %y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_div(half %x, half %y, half %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v1, v2
|
|
; GFX8-NEXT: flat_store_short v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_fma_f16 v0, v0, v1, v2
|
|
; GFX900-NEXT: global_store_short v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_fma_f16 v0, v0, v1, v2
|
|
; GFX942-NEXT: global_store_short v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_fma_f16 v0.l, v0.l, v1.l, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_fma_f16 v0.l, v0.l, v1.l, v2.l
|
|
; GFX12-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %x, half %y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v2f16_fpexcept_strict_uni(<2 x half> inreg %x, <2 x half> inreg %y, <2 x half> inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v2f16_fpexcept_strict_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX8-NEXT: s_lshr_b32 s5, s17, 16
|
|
; GFX8-NEXT: s_lshr_b32 s6, s18, 16
|
|
; GFX8-NEXT: v_fma_f16 v2, s16, v2, v3
|
|
; GFX8-NEXT: s_lshr_b32 s4, s16, 16
|
|
; GFX8-NEXT: v_readfirstlane_b32 s7, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s5
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s6
|
|
; GFX8-NEXT: v_fma_f16 v2, s4, v2, v3
|
|
; GFX8-NEXT: v_readfirstlane_b32 s4, v2
|
|
; GFX8-NEXT: s_and_b32 s4, 0xffff, s4
|
|
; GFX8-NEXT: s_and_b32 s5, 0xffff, s7
|
|
; GFX8-NEXT: s_lshl_b32 s4, s4, 16
|
|
; GFX8-NEXT: s_or_b32 s4, s5, s4
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s4
|
|
; GFX8-NEXT: flat_store_dword v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_v2f16_fpexcept_strict_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX900-NEXT: v_pk_fma_f16 v2, s16, v2, v3
|
|
; GFX900-NEXT: global_store_dword v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_v2f16_fpexcept_strict_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s1
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s2
|
|
; GFX942-NEXT: v_pk_fma_f16 v2, s0, v2, v3
|
|
; GFX942-NEXT: global_store_dword v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v2f16_fpexcept_strict_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b32_e32 v2, s2
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_pk_fma_f16 v2, s0, s1, v2
|
|
; GFX11-NEXT: global_store_b32 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v2f16_fpexcept_strict_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_lshr_b32 s3, s0, 16
|
|
; GFX12-NEXT: s_lshr_b32 s4, s1, 16
|
|
; GFX12-NEXT: s_lshr_b32 s5, s2, 16
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s5, s3, s4
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: s_pack_ll_b32_b16 s0, s2, s5
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: v_mov_b32_e32 v2, s0
|
|
; GFX12-NEXT: global_store_b32 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call <2 x half> @llvm.experimental.constrained.fma.v2f16(<2 x half> %x, <2 x half> %y, <2 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <2 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v2f16_fpexcept_strict_div(<2 x half> %x, <2 x half> %y, <2 x half> %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v2f16_fpexcept_strict_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v5, 16, v0
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v6, 16, v1
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v7, 16, v2
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v1, v2
|
|
; GFX8-NEXT: v_fma_f16 v1, v5, v6, v7
|
|
; GFX8-NEXT: v_lshlrev_b32_e32 v1, 16, v1
|
|
; GFX8-NEXT: v_or_b32_e32 v0, v0, v1
|
|
; GFX8-NEXT: flat_store_dword v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_v2f16_fpexcept_strict_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_pk_fma_f16 v0, v0, v1, v2
|
|
; GFX900-NEXT: global_store_dword v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_v2f16_fpexcept_strict_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_pk_fma_f16 v0, v0, v1, v2
|
|
; GFX942-NEXT: global_store_dword v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v2f16_fpexcept_strict_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_pk_fma_f16 v0, v0, v1, v2
|
|
; GFX11-NEXT: global_store_b32 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v2f16_fpexcept_strict_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_pk_fma_f16 v0, v0, v1, v2
|
|
; GFX12-NEXT: global_store_b32 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call <2 x half> @llvm.experimental.constrained.fma.v2f16(<2 x half> %x, <2 x half> %y, <2 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <2 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
;define void @v_constained_fma_v3f16_fpexcept_strict_uni(<3 x half> inreg %x, <3 x half> inreg %y, <3 x half> inreg %z, ptr addrspace(1) %out) #0 {
|
|
; %val = call <3 x half> @llvm.experimental.constrained.fma.v3f16(<3 x half> %x, <3 x half> %y, <3 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
; store <3 x half> %val, ptr addrspace(1) %out
|
|
; ret void
|
|
;}
|
|
|
|
define void @v_constained_fma_v3f16_fpexcept_strict_div(<3 x half> %x, <3 x half> %y, <3 x half> %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v3f16_fpexcept_strict_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v8, 16, v0
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v2, v4
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v9, 16, v2
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v10, 16, v4
|
|
; GFX8-NEXT: flat_store_short v[6:7], v0
|
|
; GFX8-NEXT: v_add_u32_e32 v0, vcc, 2, v6
|
|
; GFX8-NEXT: v_fma_f16 v2, v8, v9, v10
|
|
; GFX8-NEXT: v_fma_f16 v3, v1, v3, v5
|
|
; GFX8-NEXT: v_addc_u32_e32 v1, vcc, 0, v7, vcc
|
|
; GFX8-NEXT: flat_store_short v[0:1], v2
|
|
; GFX8-NEXT: v_add_u32_e32 v0, vcc, 4, v6
|
|
; GFX8-NEXT: v_addc_u32_e32 v1, vcc, 0, v7, vcc
|
|
; GFX8-NEXT: flat_store_short v[0:1], v3
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX9-LABEL: v_constained_fma_v3f16_fpexcept_strict_div:
|
|
; GFX9: ; %bb.0:
|
|
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX9-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX9-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX9-NEXT: global_store_short v[6:7], v0, off
|
|
; GFX9-NEXT: global_store_short_d16_hi v[6:7], v0, off offset:2
|
|
; GFX9-NEXT: global_store_short v[6:7], v1, off offset:4
|
|
; GFX9-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX9-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v3f16_fpexcept_strict_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX11-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX11-NEXT: s_clause 0x2
|
|
; GFX11-NEXT: global_store_b16 v[6:7], v0, off
|
|
; GFX11-NEXT: global_store_d16_hi_b16 v[6:7], v0, off offset:2
|
|
; GFX11-NEXT: global_store_b16 v[6:7], v1, off offset:4
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v3f16_fpexcept_strict_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX12-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX12-NEXT: s_clause 0x2
|
|
; GFX12-NEXT: global_store_b16 v[6:7], v0, off
|
|
; GFX12-NEXT: global_store_d16_hi_b16 v[6:7], v0, off offset:2
|
|
; GFX12-NEXT: global_store_b16 v[6:7], v1, off offset:4
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call <3 x half> @llvm.experimental.constrained.fma.v3f16(<3 x half> %x, <3 x half> %y, <3 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <3 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v4f16_fpexcept_strict_uni(<4 x half> inreg %x, <4 x half> inreg %y, <4 x half> inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v4f16_fpexcept_strict_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s18
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s20
|
|
; GFX8-NEXT: s_lshr_b32 s6, s18, 16
|
|
; GFX8-NEXT: s_lshr_b32 s8, s20, 16
|
|
; GFX8-NEXT: v_fma_f16 v2, s16, v2, v3
|
|
; GFX8-NEXT: s_lshr_b32 s4, s16, 16
|
|
; GFX8-NEXT: v_readfirstlane_b32 s10, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s6
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s8
|
|
; GFX8-NEXT: v_fma_f16 v2, s4, v2, v3
|
|
; GFX8-NEXT: v_readfirstlane_b32 s4, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s19
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s21
|
|
; GFX8-NEXT: s_lshr_b32 s7, s19, 16
|
|
; GFX8-NEXT: s_lshr_b32 s9, s21, 16
|
|
; GFX8-NEXT: v_fma_f16 v2, s17, v2, v3
|
|
; GFX8-NEXT: s_lshr_b32 s5, s17, 16
|
|
; GFX8-NEXT: v_readfirstlane_b32 s6, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s7
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s9
|
|
; GFX8-NEXT: v_fma_f16 v2, s5, v2, v3
|
|
; GFX8-NEXT: v_readfirstlane_b32 s5, v2
|
|
; GFX8-NEXT: s_and_b32 s4, 0xffff, s4
|
|
; GFX8-NEXT: s_and_b32 s7, 0xffff, s10
|
|
; GFX8-NEXT: s_lshl_b32 s4, s4, 16
|
|
; GFX8-NEXT: s_and_b32 s5, 0xffff, s5
|
|
; GFX8-NEXT: s_or_b32 s4, s7, s4
|
|
; GFX8-NEXT: s_and_b32 s6, 0xffff, s6
|
|
; GFX8-NEXT: s_lshl_b32 s5, s5, 16
|
|
; GFX8-NEXT: s_or_b32 s5, s6, s5
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s4
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s5
|
|
; GFX8-NEXT: flat_store_dwordx2 v[0:1], v[2:3]
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_v4f16_fpexcept_strict_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s18
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s20
|
|
; GFX900-NEXT: v_pk_fma_f16 v2, s16, v2, v3
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s19
|
|
; GFX900-NEXT: v_mov_b32_e32 v4, s21
|
|
; GFX900-NEXT: v_pk_fma_f16 v3, s17, v3, v4
|
|
; GFX900-NEXT: global_store_dwordx2 v[0:1], v[2:3], off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_v4f16_fpexcept_strict_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s2
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s16
|
|
; GFX942-NEXT: v_pk_fma_f16 v2, s0, v2, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s3
|
|
; GFX942-NEXT: v_mov_b32_e32 v4, s17
|
|
; GFX942-NEXT: v_pk_fma_f16 v3, s1, v3, v4
|
|
; GFX942-NEXT: global_store_dwordx2 v[0:1], v[2:3], off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v4f16_fpexcept_strict_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_dual_mov_b32 v2, s16 :: v_dual_mov_b32 v3, s17
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
|
|
; GFX11-NEXT: v_pk_fma_f16 v2, s0, s2, v2
|
|
; GFX11-NEXT: v_pk_fma_f16 v3, s1, s3, v3
|
|
; GFX11-NEXT: global_store_b64 v[0:1], v[2:3], off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v4f16_fpexcept_strict_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_lshr_b32 s4, s0, 16
|
|
; GFX12-NEXT: s_lshr_b32 s5, s2, 16
|
|
; GFX12-NEXT: s_lshr_b32 s6, s16, 16
|
|
; GFX12-NEXT: s_fmac_f16 s16, s0, s2
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s6, s4, s5
|
|
; GFX12-NEXT: s_lshr_b32 s0, s1, 16
|
|
; GFX12-NEXT: s_lshr_b32 s2, s3, 16
|
|
; GFX12-NEXT: s_lshr_b32 s4, s17, 16
|
|
; GFX12-NEXT: s_fmac_f16 s17, s1, s3
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s4, s0, s2
|
|
; GFX12-NEXT: s_pack_ll_b32_b16 s0, s16, s6
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GFX12-NEXT: s_pack_ll_b32_b16 s1, s17, s4
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: v_dual_mov_b32 v3, s1 :: v_dual_mov_b32 v2, s0
|
|
; GFX12-NEXT: global_store_b64 v[0:1], v[2:3], off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call <4 x half> @llvm.experimental.constrained.fma.v4f16(<4 x half> %x, <4 x half> %y, <4 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <4 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v4f16_fpexcept_strict_div(<4 x half> %x, <4 x half> %y, <4 x half> %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v4f16_fpexcept_strict_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v8, 16, v0
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v10, 16, v2
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v12, 16, v4
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v9, 16, v1
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v11, 16, v3
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v13, 16, v5
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v2, v4
|
|
; GFX8-NEXT: v_fma_f16 v2, v8, v10, v12
|
|
; GFX8-NEXT: v_fma_f16 v1, v1, v3, v5
|
|
; GFX8-NEXT: v_fma_f16 v3, v9, v11, v13
|
|
; GFX8-NEXT: v_lshlrev_b32_e32 v2, 16, v2
|
|
; GFX8-NEXT: v_or_b32_e32 v0, v0, v2
|
|
; GFX8-NEXT: v_lshlrev_b32_e32 v2, 16, v3
|
|
; GFX8-NEXT: v_or_b32_e32 v1, v1, v2
|
|
; GFX8-NEXT: flat_store_dwordx2 v[6:7], v[0:1]
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX9-LABEL: v_constained_fma_v4f16_fpexcept_strict_div:
|
|
; GFX9: ; %bb.0:
|
|
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX9-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX9-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX9-NEXT: global_store_dwordx2 v[6:7], v[0:1], off
|
|
; GFX9-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX9-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v4f16_fpexcept_strict_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX11-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX11-NEXT: global_store_b64 v[6:7], v[0:1], off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v4f16_fpexcept_strict_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_pk_fma_f16 v0, v0, v2, v4
|
|
; GFX12-NEXT: v_pk_fma_f16 v1, v1, v3, v5
|
|
; GFX12-NEXT: global_store_b64 v[6:7], v[0:1], off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%val = call <4 x half> @llvm.experimental.constrained.fma.v4f16(<4 x half> %x, <4 x half> %y, <4 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <4 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fneg_uni(half inreg %x, half inreg %y, half inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s16
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s17
|
|
; GFX8-NEXT: v_fma_f16 v2, v2, v3, -s18
|
|
; GFX8-NEXT: flat_store_short v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s16
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s17
|
|
; GFX900-NEXT: v_fma_f16 v2, v2, v3, -s18
|
|
; GFX900-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s0
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s1
|
|
; GFX942-NEXT: v_fma_f16 v2, v2, v3, -s2
|
|
; GFX942-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b16_e32 v2.l, s1
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_fma_f16 v2.l, s0, v2.l, -s2
|
|
; GFX11-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_xor_b32 s2, s2, 0x8000
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX12-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.z = fneg half %z
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %x, half %y, half %neg.z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fneg_div(half %x, half %y, half %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v1, -v2
|
|
; GFX8-NEXT: flat_store_short v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_fma_f16 v0, v0, v1, -v2
|
|
; GFX900-NEXT: global_store_short v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_fma_f16 v0, v0, v1, -v2
|
|
; GFX942-NEXT: global_store_short v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_fma_f16 v0.l, v0.l, v1.l, -v2.l
|
|
; GFX11-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_fma_f16 v0.l, v0.l, v1.l, -v2.l
|
|
; GFX12-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.z = fneg half %z
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %x, half %y, half %neg.z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni(half inreg %x, half inreg %y, half inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX8-NEXT: v_fma_f16 v2, -s16, -v2, v3
|
|
; GFX8-NEXT: flat_store_short v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX900-NEXT: v_fma_f16 v2, -s16, -v2, v3
|
|
; GFX900-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s1
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s2
|
|
; GFX942-NEXT: v_fma_f16 v2, -s0, -v2, v3
|
|
; GFX942-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_fma_f16 v2.l, -s0, -s1, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_xor_b32 s0, s0, 0x8000
|
|
; GFX12-NEXT: s_xor_b32 s1, s1, 0x8000
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX12-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = fneg half %x
|
|
%neg.y = fneg half %y
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %neg.x, half %neg.y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fneg_fneg_div(half %x, half %y, half %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_fma_f16 v0, -v0, -v1, v2
|
|
; GFX8-NEXT: flat_store_short v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_fma_f16 v0, -v0, -v1, v2
|
|
; GFX900-NEXT: global_store_short v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_fma_f16 v0, -v0, -v1, v2
|
|
; GFX942-NEXT: global_store_short v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_fma_f16 v0.l, -v0.l, -v1.l, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_fma_f16 v0.l, -v0.l, -v1.l, v2.l
|
|
; GFX12-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = fneg half %x
|
|
%neg.y = fneg half %y
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %neg.x, half %neg.y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni(half inreg %x, half inreg %y, half inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX8-NEXT: v_fma_f16 v2, |s16|, |v2|, v3
|
|
; GFX8-NEXT: flat_store_short v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX900-NEXT: v_fma_f16 v2, |s16|, |v2|, v3
|
|
; GFX900-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s1
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s2
|
|
; GFX942-NEXT: v_fma_f16 v2, |s0|, |v2|, v3
|
|
; GFX942-NEXT: global_store_short v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_fma_f16 v2.l, |s0|, |s1|, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_and_b32 s0, s0, 0x7fff
|
|
; GFX12-NEXT: s_and_b32 s1, s1, 0x7fff
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: v_mov_b16_e32 v2.l, s2
|
|
; GFX12-NEXT: global_store_b16 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = call half @llvm.fabs.f16(half %x) #0
|
|
%neg.y = call half @llvm.fabs.f16(half %y) #0
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %neg.x, half %neg.y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_f16_fpexcept_strict_fabs_fabs_div(half %x, half %y, half %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_fma_f16 v0, |v0|, |v1|, v2
|
|
; GFX8-NEXT: flat_store_short v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_fma_f16 v0, |v0|, |v1|, v2
|
|
; GFX900-NEXT: global_store_short v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_fma_f16 v0, |v0|, |v1|, v2
|
|
; GFX942-NEXT: global_store_short v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_fma_f16 v0.l, |v0.l|, |v1.l|, v2.l
|
|
; GFX11-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_f16_fpexcept_strict_fabs_fabs_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_fma_f16 v0.l, |v0.l|, |v1.l|, v2.l
|
|
; GFX12-NEXT: global_store_b16 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = call half @llvm.fabs.f16(half %x) #0
|
|
%neg.y = call half @llvm.fabs.f16(half %y) #0
|
|
%val = call half @llvm.experimental.constrained.fma.f16(half %neg.x, half %neg.y, half %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store half %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni(<2 x half> inreg %x, <2 x half> inreg %y, <2 x half> inreg %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s16
|
|
; GFX8-NEXT: v_xor_b32_e32 v2, 0x80008000, v2
|
|
; GFX8-NEXT: v_readfirstlane_b32 s4, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX8-NEXT: v_xor_b32_e32 v2, 0x80008000, v2
|
|
; GFX8-NEXT: v_readfirstlane_b32 s5, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s5
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX8-NEXT: s_lshr_b32 s7, s5, 16
|
|
; GFX8-NEXT: s_lshr_b32 s8, s18, 16
|
|
; GFX8-NEXT: v_fma_f16 v2, s4, v2, v3
|
|
; GFX8-NEXT: s_lshr_b32 s6, s4, 16
|
|
; GFX8-NEXT: v_readfirstlane_b32 s4, v2
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s7
|
|
; GFX8-NEXT: v_mov_b32_e32 v3, s8
|
|
; GFX8-NEXT: v_fma_f16 v2, s6, v2, v3
|
|
; GFX8-NEXT: v_readfirstlane_b32 s5, v2
|
|
; GFX8-NEXT: s_and_b32 s5, 0xffff, s5
|
|
; GFX8-NEXT: s_and_b32 s4, 0xffff, s4
|
|
; GFX8-NEXT: s_lshl_b32 s5, s5, 16
|
|
; GFX8-NEXT: s_or_b32 s4, s4, s5
|
|
; GFX8-NEXT: v_mov_b32_e32 v2, s4
|
|
; GFX8-NEXT: flat_store_dword v[0:1], v2
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_mov_b32_e32 v2, s17
|
|
; GFX900-NEXT: v_mov_b32_e32 v3, s18
|
|
; GFX900-NEXT: v_pk_fma_f16 v2, s16, v2, v3 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX900-NEXT: global_store_dword v[0:1], v2, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v2, s1
|
|
; GFX942-NEXT: v_mov_b32_e32 v3, s2
|
|
; GFX942-NEXT: v_pk_fma_f16 v2, s0, v2, v3 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX942-NEXT: global_store_dword v[0:1], v2, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_mov_b32_e32 v2, s2
|
|
; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; GFX11-NEXT: v_pk_fma_f16 v2, s0, s1, v2 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX11-NEXT: global_store_b32 v[0:1], v2, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_uni:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: s_lshr_b32 s3, s0, 16
|
|
; GFX12-NEXT: s_lshr_b32 s4, s1, 16
|
|
; GFX12-NEXT: s_xor_b32 s0, s0, 0x8000
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_xor_b32 s3, s3, 0x8000
|
|
; GFX12-NEXT: s_xor_b32 s1, s1, 0x8000
|
|
; GFX12-NEXT: s_xor_b32 s4, s4, 0x8000
|
|
; GFX12-NEXT: s_lshr_b32 s5, s2, 16
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_fmac_f16 s2, s0, s1
|
|
; GFX12-NEXT: s_fmac_f16 s5, s3, s4
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_2)
|
|
; GFX12-NEXT: s_pack_ll_b32_b16 s0, s2, s5
|
|
; GFX12-NEXT: s_wait_alu depctr_sa_sdst(0)
|
|
; GFX12-NEXT: v_mov_b32_e32 v2, s0
|
|
; GFX12-NEXT: global_store_b32 v[0:1], v2, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = fneg <2 x half> %x
|
|
%neg.y = fneg <2 x half> %y
|
|
%val = call <2 x half> @llvm.experimental.constrained.fma.v2f16(<2 x half> %neg.x, <2 x half> %neg.y, <2 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <2 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define void @v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div(<2 x half> %x, <2 x half> %y, <2 x half> %z, ptr addrspace(1) %out) #0 {
|
|
; GFX8-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX8: ; %bb.0:
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX8-NEXT: v_xor_b32_e32 v0, 0x80008000, v0
|
|
; GFX8-NEXT: v_xor_b32_e32 v1, 0x80008000, v1
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v5, 16, v0
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v6, 16, v1
|
|
; GFX8-NEXT: v_lshrrev_b32_e32 v7, 16, v2
|
|
; GFX8-NEXT: v_fma_f16 v0, v0, v1, v2
|
|
; GFX8-NEXT: v_fma_f16 v1, v5, v6, v7
|
|
; GFX8-NEXT: v_lshlrev_b32_e32 v1, 16, v1
|
|
; GFX8-NEXT: v_or_b32_e32 v0, v0, v1
|
|
; GFX8-NEXT: flat_store_dword v[3:4], v0
|
|
; GFX8-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX8-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX900-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX900: ; %bb.0:
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX900-NEXT: v_pk_fma_f16 v0, v0, v1, v2 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX900-NEXT: global_store_dword v[3:4], v0, off
|
|
; GFX900-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX900-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX942-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX942: ; %bb.0:
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX942-NEXT: v_mov_b32_e32 v6, v3
|
|
; GFX942-NEXT: v_mov_b32_e32 v7, v4
|
|
; GFX942-NEXT: v_pk_fma_f16 v0, v0, v1, v2 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX942-NEXT: global_store_dword v[6:7], v0, off
|
|
; GFX942-NEXT: s_waitcnt vmcnt(0)
|
|
; GFX942-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX11-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX11: ; %bb.0:
|
|
; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
|
|
; GFX11-NEXT: v_pk_fma_f16 v0, v0, v1, v2 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX11-NEXT: global_store_b32 v[3:4], v0, off
|
|
; GFX11-NEXT: s_setpc_b64 s[30:31]
|
|
;
|
|
; GFX12-LABEL: v_constained_fma_v2f16_fpexcept_strict_fneg_fneg_div:
|
|
; GFX12: ; %bb.0:
|
|
; GFX12-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GFX12-NEXT: s_wait_expcnt 0x0
|
|
; GFX12-NEXT: s_wait_samplecnt 0x0
|
|
; GFX12-NEXT: s_wait_bvhcnt 0x0
|
|
; GFX12-NEXT: s_wait_kmcnt 0x0
|
|
; GFX12-NEXT: v_pk_fma_f16 v0, v0, v1, v2 neg_lo:[1,1,0] neg_hi:[1,1,0]
|
|
; GFX12-NEXT: global_store_b32 v[3:4], v0, off
|
|
; GFX12-NEXT: s_setpc_b64 s[30:31]
|
|
%neg.x = fneg <2 x half> %x
|
|
%neg.y = fneg <2 x half> %y
|
|
%val = call <2 x half> @llvm.experimental.constrained.fma.v2f16(<2 x half> %neg.x, <2 x half> %neg.y, <2 x half> %z, metadata !"round.tonearest", metadata !"fpexcept.strict")
|
|
store <2 x half> %val, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
declare half @llvm.fabs.f16(half)
|
|
declare half @llvm.experimental.constrained.fma.f16(half, half, half, metadata, metadata)
|
|
declare <2 x half> @llvm.experimental.constrained.fma.v2f16(<2 x half>, <2 x half>, <2 x half>, metadata, metadata)
|
|
declare <3 x half> @llvm.experimental.constrained.fma.v3f16(<3 x half>, <3 x half>, <3 x half>, metadata, metadata)
|
|
declare <4 x half> @llvm.experimental.constrained.fma.v4f16(<4 x half>, <4 x half>, <4 x half>, metadata, metadata)
|
|
|
|
attributes #0 = { strictfp }
|