gingerBill 2 years ago
parent
commit
f41c91d36b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/llvm_backend_expr.cpp

+ 5 - 0
src/llvm_backend_expr.cpp

@@ -509,6 +509,11 @@ gb_internal bool lb_is_matrix_simdable(Type *t) {
 	case TargetArch_arm64:
 	case TargetArch_arm64:
 		break;
 		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) {
 	if (elem->kind == Type_Basic) {
 		switch (elem->Basic.kind) {
 		switch (elem->Basic.kind) {