================
@@ -858,6 +853,21 @@ mlir::Value ComplexExprEmitter::emitBinMul(const BinOpInfo
&op) {
return builder.createComplexCreate(op.loc, newReal, newImag);
}
+mlir::Value ComplexExprEmitter::emitBinDiv(const BinOpInfo &op) {
+ assert(!cir::MissingFeatures::fastMathFlags());
+ assert(!cir::MissingFeatures::cgFPOptionsRAII());
+
+ if (mlir::isa<cir::ComplexType>(op.lhs.getType()) &&
+ mlir::isa<cir::ComplexType>(op.rhs.getType())) {
+ cir::ComplexRangeKind rangeKind =
+ getComplexRangeAttr(op.fpFeatures.getComplexRange());
+ return builder.create<cir::ComplexDivOp>(op.loc, op.lhs, op.rhs,
rangeKind);
+ }
+
+ cgf.cgm.errorNYI("ComplexExprEmitter::emitBinMu between Complex & Scalar");
----------------
xlauko wrote:
```suggestion
cgf.cgm.errorNYI("ComplexExprEmitter::emitBinDiv between Complex & Scalar");
```
https://github.com/llvm/llvm-project/pull/153796
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits