[clang] [CIR] Split cir.binop into separate per-operation binary ops (PR #184227)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 09:02:57 PST 2026


================
@@ -331,6 +336,19 @@ def CIR_AnyFloatOrVecOfFloatType
     let cppFunctionName = "isFPOrVectorOfFPType";
 }
 
+// Types valid for arithmetic ops (add/sub/mul/div/rem):
+// scalar or vector of integer, boolean, or floating-point.
+def CIR_AnyArithType
+    : AnyTypeOf<[CIR_AnyIntType, CIR_AnyBoolType, CIR_AnyFloatType,
+                 CIR_VectorOfIntType, CIR_VectorOfFloatType],
+                "integer, boolean, floating-point, or vector of integer/float">;
+
+// Types valid for bitwise ops (and/or/xor):
+// integer, boolean, or vector of integer (no floating-point).
+def CIR_AnyBitwiseType
+    : AnyTypeOf<[CIR_AnyIntType, CIR_AnyBoolType, CIR_VectorOfIntType],
----------------
andykaylor wrote:

Should this also include vector of bool?

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


More information about the cfe-commits mailing list