[all-commits] [llvm/llvm-project] d69ccd: [MLIR] Add cpow support in ComplexToROCDLLibraryCa...

Akash Banerjee via All-commits all-commits at lists.llvm.org
Wed Aug 20 10:18:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d69ccded4ff14644245990e4ecc4f96e9610dd3d
      https://github.com/llvm/llvm-project/commit/d69ccded4ff14644245990e4ecc4f96e9610dd3d
  Author: Akash Banerjee <akash.banerjee at amd.com>
  Date:   2025-08-20 (Wed, 20 Aug 2025)

  Changed paths:
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/test/Lower/amdgcn-complex.f90
    M mlir/lib/Conversion/ComplexToROCDLLibraryCalls/ComplexToROCDLLibraryCalls.cpp
    M mlir/test/Conversion/ComplexToROCDLLibraryCalls/complex-to-rocdl-library-calls.mlir

  Log Message:
  -----------
  [MLIR] Add cpow support in ComplexToROCDLLibraryCalls (#153183)

This PR adds support for complex power operations (`cpow`) in the
`ComplexToROCDLLibraryCalls` conversion pass, specifically targeting
AMDGPU architectures. The implementation optimises complex
exponentiation by using mathematical identities and special-case
handling for small integer powers.

- Force lowering to `complex.pow` operations for the `amdgcn-amd-amdhsa`
target instead of using library calls
- Convert `complex.pow(z, w)` to `complex.exp(w * complex.log(z))` using
mathematical identity



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list