[flang-commits] [flang] [mlir] [MLIR] Add cpow support in ComplexToROCDLLibraryCalls (PR #153183)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Mon Aug 18 09:21:21 PDT 2025


================
@@ -1625,15 +1655,19 @@ static constexpr MathOperation mathOperations[] = {
      genFuncType<Ty::Real<16>, Ty::Real<16>, Ty::Integer<8>>,
      genMathOp<mlir::math::FPowIOp>},
     {"pow", RTNAME_STRING(cpowi),
-     genFuncType<Ty::Complex<4>, Ty::Complex<4>, Ty::Integer<4>>, genLibCall},
+     genFuncType<Ty::Complex<4>, Ty::Complex<4>, Ty::Integer<4>>,
+     genComplexPow},
----------------
TIFitis wrote:

Sorry, but I don't understand the change. Currently @_FortranAcpowi calls are generated for all cases, and this PR adds lowering to complex.pow op for amdgpu device pass. The complex.pow gets later converted to ocml calls. Can you please clarify what you are suggesting instead?

Thanks.

https://github.com/llvm/llvm-project/pull/153183


More information about the flang-commits mailing list