From f41c91d36b4824606d7b4fe91607c3802fc55446 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 18 Jan 2023 15:41:49 +0000 Subject: Fix #2274 --- src/llvm_backend_expr.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/llvm_backend_expr.cpp') diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp index 1fa4b4809..b1b1ad52a 100644 --- a/src/llvm_backend_expr.cpp +++ b/src/llvm_backend_expr.cpp @@ -509,6 +509,11 @@ gb_internal bool lb_is_matrix_simdable(Type *t) { case TargetArch_arm64: break; } + + if (type_align_of(t) < 16) { + // it's not aligned well enough to use the vector instructions + return false; + } if (elem->kind == Type_Basic) { switch (elem->Basic.kind) { -- cgit v1.2.3