diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2025-11-29 20:06:43 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2025-11-29 20:06:43 +0100 |
| commit | 679d306d0ff0ff9ac451a23ee50d7e44807d5aa6 (patch) | |
| tree | d9a421a31dc1f6ee54e21e23ed4669161da9d5c4 | |
| parent | 5db9afd73b8f54ca38f154ce299dd0256e46f33e (diff) | |
panic on transpose with result type in diff layout
Partially reverts 4db4841, it should behave the same as cast (which does
an implicit transpose).
| -rw-r--r-- | src/llvm_backend_expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp index 40b749e1b..d5658b9d5 100644 --- a/src/llvm_backend_expr.cpp +++ b/src/llvm_backend_expr.cpp @@ -664,6 +664,11 @@ gb_internal lbValue lb_emit_matrix_transpose(lbProcedure *p, lbValue m, Type *ty Type *mt = base_type(m.type); GB_ASSERT(mt->kind == Type_Matrix); + Type *rt = base_type(type); + if (rt->kind == Type_Matrix && rt->Matrix.is_row_major != mt->Matrix.is_row_major) { + GB_PANIC("TODO: transpose with changing layout"); + } + 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; |