From cfef365c9f8a5287f6b867bbf7412d121cb5d1cb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 19 May 2026 14:53:50 +0100 Subject: [PATCH] Add another suggestion of `#simd` shifting --- src/check_expr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index ee9dd054d..bb7a181df 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3319,6 +3319,10 @@ gb_internal void check_shift(CheckerContext *c, Operand *x, Operand *y, Ast *nod if (y_is_untyped) { convert_to_typed(c, y, t_untyped_integer); if (y->mode == Addressing_Invalid) { + if (is_type_simd_vector(x->type)) { + char const *s = be->op.kind == Token_Shl ? "shl" : "shr"; + error_line("\tSuggestion: Use 'simd.%s' or 'simd.%s_masked'\n", s, s); + } x->mode = Addressing_Invalid; return; }