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

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Tue Aug 19 08:19:09 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:

I think the optimisation has deviated the PR too far. The original motivation of this PR is only to add support for cpow lowering on AMDGPU.

I've reverted the PR to an older revision which was already accepted by @krzysz00 , and dropped the optimisation entirely.

I'll start a separate PR soon for the Flang lowering changes along with the optimisation.

Please let me know if you would like to see any changes to this PR before I merge it.

Thanks.

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


More information about the flang-commits mailing list