[flang-commits] [flang] [flang][AIX] Handle more trig functions with complex argument to have consistent results in folding (PR #124203)
Kelvin Li via flang-commits
flang-commits at lists.llvm.org
Sat Jan 25 21:12:30 PST 2025
================
@@ -304,48 +332,145 @@ template <typename T, typename TA> static std::complex<T> CToCpp(const TA &x) {
TA &z{const_cast<TA &>(x)};
return std::complex<T>(reIm<T, TA>(z, CRI::Real), reIm<T, TA>(z, CRI::Imag));
}
+
+using FTypeCmplxFlt = _Complex float (*)(_Complex float);
+using FTypeCmplxDble = _Complex double (*)(_Complex double);
+template <typename T>
+using FTypeStdCmplx = std::complex<T> (*)(const std::complex<T> &);
+
+std::map<trigFunc, std::tuple<FTypeCmplxFlt, FTypeCmplxDble>> mapLibmTrigFunc{
----------------
kkwli wrote:
@jeanPerier Thanks for the suggestion. I implemented your suggestion. Please take a look.
https://github.com/llvm/llvm-project/pull/124203
More information about the flang-commits
mailing list