Files
TheRock/compiler/amd-llvm/flang/test/Lower/PowerPC/ppc-intrinsics.f90
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

177 lines
4.4 KiB
Fortran

! RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck --check-prefixes="LLVMIR" %s
! REQUIRES: target=powerpc{{.*}}
! CHECK-LABEL: fmadd_testr
subroutine fmadd_testr(a, x, y)
real :: a, x, y, z
z = fmadd(a, x, y)
! LLVMIR: call contract float @llvm.fma.f32(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
end
! CHECK-LABEL: fmadd_testd
subroutine fmadd_testd(a, x, y)
real(8) :: a, x, y, z
z = fmadd(a, x, y)
! LLVMIR: call contract double @llvm.fma.f64(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
end
! CHECK-LABEL: fnmadd_testr
subroutine fnmadd_testr(a, x, y)
real :: a, x, y, z
z = fnmadd(a, x, y)
! LLVMIR: call contract float @llvm.ppc.fnmadds(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
end
! CHECK-LABEL: fnmadd_testd
subroutine fnmadd_testd(a, x, y)
real(8) :: a, x, y, z
z = fnmadd(a, x, y)
! LLVMIR: call contract double @llvm.ppc.fnmadd(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
end
! CHECK-LABEL: fmsub_testr
subroutine fmsub_testr(a, x, y)
real :: a, x, y, z
z = fmsub(a, x, y)
! LLVMIR: call contract float @llvm.ppc.fmsubs(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
end
! CHECK-LABEL: fmsub_testd
subroutine fmsub_testd(a, x, y)
real(8) :: a, x, y, z
z = fmsub(a, x, y)
! LLVMIR: call contract double @llvm.ppc.fmsub(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
end
! CHECK-LABEL: fnmsub_testr
subroutine fnmsub_testr(a, x, y)
real :: a, x, y, z
z = fnmsub(a, x, y)
! LLVMIR: call contract float @llvm.ppc.fnmsub.f32(float %{{[0-9]}}, float %{{[0-9]}}, float %{{[0-9]}})
end
! CHECK-LABEL: fnmsub_testd
subroutine fnmsub_testd(a, x, y)
real(8) :: a, x, y, z
z = fnmsub(a, x, y)
! LLVMIR: call contract double @llvm.ppc.fnmsub.f64(double %{{[0-9]}}, double %{{[0-9]}}, double %{{[0-9]}})
end
! CHECK-LABEL: fctid_test
subroutine fctid_test(x)
real(8) :: x, r
r = fctid(x)
! LLVMIR: call contract double @llvm.ppc.fctid(double %{{[0-9]}})
end
! CHECK-LABEL: fctidz_test
subroutine fctidz_test(x)
real(8) :: x, r
r = fctidz(x)
! LLVMIR: call contract double @llvm.ppc.fctidz(double %{{[0-9]}})
end
! CHECK-LABEL: fctiw_test
subroutine fctiw_test(x)
real(8) :: x, r
r = fctiw(x)
! LLVMIR: call contract double @llvm.ppc.fctiw(double %{{[0-9]}})
end
! CHECK-LABEL: fctiwz_test
subroutine fctiwz_test(x)
real(8) :: x, r
r = fctiwz(x)
! LLVMIR: call contract double @llvm.ppc.fctiwz(double %{{[0-9]}})
end
! CHECK-LABEL: fctudz_test
subroutine fctudz_test(x)
real(8) :: x, r
r = fctudz(x)
! LLVMIR: call contract double @llvm.ppc.fctudz(double %{{[0-9]}})
end
! CHECK-LABEL: fctuwz_test
subroutine fctuwz_test(x)
real(8) :: x, r
r = fctuwz(x)
! LLVMIR: call contract double @llvm.ppc.fctuwz(double %{{[0-9]}})
end
! CHECK-LABEL: fcfi_test
subroutine fcfi_test(i)
real(8) :: i, r
r = fcfi(i)
! LLVMIR: call contract double @llvm.ppc.fcfid(double %{{[0-9]}})
end
! CHECK-LABEL: fcfid_test
subroutine fcfid_test(i)
real(8) :: i, r
r = fcfid(i)
! LLVMIR: call contract double @llvm.ppc.fcfid(double %{{[0-9]}})
end
! CHECK-LABEL: fcfud_test
subroutine fcfud_test(i)
real(8) :: i, r
r = fcfud(i)
! LLVMIR: call contract double @llvm.ppc.fcfud(double %{{[0-9]}})
end
! CHECK-LABEL: fnabs_testr(x)
subroutine fnabs_testr(x)
real :: x, y
y = fnabs(x)
! LLVMIR: call contract float @llvm.ppc.fnabss(float %{{[0-9]}})
end
! CHECK-LABEL: fnabs_testd(x)
subroutine fnabs_testd(x)
real(8) :: x, y
y = fnabs(x)
! LLVMIR: call contract double @llvm.ppc.fnabs(double %{{[0-9]}})
end
!CHECK-LABEL: fre_test(x)
subroutine fre_test(x)
real(8) :: x, y
y = fre(x)
! LLVMIR: call contract double @llvm.ppc.fre(double %{{[0-9]}})
end
!CHECK-LABEL: fres_test(x)
subroutine fres_test(x)
real :: x, y
y = fres(x)
! LLVMIR: call contract float @llvm.ppc.fres(float %{{[0-9]}})
end
!CHECK-LABEL: frsqrte_test(x)
subroutine frsqrte_test(x)
real(8) :: x, y
y = frsqrte(x)
! LLVMIR: call contract double @llvm.ppc.frsqrte(double %{{[0-9]}})
end
!CHECK-LABEL: frsqrtes_test(x)
subroutine frsqrtes_test(x)
real :: x, y
y = frsqrtes(x)
! LLVMIR: call contract float @llvm.ppc.frsqrtes(float %{{[0-9]}})
end
! CHECK-LABEL: mtfsf_test
subroutine mtfsf_test(r)
real(8) :: r
call mtfsf(1, r)
! LLVMIR: call void @llvm.ppc.mtfsf(i32 {{[0-9]}}, double %{{[0-9]}})
end
! CHECK-LABEL: mtfsfi_test
subroutine mtfsfi_test()
call mtfsfi(1, 2)
! LLVMIR: call void @llvm.ppc.mtfsfi(i32 {{[0-9]}}, i32 {{[0-9]}})
end