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
195 lines
5.0 KiB
Plaintext
195 lines
5.0 KiB
Plaintext
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
|
|
|
|
module mod1
|
|
type retf
|
|
real :: inf, sup, near, zero
|
|
end type retf
|
|
type retd
|
|
real(8) :: inf, sup, near, zero
|
|
end type retd
|
|
contains
|
|
attributes(global) subroutine fadd(c, a, b)
|
|
real(4) :: a, b
|
|
type (retf) :: c
|
|
c%near = __fadd_rn(a, b)
|
|
c%zero = __fadd_rz(a, b)
|
|
c%inf = __fadd_rd(a, b)
|
|
c%sup = __fadd_ru(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine dadd(c, a, b)
|
|
real(8) :: a, b
|
|
type (retd) :: c
|
|
c%near = __dadd_rn(a, b)
|
|
c%zero = __dadd_rz(a, b)
|
|
c%inf = __dadd_rd(a, b)
|
|
c%sup = __dadd_ru(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine fmul(c, a, b)
|
|
real(4) :: a, b
|
|
type (retf) :: c
|
|
c%near = __fmul_rn(a, b)
|
|
c%zero = __fmul_rz(a, b)
|
|
c%inf = __fmul_rd(a, b)
|
|
c%sup = __fmul_ru(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine dmul(c, a, b)
|
|
real(8) :: a, b
|
|
type (retf) :: c
|
|
c%near = __dmul_rn(a, b)
|
|
c%zero = __dmul_rz(a, b)
|
|
c%inf = __dmul_rd(a, b)
|
|
c%sup = __dmul_ru(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine fmaf(c, a, b)
|
|
real(4) :: a, b
|
|
type (retf) :: c
|
|
c%near = __fmaf_rn(a, b, b)
|
|
c%zero = __fmaf_rz(a, b, b)
|
|
c%inf = __fmaf_rd(a, b, b)
|
|
c%sup = __fmaf_ru(a, b, b)
|
|
end subroutine
|
|
attributes(global) subroutine fma(c, a, b)
|
|
real(8) :: a, b
|
|
type (retd) :: c
|
|
c%near = __fma_rn(a, b, b)
|
|
c%zero = __fma_rz(a, b, b)
|
|
c%inf = __fma_rd(a, b, b)
|
|
c%sup = __fma_ru(a, b, b)
|
|
end subroutine
|
|
attributes(global) subroutine frcp(c,a)
|
|
real(4) :: a
|
|
type (retf) :: c
|
|
c%near = __frcp_rn(a)
|
|
c%zero = __frcp_rz(a)
|
|
c%inf = __frcp_rd(a)
|
|
c%sup = __frcp_ru(a)
|
|
end subroutine
|
|
attributes(global) subroutine fsqrt(c,a)
|
|
real(4) :: a
|
|
type (retf) :: c
|
|
c%near = __fsqrt_rn(a)
|
|
c%zero = __fsqrt_rz(a)
|
|
c%inf = __fsqrt_rd(a)
|
|
c%sup = __fsqrt_ru(a)
|
|
end subroutine
|
|
attributes(global) subroutine fdiv(c, a, b)
|
|
real(4) :: a, b
|
|
type (retf) :: c
|
|
c%near = __fdiv_rn(a, b)
|
|
c%zero = __fdiv_rz(a, b)
|
|
c%inf = __fdiv_rd(a, b)
|
|
c%sup = __fdiv_ru(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine testsincosf(c, a, b)
|
|
real(4) :: a, b, c
|
|
call sincos(a, b, c)
|
|
end subroutine
|
|
attributes(global) subroutine testsincosd(c, a, b)
|
|
real(8) :: a, b, c
|
|
call sincos(a, b, c)
|
|
end subroutine
|
|
attributes(global) subroutine testsincospif(c, a, b)
|
|
real(4) :: a, b, c
|
|
call sincospi(a, b, c)
|
|
end subroutine
|
|
attributes(global) subroutine testsincospid(c, a, b)
|
|
real(8) :: a, b, c
|
|
call sincospi(a, b, c)
|
|
end subroutine
|
|
attributes(global) subroutine testmulhi(c, a, b)
|
|
integer(4) :: a, b, c
|
|
c = __mulhi(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine testumulhi(c, a, b)
|
|
integer(4) :: a, b, c
|
|
c = __umulhi(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine testmul64hi(c, a, b)
|
|
integer(8) :: a, b, c
|
|
c = __mul64hi(a, b)
|
|
end subroutine
|
|
attributes(global) subroutine testumul64hi(c, a, b)
|
|
integer(8) :: a, b, c
|
|
c = __umul64hi(a, b)
|
|
end subroutine
|
|
|
|
end
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfadd
|
|
! CHECK: fir.call @__fadd_rn
|
|
! CHECK: fir.call @__fadd_rz
|
|
! CHECK: fir.call @__fadd_rd
|
|
! CHECK: fir.call @__fadd_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pdadd
|
|
! CHECK: fir.call @__dadd_rn
|
|
! CHECK: fir.call @__dadd_rz
|
|
! CHECK: fir.call @__dadd_rd
|
|
! CHECK: fir.call @__dadd_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfmul
|
|
! CHECK: fir.call @__fmul_rn
|
|
! CHECK: fir.call @__fmul_rz
|
|
! CHECK: fir.call @__fmul_rd
|
|
! CHECK: fir.call @__fmul_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pdmul
|
|
! CHECK: fir.call @__dmul_rn
|
|
! CHECK: fir.call @__dmul_rz
|
|
! CHECK: fir.call @__dmul_rd
|
|
! CHECK: fir.call @__dmul_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfmaf
|
|
! CHECK: fir.call @__fmaf_rn
|
|
! CHECK: fir.call @__fmaf_rz
|
|
! CHECK: fir.call @__fmaf_rd
|
|
! CHECK: fir.call @__fmaf_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfma
|
|
! CHECK: fir.call @__fma_rn
|
|
! CHECK: fir.call @__fma_rz
|
|
! CHECK: fir.call @__fma_rd
|
|
! CHECK: fir.call @__fma_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfrcp
|
|
! CHECK: fir.call @__frcp_rn
|
|
! CHECK: fir.call @__frcp_rz
|
|
! CHECK: fir.call @__frcp_rd
|
|
! CHECK: fir.call @__frcp_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfsqrt
|
|
! CHECK: fir.call @__fsqrt_rn
|
|
! CHECK: fir.call @__fsqrt_rz
|
|
! CHECK: fir.call @__fsqrt_rd
|
|
! CHECK: fir.call @__fsqrt_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Pfdiv
|
|
! CHECK: fir.call @__fdiv_rn
|
|
! CHECK: fir.call @__fdiv_rz
|
|
! CHECK: fir.call @__fdiv_rd
|
|
! CHECK: fir.call @__fdiv_ru
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestsincosf
|
|
! CHECK: fir.call @__nv_sincosf
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestsincosd
|
|
! CHECK: fir.call @__nv_sincos
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestsincospif
|
|
! CHECK: fir.call @__nv_sincospif
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestsincospid
|
|
! CHECK: fir.call @__nv_sincospi
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestmulhi
|
|
! CHECK: fir.call @__nv_mulhi
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestumulhi
|
|
! CHECK: fir.call @__nv_umulhi
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestmul64hi
|
|
! CHECK: fir.call @__nv_mul64hi
|
|
|
|
! CHECK-LABEL: func.func @_QMmod1Ptestumul64hi
|
|
! CHECK: fir.call @__nv_umul64hi
|