From 72405f68af0d7684c3601d0d8b2c63b966022622 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Thu, 12 Sep 2019 20:46:22 +0300 Subject: [PATCH] [interp] Emit more stloc.np (#16796) Use STLOC_NP_O also for MINT_TYPE_P. It has the same behavior. --- mono/mini/interp/transform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mono/mini/interp/transform.c b/mono/mini/interp/transform.c index 52dd7388f11..e036fb2dd04 100644 --- a/mono/mini/interp/transform.c +++ b/mono/mini/interp/transform.c @@ -6298,7 +6298,7 @@ interp_cprop (TransformData *td) if (ins->opcode - MINT_LDLOC_I1 == mt) { if (mt == MINT_TYPE_I4) replace_op = MINT_STLOC_NP_I4; - else if (mt == MINT_TYPE_O) + else if (mt == MINT_TYPE_O || mt == MINT_TYPE_P) replace_op = MINT_STLOC_NP_O; if (replace_op) { if (td->verbose_level) @@ -6306,6 +6306,7 @@ interp_cprop (TransformData *td) interp_clear_ins (td, ins->prev); ins->opcode = replace_op; mono_interp_stats.killed_instructions++; + // FIXME We know what local is on the stack now. Track it } } } -- 2.11.4.GIT