[llvm] [flang][rt] Attempt to support some complex pow on the device (PR #135741)
Slava Zakharin via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 14:10:08 PDT 2025
================
@@ -65,21 +66,23 @@ template <typename C, typename I> C tgpowi(C base, I exp) {
#ifndef _MSC_VER
// With most compilers, C complex is implemented as a builtin type that may have
// specific ABI requirements
-extern "C" float _Complex RTNAME(cpowi)(float _Complex base, std::int32_t exp) {
+extern "C" RT_API_ATTRS CppTypeFor<TypeCategory::Complex, 4> RTNAME(cpowi)(
+ CppTypeFor<TypeCategory::Complex, 4> base, std::int32_t exp) {
----------------
vzakhari wrote:
Sorry, I do not know where we stand with passing the complex values from Flang to the runtime, but the C complex was used here to match the ABI of pure C complex. The discussion was here: https://reviews.llvm.org/D134889
This change may be unsafe, but this needs to be investigated.
https://github.com/llvm/llvm-project/pull/135741
More information about the llvm-commits
mailing list