[mono][wasm] Avoid saving the result of OP_AOTCONST into the gc pin area, its not...
authorZoltan Varga <vargaz@gmail.com>
Thu, 26 Jan 2023 19:55:58 +0000 (14:55 -0500)
committerGitHub <noreply@github.com>
Thu, 26 Jan 2023 19:55:58 +0000 (14:55 -0500)
src/mono/mono/mini/mini-llvm.c

index 7b37e1afb1c0a832aa324ad81d62f5b164d5680a..db3be333c02167e2b2516e0f5ce2ad0be89b5c28 100644 (file)
@@ -11561,7 +11561,7 @@ MONO_RESTORE_WARNING
                                emit_volatile_store (ctx, ins->dreg);
 #ifdef TARGET_WASM
                        //if (vreg_is_ref (cfg, ins->dreg) && ctx->values [ins->dreg])
-                       if (vreg_is_ref (cfg, ins->dreg) && ctx->values [ins->dreg] && ins->opcode != OP_MOVE)
+                       if (vreg_is_ref (cfg, ins->dreg) && ctx->values [ins->dreg] && ins->opcode != OP_MOVE && ins->opcode != OP_AOTCONST)
                                emit_gc_pin (ctx, builder, ins->dreg);
 #endif
                }