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
66 lines
2.7 KiB
LLVM
66 lines
2.7 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -mattr=-real-true16 %s -o - | FileCheck -check-prefixes=GCN,FAKE16 %s
|
|
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -mattr=+real-true16 %s -o - | FileCheck -check-prefixes=GCN,REAL16 %s
|
|
|
|
define float @test_canonicalize_amdgcn_tanh_f32(float %a) {
|
|
; GCN-LABEL: test_canonicalize_amdgcn_tanh_f32:
|
|
; GCN: ; %bb.0:
|
|
; GCN-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; GCN-NEXT: s_wait_kmcnt 0x0
|
|
; GCN-NEXT: v_tanh_f32_e32 v0, v0
|
|
; GCN-NEXT: s_set_pc_i64 s[30:31]
|
|
%tanh = call float @llvm.amdgcn.tanh.f32(float %a)
|
|
%canonicalized = call float @llvm.canonicalize.f32(float %tanh)
|
|
ret float %canonicalized
|
|
}
|
|
|
|
define bfloat @test_canonicalize_amdgcn_tanh_bf16(bfloat %a) {
|
|
; FAKE16-LABEL: test_canonicalize_amdgcn_tanh_bf16:
|
|
; FAKE16: ; %bb.0:
|
|
; FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; FAKE16-NEXT: s_wait_kmcnt 0x0
|
|
; FAKE16-NEXT: v_tanh_bf16_e32 v0, v0
|
|
; FAKE16-NEXT: v_nop
|
|
; FAKE16-NEXT: s_delay_alu instid0(TRANS32_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
|
|
; FAKE16-NEXT: v_lshlrev_b32_e32 v0, 16, v0
|
|
; FAKE16-NEXT: v_max_num_f32_e32 v0, v0, v0
|
|
; FAKE16-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; FAKE16-NEXT: v_cvt_pk_bf16_f32 v0, v0, s0
|
|
; FAKE16-NEXT: s_set_pc_i64 s[30:31]
|
|
;
|
|
; REAL16-LABEL: test_canonicalize_amdgcn_tanh_bf16:
|
|
; REAL16: ; %bb.0:
|
|
; REAL16-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; REAL16-NEXT: s_wait_kmcnt 0x0
|
|
; REAL16-NEXT: v_tanh_bf16_e32 v0.l, v0.l
|
|
; REAL16-NEXT: v_nop
|
|
; REAL16-NEXT: s_delay_alu instid0(TRANS32_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
|
|
; REAL16-NEXT: v_lshlrev_b32_e32 v0, 16, v0
|
|
; REAL16-NEXT: v_max_num_f32_e32 v0, v0, v0
|
|
; REAL16-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; REAL16-NEXT: v_cvt_pk_bf16_f32 v0, v0, s0
|
|
; REAL16-NEXT: s_set_pc_i64 s[30:31]
|
|
%tanh = call bfloat @llvm.amdgcn.tanh.bf16(bfloat %a)
|
|
%canonicalized = call bfloat @llvm.canonicalize.bf16(bfloat %tanh)
|
|
ret bfloat %canonicalized
|
|
}
|
|
|
|
define half @test_canonicalize_amdgcn_tanh_f16(half %a) {
|
|
; FAKE16-LABEL: test_canonicalize_amdgcn_tanh_f16:
|
|
; FAKE16: ; %bb.0:
|
|
; FAKE16-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; FAKE16-NEXT: s_wait_kmcnt 0x0
|
|
; FAKE16-NEXT: v_tanh_f16_e32 v0, v0
|
|
; FAKE16-NEXT: s_set_pc_i64 s[30:31]
|
|
;
|
|
; REAL16-LABEL: test_canonicalize_amdgcn_tanh_f16:
|
|
; REAL16: ; %bb.0:
|
|
; REAL16-NEXT: s_wait_loadcnt_dscnt 0x0
|
|
; REAL16-NEXT: s_wait_kmcnt 0x0
|
|
; REAL16-NEXT: v_tanh_f16_e32 v0.l, v0.l
|
|
; REAL16-NEXT: s_set_pc_i64 s[30:31]
|
|
%tanh = call half @llvm.amdgcn.tanh.f16(half %a)
|
|
%canonicalized = call half @llvm.canonicalize.f16(half %tanh)
|
|
ret half %canonicalized
|
|
}
|