[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 22 13:28:11 PDT 2025


================
@@ -3013,6 +3013,47 @@ def CIR_ComplexMulOp : CIR_Op<"complex.mul", [
   }];
 }
 
+def CIR_ComplexDivOp : CIR_Op<"complex.div", [
+  Pure, SameOperandsAndResultType
+]> {
+  let summary = "Complex division";
+  let description = [{
+    The `cir.complex.div` operation takes two complex numbers and returns
+    their quotient.
+
+    The `range` attribute is used to select the algorithm used when
+    the operation is lowered to the LLVM dialect. For division, 'improved'
+    producing the Smith's algorithms for Complex division with no special
----------------
AmrDeveloper wrote:

I added a note at the end about that

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


More information about the cfe-commits mailing list