[flang] Use libm over pgmath for complex number intrinsics
authorDavid Truby <David.Truby@arm.com>
Mon, 26 Sep 2022 13:30:20 +0000 (13:30 +0000)
committerDavid Truby <David.Truby@arm.com>
Wed, 28 Sep 2022 13:25:10 +0000 (13:25 +0000)
commit8bd54409b15f45a757fe82ce0872234234a35c9b
tree066beaacb105751fdb3e6666c97e5f96d329f6fd
parent5ccadb48c91488a55bea6e99e7129b8b02209e1a
[flang] Use libm over pgmath for complex number intrinsics

This patch changes the handling of complex number intrinsics that
have C libm equivalents to call into those instead of calling the
external pgmath library.

Currently complex numbers to integer powers are excluded as libm
has no powi equivalent function.

Differential Revision: https://reviews.llvm.org/D134655
14 files changed:
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/abs.f90
flang/test/Lower/Intrinsics/acos.f90
flang/test/Lower/Intrinsics/acosh.f90
flang/test/Lower/Intrinsics/asin.f90
flang/test/Lower/Intrinsics/asinh.f90
flang/test/Lower/Intrinsics/atanh.f90
flang/test/Lower/Intrinsics/exp.f90
flang/test/Lower/Intrinsics/log.f90
flang/test/Lower/Intrinsics/missing-math-runtime.f90
flang/test/Lower/math-lowering.f90
flang/test/Lower/power-operator.f90
flang/test/Lower/sqrt.f90
flang/test/Lower/trigonometric-intrinsics.f90