Add OpTraits for operand types: IntegerLike and SameType.
Introduce new OpTraits verifying relation between operands of an Operation, similarly to its results. Arithmetic operations are defined separately for integer and floating point types. While we are currently leveraging the equality of result and operand types to make sure the right arithmetic operations are used for the right types, we may eventually want to verify operand types directly. Furthermore, for upcoming comparison operations, the type of the result differs from those of the operands so we need to verify the operand types directly. Similarly, we will want to restrict comparisons (and potentially binary arithmetic operations) to operands of the same type. PiperOrigin-RevId: 220365629
Loading
Please sign in to comment