diff options
| author | gingerBill <bill@gingerbill.org> | 2022-01-15 15:55:01 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-01-15 15:55:01 +0000 |
| commit | a390ef41f803587ebdf404cd0f10c19a0a651994 (patch) | |
| tree | d30700226630a1f21c28fe6996c3be6229fb9caa /src/llvm_backend_stmt.cpp | |
| parent | bb9c2f7aadb50b006cf25329015830d45e7f8cad (diff) | |
Fix swizzle logic within `lb_build_assign_stmt_array`
Diffstat (limited to 'src/llvm_backend_stmt.cpp')
| -rw-r--r-- | src/llvm_backend_stmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp index 20b444058..04e7e0d03 100644 --- a/src/llvm_backend_stmt.cpp +++ b/src/llvm_backend_stmt.cpp @@ -1766,6 +1766,8 @@ void lb_build_for_stmt(lbProcedure *p, Ast *node) { } void lb_build_assign_stmt_array(lbProcedure *p, TokenKind op, lbAddr const &lhs, lbValue const &value) { + GB_ASSERT(op != Token_Eq); + Type *lhs_type = lb_addr_type(lhs); Type *array_type = base_type(lhs_type); GB_ASSERT(is_type_array_like(array_type)); @@ -1795,7 +1797,6 @@ void lb_build_assign_stmt_array(lbProcedure *p, TokenKind op, lbAddr const &lhs, } indices[index_count++] = index; } - gb_sort_array(indices, index_count, gb_i32_cmp(0)); lbValue lhs_ptrs[4] = {}; lbValue x_loads[4] = {}; @@ -1840,7 +1841,6 @@ void lb_build_assign_stmt_array(lbProcedure *p, TokenKind op, lbAddr const &lhs, } indices[index_count++] = index; } - gb_sort_array(indices.data, index_count, gb_i32_cmp(0)); lbValue lhs_ptrs[4] = {}; lbValue x_loads[4] = {}; |