[flang] Add cpowi function to runtime and use instead of pgmath
authorDavid Truby <david.truby@arm.com>
Mon, 3 Oct 2022 11:01:50 +0000 (11:01 +0000)
committerDavid Truby <David.Truby@arm.com>
Tue, 11 Oct 2022 12:34:58 +0000 (12:34 +0000)
commitd983f5f39ee5f198a622dbf9324c3bca1f0c1989
tree3aca11961228a848848d046fd401241e4b6362ee
parent2a627e2ad1d80b660fcb02dde85b346f61193ade
[flang] Add cpowi function to runtime and use instead of pgmath

This patch adds a cpowi function to the flang runtime, and switches
to using that function instead of pgmath for complex number to
integer power operations.

Differential Revision: https://reviews.llvm.org/D134889
flang/include/flang/Runtime/entry-names.h
flang/lib/Lower/IntrinsicCall.cpp
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
flang/runtime/CMakeLists.txt
flang/runtime/complex-powi.cpp [new file with mode: 0644]
flang/test/Lower/power-operator.f90
flang/unittests/Runtime/CMakeLists.txt
flang/unittests/Runtime/Complex.cpp [new file with mode: 0644]