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

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Thu Aug 14 04:43:26 PDT 2025


================
@@ -110,9 +167,10 @@ void ConvertComplexToROCDLLibraryCallsPass::runOnOperation() {
 
   ConversionTarget target(getContext());
   target.addLegalDialect<func::FuncDialect>();
+  target.addLegalOp<complex::MulOp>();
----------------
TIFitis wrote:

Why so? I am only seeing it as an MLIR conversion requirement to explicitly register any new op that the pass may introduce to make sure we aren't unintentionally introducing illegal ops. The `complex.mul` gets lowered to `llvm.fmul` eventually and thus doesn't need any other special handling.

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


More information about the flang-commits mailing list