Skip to content

Commit 79a0da3

Browse files
authored
Merge pull request #1301 from Unity-Technologies/valuetype-ref-return-x64jit-fix
Valuetype ref return x64jit fix
2 parents c120dcd + c616275 commit 79a0da3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/mini/method-to-ir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12458,7 +12458,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
1245812458
CHECK_OPSIZE (4);
1245912459
n = read16 (ip + 2);
1246012460
CHECK_LOCAL (n);
12461-
if ((ip [4] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 4) && header->locals [n]->type == MONO_TYPE_VALUETYPE) {
12461+
if ((ip [4] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 4) && MONO_TYPE_ISSTRUCT (header->locals [n])) {
1246212462
/* Avoid loading a struct just to load one of its fields */
1246312463
EMIT_NEW_LOCLOADA (cfg, ins, n);
1246412464
} else {

0 commit comments

Comments
 (0)