Remove simd_rem; Disallow simd_div for integers

This commit is contained in:
gingerBill
2022-06-02 12:10:43 +01:00
parent ba5f7c4e2a
commit bb7f291f5f
4 changed files with 15 additions and 6 deletions

View File

@@ -1618,6 +1618,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) {
if (is_type_matrix(main_type)) {
error(op, "Operator '%.*s' is only allowed with matrix types", LIT(op.string));
return false;
} else if (is_type_simd_vector(main_type) && is_type_integer(type)) {
error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string));
return false;
}
/*fallthrough*/
case Token_Mul:
@@ -1669,6 +1672,9 @@ bool check_binary_op(CheckerContext *c, Operand *o, Token op) {
if (!is_type_integer(type)) {
error(op, "Operator '%.*s' is only allowed with integers", LIT(op.string));
return false;
} else if (is_type_simd_vector(main_type)) {
error(op, "Operator '%.*s' is only allowed with #simd types with integer elements", LIT(op.string));
return false;
}
break;