diff options
| author | laytan <laytanlaats@hotmail.com> | 2025-11-29 12:14:06 +0100 |
|---|---|---|
| committer | laytan <laytanlaats@hotmail.com> | 2025-11-29 12:14:06 +0100 |
| commit | 4db4841413095645e2319afcafc1db7276259f9d (patch) | |
| tree | 43cc5ebe43ab7e2143d49a58bed759ca7e5f1ec2 /src/llvm_backend_expr.cpp | |
| parent | 31817be087eae5b8025c0dbb4676977bb79e5b36 (diff) | |
fix matrix transpose with different result type
Fixes #5623
Diffstat (limited to 'src/llvm_backend_expr.cpp')
| -rw-r--r-- | src/llvm_backend_expr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp index 187c34595..40b749e1b 100644 --- a/src/llvm_backend_expr.cpp +++ b/src/llvm_backend_expr.cpp @@ -634,7 +634,7 @@ gb_internal LLVMValueRef lb_matrix_to_trimmed_vector(lbProcedure *p, lbValue m) } -gb_internal lbValue lb_emit_matrix_tranpose(lbProcedure *p, lbValue m, Type *type) { +gb_internal lbValue lb_emit_matrix_transpose(lbProcedure *p, lbValue m, Type *type) { if (is_type_array(m.type)) { i32 rank = type_math_rank(m.type); if (rank == 2) { @@ -664,7 +664,7 @@ gb_internal lbValue lb_emit_matrix_tranpose(lbProcedure *p, lbValue m, Type *typ Type *mt = base_type(m.type); GB_ASSERT(mt->kind == Type_Matrix); - if (lb_is_matrix_simdable(mt)) { + if (lb_is_matrix_simdable(mt) && lb_is_matrix_simdable(type)) { unsigned stride = cast(unsigned)matrix_type_stride_in_elems(mt); unsigned row_count = cast(unsigned)mt->Matrix.row_count; unsigned column_count = cast(unsigned)mt->Matrix.column_count; |