aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-26 14:51:50 +0100
committergingerBill <bill@gingerbill.org>2022-05-26 14:51:50 +0100
commitf308f37ba112ca361715e470d513749236da026d (patch)
tree1dd9053ed9b29b018b04ee244dd07422db1be39f /src/check_expr.cpp
parentc2610cb75ed81d687a4e6962283f498e94773706 (diff)
Remove need for `simd.splat`
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index fcd7818bc..2a3b5bf02 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -2713,6 +2713,14 @@ bool check_is_castable_to(CheckerContext *c, Operand *operand, Type *y) {
return check_is_castable_to(c, &x, elem_dst);
}
+ if (is_type_simd_vector(dst)) {
+ Type *elem = base_array_type(dst);
+ if (check_is_castable_to(c, operand, elem)) {
+ return true;
+ }
+ }
+
+
return false;
}