Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/amdgcn-sin-cos-f16-f32.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

94 lines
2.6 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "s_setreg_imm32_b32" --filter-out "shader" --version 6
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1250 -mattr=-real-true16 < %s | FileCheck -check-prefixes=GCN,FAKE16 %s
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1250 -mattr=+real-true16 < %s | FileCheck -check-prefixes=GCN,REAL16 %s
define amdgpu_ps float @v_sin_f32(float %src) #1 {
; GCN-LABEL: v_sin_f32:
; GCN: ; %bb.0:
; GCN: v_sin_f32_e32 v0, v0
%sin = call float @llvm.amdgcn.sin.f32(float %src) #0
ret float %sin
}
define amdgpu_ps float @s_sin_f32(float inreg %src) #1 {
; GCN-LABEL: s_sin_f32:
; GCN: ; %bb.0:
; GCN: v_sin_f32_e32 v0, s0
%sin = call float @llvm.amdgcn.sin.f32(float %src) #0
ret float %sin
}
define amdgpu_ps half @v_sin_f16(half %src) #1 {
; FAKE16-LABEL: v_sin_f16:
; FAKE16: ; %bb.0:
; FAKE16: v_sin_f16_e32 v0, v0
;
; REAL16-LABEL: v_sin_f16:
; REAL16: ; %bb.0:
; REAL16: v_sin_f16_e32 v0.l, v0.l
%sin = call half @llvm.amdgcn.sin.f16(half %src) #0
ret half %sin
}
define amdgpu_ps half @s_sin_f16(half inreg %src) #1 {
; FAKE16-LABEL: s_sin_f16:
; FAKE16: ; %bb.0:
; FAKE16: v_sin_f16_e32 v0, s0
;
; REAL16-LABEL: s_sin_f16:
; REAL16: ; %bb.0:
; REAL16: v_sin_f16_e32 v0.l, s0
%sin = call half @llvm.amdgcn.sin.f16(half %src) #0
ret half %sin
}
define amdgpu_ps float @v_cos_f32(float %src) #1 {
; GCN-LABEL: v_cos_f32:
; GCN: ; %bb.0:
; GCN: v_cos_f32_e32 v0, v0
%cos = call float @llvm.amdgcn.cos.f32(float %src) #0
ret float %cos
}
define amdgpu_ps float @s_cos_f32(float inreg %src) #1 {
; GCN-LABEL: s_cos_f32:
; GCN: ; %bb.0:
; GCN: v_cos_f32_e32 v0, s0
%cos = call float @llvm.amdgcn.cos.f32(float %src) #0
ret float %cos
}
define amdgpu_ps half @v_cos_f16(half %src) #1 {
; FAKE16-LABEL: v_cos_f16:
; FAKE16: ; %bb.0:
; FAKE16: v_cos_f16_e32 v0, v0
;
; REAL16-LABEL: v_cos_f16:
; REAL16: ; %bb.0:
; REAL16: v_cos_f16_e32 v0.l, v0.l
%cos = call half @llvm.amdgcn.cos.f16(half %src) #0
ret half %cos
}
define amdgpu_ps half @s_cos_f16(half inreg %src) #1 {
; FAKE16-LABEL: s_cos_f16:
; FAKE16: ; %bb.0:
; FAKE16: v_cos_f16_e32 v0, s0
;
; REAL16-LABEL: s_cos_f16:
; REAL16: ; %bb.0:
; REAL16: v_cos_f16_e32 v0.l, s0
%cos = call half @llvm.amdgcn.cos.f16(half %src) #0
ret half %cos
}
declare float @llvm.amdgcn.sin.f32(float) #0
declare half @llvm.amdgcn.sin.f16(half) #0
declare float @llvm.amdgcn.cos.f32(float) #0
declare half @llvm.amdgcn.cos.f16(half) #0
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }