diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-04 15:01:31 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-04 15:01:31 +0000 |
| commit | 57eedfc4f4f4dd8ebb0b6b017e6a199e50d37f4c (patch) | |
| tree | ee59b2d377b46e7cd2fc1d27c7ad087e4dc4131b /src/llvm_backend_utility.cpp | |
| parent | 2718ade2bcdf62371b31b80293c379ca0b9661de (diff) | |
Fix `lb_emit_array_epi` for matrix types
Diffstat (limited to 'src/llvm_backend_utility.cpp')
| -rw-r--r-- | src/llvm_backend_utility.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_utility.cpp b/src/llvm_backend_utility.cpp index 1359d93c2..ab50b8c1e 100644 --- a/src/llvm_backend_utility.cpp +++ b/src/llvm_backend_utility.cpp @@ -1168,7 +1168,7 @@ lbValue lb_emit_array_ep(lbProcedure *p, lbValue s, lbValue index) { Type *t = s.type; GB_ASSERT_MSG(is_type_pointer(t), "%s", type_to_string(t)); Type *st = base_type(type_deref(t)); - GB_ASSERT_MSG(is_type_array(st) || is_type_enumerated_array(st), "%s", type_to_string(st)); + GB_ASSERT_MSG(is_type_array(st) || is_type_enumerated_array(st) || is_type_matrix(st), "%s", type_to_string(st)); GB_ASSERT_MSG(is_type_integer(core_type(index.type)), "%s", type_to_string(index.type)); LLVMValueRef indices[2] = {}; @@ -1186,7 +1186,7 @@ lbValue lb_emit_array_epi(lbProcedure *p, lbValue s, isize index) { Type *t = s.type; GB_ASSERT(is_type_pointer(t)); Type *st = base_type(type_deref(t)); - GB_ASSERT_MSG(is_type_array(st) || is_type_enumerated_array(st), "%s", type_to_string(st)); + GB_ASSERT_MSG(is_type_array(st) || is_type_enumerated_array(st) || is_type_matrix(st), "%s", type_to_string(st)); GB_ASSERT(0 <= index); Type *ptr = base_array_type(st); |