2 Commits

Author SHA1 Message Date
Akash Banerjee
fdb1f48638
[MLIR] Add new complex.powi op (#158722)
This PR adds a new complex.powi operation to MLIR's complex dialect for
computing complex numbers raised to integer powers.

Key changes include:

- Addition of the new `PowiOp` operation definition in the Complex
dialect
- Integration with algebraic simplification passes for optimization
- Support for conversion to ROCDL library calls
- Updates to Flang frontend to generate the new operation

This depends on #158642.
2025-09-19 01:36:13 +00:00
Akash Banerjee
54677d66c4
[Flang] Add new ConvertComplexPow pass for Flang (#158642)
This PR introduces a new `ConvertComplexPow` pass for Flang that handles
complex power operations. The change forces lowering to complex.pow
operations when `--math-runtime=precise` is not used, then uses the
`ConvertComplexPow` pass to convert these operations back to library
calls.

- Adds a new `ConvertComplexPow` pass that converts complex.pow ops to
appropriate runtime library calls
- Updates complex power lowering to use `complex.pow` operations by
default instead of direct library calls

#158722 Adds a new `complex.powi` op enabling algebraic optimisations.
2025-09-19 01:51:10 +01:00