diff options
| author | gingerBill <bill@gingerbill.org> | 2021-10-21 00:04:22 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-10-21 00:04:22 +0100 |
| commit | d67d7168e2d4ed8e0e5f0d1b23aba5e5ebac6847 (patch) | |
| tree | 915285beb2ebeb9a4cdec02ba0992e08435dd3eb /src/llvm_backend_const.cpp | |
| parent | 3b3e7550f62c8f61ac4368d3ed6bf4d385fa9508 (diff) | |
Allow scalars with matrices
Diffstat (limited to 'src/llvm_backend_const.cpp')
| -rw-r--r-- | src/llvm_backend_const.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp index 413fb365b..554255f47 100644 --- a/src/llvm_backend_const.cpp +++ b/src/llvm_backend_const.cpp @@ -527,7 +527,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc i64 total_elem_count = matrix_type_total_elems(type); LLVMValueRef *elems = gb_alloc_array(permanent_allocator(), LLVMValueRef, cast(isize)total_elem_count); for (i64 i = 0; i < row; i++) { - elems[matrix_index_to_offset(type, i)] = single_elem.value; + elems[matrix_indices_to_offset(type, i, i)] = single_elem.value; } for (i64 i = 0; i < total_elem_count; i++) { if (elems[i] == nullptr) { |