================
@@ -184,6 +184,26 @@ def LoweringPrepare : Pass<"cir-lowering-prepare"> {
let dependentDialects = ["cir::CIRDialect"];
}
+def ComplexLowering : Pass<"cir-complex-lowering", "mlir::ModuleOp"> {
+ let summary = "Expand complex multiplication and division";
+ let description = [{
+ This pass replaces `cir.complex.mul` and `cir.complex.div` with the
+ arithmetic each one expands to, which for the full complex range is a call
+ to a runtime helper such as `__mulsc3` or `__divsc3`.
+
+ It runs before the calling-convention pass rather than alongside the rest
----------------
andykaylor wrote:
```suggestion
It must be run before the calling-convention pass rather than alongside the
rest
```
https://github.com/llvm/llvm-project/pull/216498
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits