[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 31 10:15:35 PDT 2025
================
@@ -2823,6 +2823,49 @@ def CIR_ComplexSubOp : CIR_Op<"complex.sub", [
}];
}
+//===----------------------------------------------------------------------===//
+// ComplexMulOp
+//===----------------------------------------------------------------------===//
+
+def CIR_ComplexRangeKind : CIR_I32EnumAttr<
+ "ComplexRangeKind", "complex multiplication and division implementation", [
+ I32EnumAttrCase<"Full", 0, "full">,
+ I32EnumAttrCase<"Improved", 1, "improved">,
+ I32EnumAttrCase<"Promoted", 2, "promoted">,
+ I32EnumAttrCase<"Basic", 3, "basic">,
+]>;
+
+def CIR_ComplexMulOp : CIR_Op<"complex.mul", [
+ Pure, SameOperandsAndResultType
+]> {
+ let summary = "Complex multiplication";
+ let description = [{
+ The `cir.complex.mul` operation takes two complex numbers and returns
+ their product.
+
+ Range is used to controls the various implementations for complex
----------------
AmrDeveloper wrote:
Thank you for writing this :D
https://github.com/llvm/llvm-project/pull/150834
More information about the cfe-commits
mailing list