From 8744ac2de464d76bbf103d262450e998c879b506 Mon Sep 17 00:00:00 2001 From: TL Date: Sun, 8 Oct 2023 12:59:52 +0800 Subject: [PATCH] some update --- core/iwasm/compilation/aot_emit_gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/iwasm/compilation/aot_emit_gc.c b/core/iwasm/compilation/aot_emit_gc.c index cf3181ee54..6440599c09 100644 --- a/core/iwasm/compilation/aot_emit_gc.c +++ b/core/iwasm/compilation/aot_emit_gc.c @@ -1501,7 +1501,7 @@ aot_compile_op_i31_get(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, /* if uintptr_t is 64 bits, trunc i64 to i32 */ if (comp_ctx->pointer_size == sizeof(uint64)) { - if (!(i31_obj = LLVMBuildTrunc(comp_ctx->builder, i31_obj, I32_TYPE, + if (!(i31_val = LLVMBuildTrunc(comp_ctx->builder, i31_obj, I32_TYPE, "trunc uintptr_t to i32"))) { aot_set_last_error("llvm build trunc failed."); goto fail; @@ -1512,7 +1512,7 @@ aot_compile_op_i31_get(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, } /* i31_val = i31_val >> 1 */ - if (!(i31_val = LLVMBuildLShr(comp_ctx->builder, i31_obj, I32_ONE, + if (!(i31_val = LLVMBuildLShr(comp_ctx->builder, i31_val, I32_ONE, "i31_value"))) { aot_set_last_error("llvm build lshr failed."); goto fail;