From ae4c82babd3ca33e9eb75a051fc87b74ed26adfc Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 11 Apr 2023 22:00:32 -0400 Subject: [PATCH] [mono][jit] Intrinsify more calls to Type:op_Equality (). (#84653) Re: https://github.com/dotnet/perf-autofiling-issues/issues/15660. --- src/mono/mono/mini/intrinsics.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index e003caf4d24f3..0e26a92ffc3d4 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -796,6 +796,10 @@ get_rttype_ins_relation (MonoCompile *cfg, MonoInst *ins1, MonoInst *ins2, gbool } } else if (MONO_TYPE_IS_PRIMITIVE (t1) && MONO_TYPE_IS_PRIMITIVE (t2)) { rel = t1->type == t2->type ? CMP_EQ : CMP_NE; + } else if (MONO_TYPE_IS_PRIMITIVE (t1) && MONO_TYPE_ISSTRUCT (t2)) { + rel = CMP_NE; + } else if (MONO_TYPE_IS_PRIMITIVE (t2) && MONO_TYPE_ISSTRUCT (t1)) { + rel = CMP_NE; } } return rel;