From f1d1bd6084771fa039957b7d9193fe4f949b15be Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Mon, 22 Apr 2019 18:03:36 -0400 Subject: [PATCH] [llvmonly] Enable invariant loads from preinited got slots. (#14027) --- mono/mini/mini-llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c index 9c97140686e..cf1f2cea63d 100644 --- a/mono/mini/mini-llvm.c +++ b/mono/mini/mini-llvm.c @@ -5876,7 +5876,7 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb) values [ins->dreg] = LLVMBuildLoad (builder, got_entry_addr, name); g_free (name); /* Can't use this in llvmonly mode since the got slots are initialized by the methods themselves */ - if (!cfg->llvm_only) + if (!cfg->llvm_only || mono_aot_is_shared_got_offset (got_offset)) set_invariant_load_flag (values [ins->dreg]); break; } -- 2.11.4.GIT