Skip to content

Commit

Permalink
Change MAX_STORE_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Jun 30, 2022
1 parent e2bfb02 commit 1676c64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/llvm_backend_general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,9 @@ void lb_emit_store(lbProcedure *p, lbValue ptr, lbValue value) {
GB_ASSERT_MSG(are_types_identical(ca, core_type(value.type)), "%s != %s", type_to_string(a), type_to_string(value.type));
}

enum {MAX_STORE_SIZE = 32};
enum {MAX_STORE_SIZE = 64};

if (LLVMIsALoadInst(value.value) && lb_sizeof(LLVMTypeOf(value.value)) > 32) {
if (LLVMIsALoadInst(value.value) && lb_sizeof(LLVMTypeOf(value.value)) > MAX_STORE_SIZE) {
LLVMValueRef dst_ptr = ptr.value;
LLVMValueRef src_ptr = LLVMGetOperand(value.value, 0);
src_ptr = LLVMBuildPointerCast(p->builder, src_ptr, LLVMTypeOf(dst_ptr), "");
Expand Down

0 comments on commit 1676c64

Please sign in to comment.