aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-26 17:09:46 +0100
committergingerBill <bill@gingerbill.org>2022-05-26 17:09:46 +0100
commitd0e8a735bae52eaa7d1d852953da721071571020 (patch)
tree76d4fdf971f7a8a4f85992e228c01b53a8b92fbe /src/check_expr.cpp
parent208226dba29d46514c8c2b7a8fcd023f1ebf7bd8 (diff)
Add arithmetic operator support for simd vectors; Add `intrinsics.simd_and_not`
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index b7568aa70..7fe9b8acf 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -1590,11 +1590,6 @@ bool check_unary_op(CheckerContext *c, Operand *o, Token op) {
bool check_binary_op(CheckerContext *c, Operand *o, Token op) {
Type *main_type = o->type;
- if (is_type_simd_vector(main_type)) {
- error(op, "Operator '%.*s' is not supported on #simd vector types, please use the intrinsics.simd_*", LIT(op.string));
- return false;
- }
-
// TODO(bill): Handle errors correctly
Type *type = base_type(core_array_type(main_type));
Type *ct = core_type(type);
@@ -2500,6 +2495,8 @@ void check_shift(CheckerContext *c, Operand *x, Operand *y, Ast *node, Type *typ
gb_string_free(err_str);
}
+ // TODO(bill): Should we support shifts for fixed arrays and #simd vectors?
+
if (!is_type_integer(x->type)) {
gbString err_str = expr_to_string(y->expr);
error(node, "Shift operand '%s' must be an integer", err_str);