Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MichalPetryka] Unify Default Comparer logic #75

Open
MihuBot opened this issue Jul 4, 2023 · 3 comments
Open

[MichalPetryka] Unify Default Comparer logic #75

MihuBot opened this issue Jul 4, 2023 · 3 comments

Comments

@MihuBot
Copy link
Owner

MihuBot commented Jul 4, 2023

Build completed in 1 hour 40 minutes.
dotnet/runtime#88006

CoreLib diffs

Found 2 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 6956349
Total bytes of diff: 6955963
Total bytes of delta: -386 (-0.01 % of base)
Total relative delta: -0.04
    diff is an improvement.
    relative diff is an improvement.


Total byte diff includes -366 bytes from reconciling methods
	Base had    2 unique methods,      366 unique bytes
	Diff had    0 unique methods,        0 unique bytes

Top file improvements (bytes):
        -386 : System.Private.CoreLib.dasm (-0.01 % of base)

1 total files with Code Size differences (1 improved, 0 regressed), 0 unchanged.

Top method regressions (bytes):
          10 (2.39 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
           2 (0.47 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)

Top method improvements (bytes):
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
         -24 (-4.79 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
          -4 (-0.90 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)
          -4 (-0.93 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)

Top method regressions (percentages):
          10 (2.39 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
           2 (0.47 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)

Top method improvements (percentages):
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
         -24 (-4.79 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
          -4 (-0.93 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)
          -4 (-0.90 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)

7 total methods with Code Size differences (5 improved, 2 regressed), 52388 unchanged.

--------------------------------------------------------------------------------

Frameworks diffs

Diffs
Found 377 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 38344310
Total bytes of diff: 38344134
Total bytes of delta: -176 (-0.00 % of base)
Total relative delta: 1.08
    diff is an improvement.
    relative diff is a regression.


Total byte diff includes -366 bytes from reconciling methods
	Base had    2 unique methods,      366 unique bytes
	Diff had    0 unique methods,        0 unique bytes

Top file regressions (bytes):
         117 : Microsoft.NET.WebAssembly.Webcil.dasm (0.48 % of base)
          39 : System.Text.RegularExpressions.dasm (0.01 % of base)
          22 : System.Collections.Concurrent.dasm (0.01 % of base)
          22 : System.Collections.Immutable.dasm (0.00 % of base)
           8 : System.Text.Json.dasm (0.00 % of base)
           2 : System.Collections.dasm (0.00 % of base)

Top file improvements (bytes):
        -386 : System.Private.CoreLib.dasm (-0.01 % of base)

7 total files with Code Size differences (1 improved, 6 regressed), 249 unchanged.

Top method regressions (bytes):
          60 (23.26 % of base) : Microsoft.NET.WebAssembly.Webcil.dasm - Microsoft.NET.WebAssembly.Webcil.WebcilConverter+PEFileInfo:GetHashCode():int:this (FullOpts)
          57 (20.07 % of base) : Microsoft.NET.WebAssembly.Webcil.dasm - Microsoft.NET.WebAssembly.Webcil.WebcilConverter+WCFileInfo:GetHashCode():int:this (FullOpts)
          20 (14.49 % of base) : System.Text.RegularExpressions.dasm - System.Text.RegularExpressions.CaptureCollection:System.Collections.Generic.IList<System.Text.RegularExpressions.Capture>.IndexOf(System.Text.RegularExpressions.Capture):int:this (FullOpts)
          19 (12.75 % of base) : System.Collections.Immutable.dasm - System.Collections.Frozen.ValueTypeDefaultComparerFrozenDictionary`2[ubyte,System.Nullable`1[int]]:GetValueRefOrNullRefCore(ubyte):byref:this (FullOpts)
          19 (13.77 % of base) : System.Collections.Immutable.dasm - System.Collections.Frozen.ValueTypeDefaultComparerFrozenSet`1[ubyte]:FindItemIndex(ubyte):int:this (FullOpts)
          19 (12.34 % of base) : System.Text.RegularExpressions.dasm - System.Text.RegularExpressions.GroupCollection:System.Collections.Generic.IList<System.Text.RegularExpressions.Group>.IndexOf(System.Text.RegularExpressions.Group):int:this (FullOpts)
          11 (1.42 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryRemoveInternal(ubyte,byref,bool,System.Nullable`1[int]):bool:this (FullOpts)
          10 (2.39 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
           8 (17.02 % of base) : System.Text.Json.dasm - System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1[ubyte]:<ConfigureIgnoreCondition>g__ShouldSerializeIgnoreWhenWritingDefault|31_2(System.Object,ubyte):bool (FullOpts)
           6 (0.79 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryUpdateInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[ubyte,System.Nullable`1[int]],ubyte,System.Nullable`1[int],System.Nullable`1[int],System.Nullable`1[int]):bool:this (FullOpts)
           3 (0.30 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[ubyte,System.Nullable`1[int]],ubyte,System.Nullable`1[int],System.Nullable`1[int],bool,bool,byref):bool:this (FullOpts)
           2 (4.17 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:NodeEqualsKey(System.Collections.Generic.IEqualityComparer`1[ubyte],System.Collections.Concurrent.ConcurrentDictionary`2+Node[ubyte,System.Nullable`1[int]],ubyte):bool (FullOpts)
           2 (0.47 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)
           2 (0.98 % of base) : System.Collections.dasm - System.Collections.StructuralComparer:Compare(System.Object,System.Object):int:this (FullOpts)

Top method improvements (bytes):
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
         -24 (-4.79 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
          -9 (-4.37 % of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableList`1[ubyte]:System.Collections.IList.Contains(System.Object):bool:this (FullOpts)
          -7 (-5.56 % of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableList`1[ubyte]:Contains(ubyte):bool:this (FullOpts)
          -4 (-0.90 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)
          -4 (-0.93 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)

Top method regressions (percentages):
          60 (23.26 % of base) : Microsoft.NET.WebAssembly.Webcil.dasm - Microsoft.NET.WebAssembly.Webcil.WebcilConverter+PEFileInfo:GetHashCode():int:this (FullOpts)
          57 (20.07 % of base) : Microsoft.NET.WebAssembly.Webcil.dasm - Microsoft.NET.WebAssembly.Webcil.WebcilConverter+WCFileInfo:GetHashCode():int:this (FullOpts)
           8 (17.02 % of base) : System.Text.Json.dasm - System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1[ubyte]:<ConfigureIgnoreCondition>g__ShouldSerializeIgnoreWhenWritingDefault|31_2(System.Object,ubyte):bool (FullOpts)
          20 (14.49 % of base) : System.Text.RegularExpressions.dasm - System.Text.RegularExpressions.CaptureCollection:System.Collections.Generic.IList<System.Text.RegularExpressions.Capture>.IndexOf(System.Text.RegularExpressions.Capture):int:this (FullOpts)
          19 (13.77 % of base) : System.Collections.Immutable.dasm - System.Collections.Frozen.ValueTypeDefaultComparerFrozenSet`1[ubyte]:FindItemIndex(ubyte):int:this (FullOpts)
          19 (12.75 % of base) : System.Collections.Immutable.dasm - System.Collections.Frozen.ValueTypeDefaultComparerFrozenDictionary`2[ubyte,System.Nullable`1[int]]:GetValueRefOrNullRefCore(ubyte):byref:this (FullOpts)
          19 (12.34 % of base) : System.Text.RegularExpressions.dasm - System.Text.RegularExpressions.GroupCollection:System.Collections.Generic.IList<System.Text.RegularExpressions.Group>.IndexOf(System.Text.RegularExpressions.Group):int:this (FullOpts)
           2 (4.17 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:NodeEqualsKey(System.Collections.Generic.IEqualityComparer`1[ubyte],System.Collections.Concurrent.ConcurrentDictionary`2+Node[ubyte,System.Nullable`1[int]],ubyte):bool (FullOpts)
          10 (2.39 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
          11 (1.42 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryRemoveInternal(ubyte,byref,bool,System.Nullable`1[int]):bool:this (FullOpts)
           2 (0.98 % of base) : System.Collections.dasm - System.Collections.StructuralComparer:Compare(System.Object,System.Object):int:this (FullOpts)
           6 (0.79 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryUpdateInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[ubyte,System.Nullable`1[int]],ubyte,System.Nullable`1[int],System.Nullable`1[int],System.Nullable`1[int]):bool:this (FullOpts)
           2 (0.47 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)
           3 (0.30 % of base) : System.Collections.Concurrent.dasm - System.Collections.Concurrent.ConcurrentDictionary`2[ubyte,System.Nullable`1[int]]:TryAddInternal(System.Collections.Concurrent.ConcurrentDictionary`2+Tables[ubyte,System.Nullable`1[int]],ubyte,System.Nullable`1[int],System.Nullable`1[int],bool,bool,byref):bool:this (FullOpts)

Top method improvements (percentages):
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
        -183 (-100.00 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts) (1 base, 0 diff methods)
          -7 (-5.56 % of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableList`1[ubyte]:Contains(ubyte):bool:this (FullOpts)
         -24 (-4.79 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
          -9 (-4.37 % of base) : System.Collections.Immutable.dasm - System.Collections.Immutable.ImmutableList`1[ubyte]:System.Collections.IList.Contains(System.Object):bool:this (FullOpts)
          -4 (-0.93 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)
          -4 (-0.90 % of base) : System.Private.CoreLib.dasm - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)

21 total methods with Code Size differences (7 improved, 14 regressed), 232924 unchanged.

--------------------------------------------------------------------------------

Artifacts:

@MihuBot
Copy link
Owner Author

MihuBot commented Jul 5, 2023

Top method regressions

10 (2.39 % of base) - System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object
 ; Assembly listing for method System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; Final local variable assignments
 ;
 ;  V00 arg0         [V00,T01] (  5,  4   )     ref  ->  rbx         class-hnd single-def
 ;  V01 loc0         [V01,T05] (  5,  3.50)     ref  ->  r15         class-hnd
 ;  V02 loc1         [V02,T00] ( 13,  8   )     ref  ->  rbx         class-hnd single-def
 ;* V03 loc2         [V03    ] (  0,  0   )     ref  ->  zero-ref    class-hnd
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;  V05 tmp1         [V05,T11] (  3,  1   )    long  ->  rax         "fgMakeTemp is creating a new local variable"
 ;  V06 tmp2         [V06,T04] (  3,  4.50)     ref  ->  rdi         class-hnd "spilling QMark2"
 ;  V07 tmp3         [V07,T02] (  3,  6   )     ref  ->  r14         class-hnd exact single-def "dup spill"
 ;* V08 tmp4         [V08    ] (  0,  0   )     ref  ->  zero-ref    class-hnd single-def "impAppendStmt"
 ;  V09 tmp5         [V09,T08] (  3,  2.50)     ref  ->  rax         single-def
 ;  V10 tmp6         [V10,T09] (  3,  2   )     ref  ->  rsi         single-def "CASTCLASS eval op1"
 ;  V11 tmp7         [V11,T12] (  3,  1   )    long  ->  rax         "fgMakeTemp is creating a new local variable"
 ;  V12 tmp8         [V12,T06] (  4,  3.50)     ref  ->  rdi         class-hnd "spilling QMark2"
 ;  V13 tmp9         [V13,T03] (  3,  6   )     ref  ->  rax         single-def "argument with side effect"
 ;  V14 tmp10        [V14,T07] (  3,  3   )     ref  ->  rax         single-def "arr expr"
 ;  V15 cse0         [V15,T10] (  3,  1.50)    long  ->  r14         "CSE - moderate"
 ;
 ; Lcl frame size = 8
 
 G_M61907_IG01:
        push     rbp
        push     r15
        push     r14
        push     rbx
        push     rax
        lea      rbp, [rsp+20H]
        mov      rbx, rdi
 						;; size=15 bbWeight=1 PerfScore 5.75
 G_M61907_IG02:
        xor      r15, r15
        mov      rdi, rbx
        test     rdi, rdi
        je       SHORT G_M61907_IG04
 						;; size=11 bbWeight=1 PerfScore 1.75
 G_M61907_IG03:
        mov      rax, 0xD1FFAB1E      ; System.RuntimeType
        cmp      qword ptr [rdi], rax
        jne      G_M61907_IG14
 						;; size=19 bbWeight=0.25 PerfScore 1.06
 G_M61907_IG04:
        mov      rdi, 0xD1FFAB1E      ; System.Type[]
        mov      esi, 1
        call     CORINFO_HELP_NEWARR_1_OBJ
        mov      r14, rax
        lea      rdi, bword ptr [r14+10H]
        mov      rsi, rbx
        call     CORINFO_HELP_ASSIGN_REF
        mov      rsi, r14
        mov      rdi, 0xD1FFAB1E      ; 'System.IComparable`1[T]'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:MakeGenericType(System.Type[]):System.Type:this
        cmp      dword ptr [rdi], edi
        call     [rax]System.RuntimeType:MakeGenericType(System.Type[]):System.Type:this
        mov      rdi, rax
        mov      rsi, rbx
        mov      rax, qword ptr [rax]
        mov      rax, qword ptr [rax+B0H]
        call     [rax+20H]System.Type:IsAssignableFrom(System.Type):bool:this
        test     eax, eax
        je       SHORT G_M61907_IG06
 						;; size=85 bbWeight=1 PerfScore 19.00
 G_M61907_IG05:
        mov      rsi, rbx
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.GenericComparer`1[System.Int32]'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
        jmp      G_M61907_IG10
 						;; size=33 bbWeight=0.50 PerfScore 3.00
 G_M61907_IG06:
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      rax, qword ptr [rax+60H]
        call     [rax+08H]System.Type:get_IsGenericType():bool:this
        test     eax, eax
        je       SHORT G_M61907_IG09
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      r14, qword ptr [rax+68H]
        call     [r14+18H]System.Type:GetGenericTypeDefinition():System.Type:this
        mov      rdi, 0xD1FFAB1E      ; 'System.Nullable`1[T]'
 
        cmp      rax, rdi
        jne      SHORT G_M61907_IG09
        mov      rdi, rbx
        call     [r14+28H]System.Type:GetGenericArguments():System.Type[]:this
        cmp      dword ptr [rax+08H], 0
        jbe      G_M61907_IG16
        mov      rsi, gword ptr [rax+10H]
        mov      rdi, rsi
        test     rdi, rdi
        je       SHORT G_M61907_IG08
 						;; size=75 bbWeight=0.50 PerfScore 14.00
 G_M61907_IG07:
        mov      rax, 0xD1FFAB1E      ; System.RuntimeType
        cmp      qword ptr [rdi], rax
        jne      G_M61907_IG15
 						;; size=19 bbWeight=0.25 PerfScore 1.06
 G_M61907_IG08:
        mov      rsi, rdi
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.NullableComparer`1[System.Int32]'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
        jmp      SHORT G_M61907_IG10
 						;; size=30 bbWeight=0.50 PerfScore 3.00
 G_M61907_IG09:
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      rax, qword ptr [rax+70H]
        call     [rax+30H]System.Type:get_IsEnum():bool:this
        test     eax, eax
        je       SHORT G_M61907_IG10
-       mov      rdi, rbx
-       mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object
-       call     [rax]System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object
+       mov      rsi, rbx
+       mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.EnumComparer`1[T]'
+
+       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
+       call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
-						;; size=35 bbWeight=0.50 PerfScore 6.12
+						;; size=45 bbWeight=0.50 PerfScore 6.25
 G_M61907_IG10:
        mov      rax, r15
        test     rax, rax
        jne      SHORT G_M61907_IG13
 						;; size=8 bbWeight=1 PerfScore 1.50
 G_M61907_IG11:
        mov      rsi, rbx
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.ObjectComparer`1[System.Object]'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
 						;; size=23 bbWeight=0.50 PerfScore 0.38
 G_M61907_IG12:
        add      rsp, 8
        pop      rbx
        pop      r14
        pop      r15
        pop      rbp
        tail.jmp [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
 						;; size=13 bbWeight=0.50 PerfScore 2.12
 G_M61907_IG13:
        add      rsp, 8
        pop      rbx
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M61907_IG14:
        mov      rdi, rax
        mov      rsi, rbx
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_CHKCASTCLASS_SPECIAL
        call     [rax]CORINFO_HELP_CHKCASTCLASS_SPECIAL
        int3     
 						;; size=19 bbWeight=0 PerfScore 0.00
 G_M61907_IG15:
        mov      rdi, rax
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_CHKCASTCLASS_SPECIAL
        call     [rax]CORINFO_HELP_CHKCASTCLASS_SPECIAL
        int3     
 						;; size=16 bbWeight=0 PerfScore 0.00
 G_M61907_IG16:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 418, prolog size 12, PerfScore 102.18, instruction count 108, allocated bytes for code 418 (MethodHash=90c10e2c) for method System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
+; Total bytes of code 428, prolog size 12, PerfScore 103.30, instruction count 109, allocated bytes for code 428 (MethodHash=90c10e2c) for method System.Collections.Generic.ComparerHelpers:CreateDefaultComparer(System.Type):System.Object (FullOpts)
2 (0.47 % of base) - System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this
 ; Assembly listing for method System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; fully interruptible
 ; No PGO data
-; 0 inlinees with PGO data; 6 single block inlinees; 0 inlinees without PGO data
+; 0 inlinees with PGO data; 6 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T04] ( 11,  7   )     ref  ->  rbx         this class-hnd single-def
-;  V01 arg1         [V01,T09] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
+;  V01 arg1         [V01,T10] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
 ;  V02 loc0         [V02,T05] (  4,  9   )     ref  ->  r15         class-hnd single-def
 ;  V03 loc1         [V03,T02] (  4, 12.50)     int  ->  r14        
 ;  V04 loc2         [V04,T07] (  5,  6   )     int  ->  r13        
-;  V05 loc3         [V05,T08] (  5,  5.50)     ref  ->  r12         class-hnd single-def
-;  V06 loc4         [V06,T10] (  3,  5   )     int  ->  [rbp-2CH]   spill-single-def
-;  V07 loc5         [V07,T12] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
+;  V05 loc3         [V05,T09] (  5,  5.50)     ref  ->  r12         class-hnd single-def
+;  V06 loc4         [V06,T11] (  3,  5   )     int  ->  [rbp-2CH]   spill-single-def
+;  V07 loc5         [V07,T13] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
 ;  V08 loc6         [V08,T00] (  8, 21.50)     int  ->  [rbp-30H]  
 ;  V09 loc7         [V09,T01] (  8, 17.50)   byref  ->  [rbp-48H]   spill-single-def
 ;# V10 OutArgs      [V10    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;  V11 tmp1         [V11,T14] (  3,  1.50)     int  ->  registers  
-;  V12 tmp2         [V12,T11] (  2,  4   )     int  ->  rax        
+;  V11 tmp1         [V11,T15] (  3,  1.50)     int  ->  registers  
+;  V12 tmp2         [V12,T08] (  3,  6   )     int  ->  rdi        
 ;* V13 tmp3         [V13    ] (  0,  0   )   byref  ->  zero-ref    "Inline return value spill temp"
-;  V14 tmp4         [V14,T13] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
+;  V14 tmp4         [V14,T14] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
 ;* V15 tmp5         [V15    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V16 tmp6         [V16    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
-;  V17 tmp7         [V17,T15] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
-;* V18 tmp8         [V18    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;* V19 tmp9         [V19    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;  V20 cse0         [V20,T16] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
-;  V21 cse1         [V21,T03] (  4, 12.50)     int  ->  [rbp-34H]   spill-single-def "CSE - aggressive"
-;  V22 cse2         [V22,T06] (  6,  6   )     int  ->  [rbp-38H]   "CSE - moderate"
+;  V17 tmp7         [V17,T16] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
+;  V18 tmp8         [V18,T12] (  2,  4   )    bool  ->  rdi         "Inline return value spill temp"
+;* V19 tmp9         [V19    ] (  0,  0   )   ubyte  ->  zero-ref    ld-addr-op "Inlining Arg"
+;* V20 tmp10        [V20    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
+;  V21 cse0         [V21,T17] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
+;  V22 cse1         [V22,T03] (  4, 12.50)     int  ->  [rbp-34H]   spill-single-def "CSE - aggressive"
+;  V23 cse2         [V23,T06] (  6,  6   )     int  ->  [rbp-38H]   "CSE - moderate"
 ;
 ; Lcl frame size = 40
 
 G_M30135_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 40
        lea      rbp, [rsp+50H]
        mov      rbx, rdi
 						;; size=22 bbWeight=1 PerfScore 7.00
 G_M30135_IG02:
        cmp      gword ptr [rbx+08H], 0
-       je       G_M30135_IG12
+       je       G_M30135_IG11
 						;; size=11 bbWeight=1 PerfScore 4.00
 G_M30135_IG03:
        mov      r15, gword ptr [rbx+10H]
        xor      r14d, r14d
        mov      r13d, -1
        mov      r12, gword ptr [rbx+18H]
        test     r12, r12
        je       SHORT G_M30135_IG04
        movzx    rax, sil
        mov      dword ptr [rbp-38H], eax
        mov      esi, eax
        mov      rdi, r12
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        jmp      SHORT G_M30135_IG05
 						;; size=49 bbWeight=0.50 PerfScore 6.38
 G_M30135_IG04:
        movzx    rax, sil
        mov      ecx, eax
        mov      dword ptr [rbp-38H], eax
        mov      eax, ecx
 						;; size=11 bbWeight=0.50 PerfScore 0.88
 G_M30135_IG05:
        mov      dword ptr [rbp-2CH], eax
        mov      rsi, gword ptr [rbx+08H]
        mov      edx, eax
        imul     rdx, qword ptr [rbx+20H]
        shr      rdx, 32
        inc      rdx
        mov      edi, dword ptr [rsi+08H]
        mov      r11d, edi
        imul     rdx, r11
        shr      rdx, 32
        cmp      edx, edi
-       jae      G_M30135_IG19
+       jae      G_M30135_IG18
        mov      edx, edx
        lea      rcx, bword ptr [rsi+4*rdx+10H]
        mov      bword ptr [rbp-40H], rcx
        mov      r8d, dword ptr [rcx]
        dec      r8d
-       js       G_M30135_IG12
+       js       G_M30135_IG11
 						;; size=66 bbWeight=0.50 PerfScore 10.25
 G_M30135_IG06:
        mov      r9d, dword ptr [r15+08H]
        mov      dword ptr [rbp-34H], r9d
        cmp      r8d, r9d
-       jae      G_M30135_IG19
+       jae      G_M30135_IG18
        mov      dword ptr [rbp-30H], r8d
        mov      esi, r8d
        lea      rsi, [rsi+2*rsi]
        lea      r10, bword ptr [r15+4*rsi+10H]
        mov      bword ptr [rbp-48H], r10
        cmp      dword ptr [r10], eax
-       jne      SHORT G_M30135_IG11
+       jne      SHORT G_M30135_IG10
 						;; size=42 bbWeight=4 PerfScore 48.00
 G_M30135_IG07:
        test     r12, r12
-       jne      SHORT G_M30135_IG09
+       jne      SHORT G_M30135_IG08
        movzx    rsi, byte  ptr [r10+08H]
        mov      r11d, dword ptr [rbp-38H]
+       xor      edi, edi
        cmp      esi, r11d
-       mov      dword ptr [rbp-38H], r11d
-       jne      SHORT G_M30135_IG11
-						;; size=23 bbWeight=2 PerfScore 13.00
+       sete     dil
+       jmp      SHORT G_M30135_IG09
+						;; size=25 bbWeight=2 PerfScore 15.50
 G_M30135_IG08:
-       jmp      SHORT G_M30135_IG14
-						;; size=2 bbWeight=0.50 PerfScore 1.00
-G_M30135_IG09:
        mov      r11d, dword ptr [rbp-38H]
        movzx    rsi, byte  ptr [r10+08H]
        mov      dword ptr [rbp-38H], r11d
        mov      edx, r11d
        mov      rdi, r12
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
-       test     eax, eax
-       jne      SHORT G_M30135_IG14
-						;; size=36 bbWeight=2 PerfScore 18.00
-G_M30135_IG10:
+       mov      edi, eax
        mov      r10, bword ptr [rbp-48H]
-						;; size=4 bbWeight=1 PerfScore 1.00
-G_M30135_IG11:
+       mov      r11d, dword ptr [rbp-38H]
+						;; size=42 bbWeight=2 PerfScore 20.00
+G_M30135_IG09:
+       test     edi, edi
+       mov      dword ptr [rbp-38H], r11d
+       jne      SHORT G_M30135_IG13
+						;; size=8 bbWeight=2 PerfScore 4.50
+G_M30135_IG10:
        mov      r8d, dword ptr [rbp-30H]
        mov      r13d, r8d
        mov      r8d, dword ptr [r10+04H]
        inc      r14d
        cmp      dword ptr [rbp-34H], r14d
-       jb       SHORT G_M30135_IG18
+       jb       SHORT G_M30135_IG17
        test     r8d, r8d
        mov      eax, dword ptr [rbp-2CH]
        jge      G_M30135_IG06
 						;; size=32 bbWeight=4 PerfScore 35.00
-G_M30135_IG12:
+G_M30135_IG11:
        xor      eax, eax
 						;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M30135_IG13:
+G_M30135_IG12:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M30135_IG14:
+G_M30135_IG13:
        test     r13d, r13d
-       jge      SHORT G_M30135_IG15
-       mov      r10, bword ptr [rbp-48H]
+       jge      SHORT G_M30135_IG14
        mov      r9d, dword ptr [r10+04H]
        inc      r9d
        mov      rcx, bword ptr [rbp-40H]
        mov      dword ptr [rcx], r9d
-       jmp      SHORT G_M30135_IG16
-						;; size=25 bbWeight=0.50 PerfScore 4.25
-G_M30135_IG15:
+       jmp      SHORT G_M30135_IG15
+						;; size=21 bbWeight=0.50 PerfScore 3.75
+G_M30135_IG14:
        cmp      r13d, dword ptr [rbp-34H]
-       jae      SHORT G_M30135_IG19
+       jae      SHORT G_M30135_IG18
        mov      eax, r13d
        lea      rax, [rax+2*rax]
-       mov      r10, bword ptr [rbp-48H]
        mov      ecx, dword ptr [r10+04H]
        mov      dword ptr [r15+4*rax+14H], ecx
-						;; size=26 bbWeight=0.50 PerfScore 3.88
-G_M30135_IG16:
+						;; size=22 bbWeight=0.50 PerfScore 3.38
+G_M30135_IG15:
        mov      eax, dword ptr [rbx+2CH]
        neg      eax
        add      eax, -3
        mov      dword ptr [r10+04H], eax
        mov      r8d, dword ptr [rbp-30H]
        mov      dword ptr [rbx+2CH], r8d
        inc      dword ptr [rbx+30H]
        mov      eax, 1
 						;; size=28 bbWeight=0.50 PerfScore 4.38
-G_M30135_IG17:
+G_M30135_IG16:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M30135_IG18:
+G_M30135_IG17:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        call     [rax]System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
-G_M30135_IG19:
+G_M30135_IG18:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 428, prolog size 22, PerfScore 204.18, instruction count 129, allocated bytes for code 428 (MethodHash=92808a48) for method System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)
+; Total bytes of code 430, prolog size 22, PerfScore 210.38, instruction count 130, allocated bytes for code 430 (MethodHash=92808a48) for method System.Collections.Generic.HashSet`1[ubyte]:Remove(ubyte):bool:this (FullOpts)

@MihuBot
Copy link
Owner Author

MihuBot commented Jul 5, 2023

Top method improvements

-183 (-100.00 % of base) - System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object
-; Assembly listing for method System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts)
-; Emitting BLENDED_CODE for X64 with AVX512 - Unix
-; FullOpts code
-; optimized code
-; rbp based frame
-; partially interruptible
-; No PGO data
-; 0 inlinees with PGO data; 5 single block inlinees; 4 inlinees without PGO data
-; Final local variable assignments
-;
-;  V00 arg0         [V00,T00] (  8,  7.50)     ref  ->  rbx         class-hnd single-def
-;* V01 loc0         [V01    ] (  0,  0   )     int  ->  zero-ref   
-;# V02 OutArgs      [V02    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;  V03 tmp1         [V03,T03] (  3,  2.50)     ref  ->  rdi         class-hnd single-def "Inline return value spill temp"
-;* V04 tmp2         [V04    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "impAppendStmt"
-;  V05 tmp3         [V05,T05] (  2,  2   )     ref  ->  rdi         class-hnd single-def "Inline stloc first use temp"
-;  V06 tmp4         [V06,T04] (  3,  2   )     int  ->  r15         "Inline return value spill temp"
-;* V07 tmp5         [V07    ] (  0,  0   )     int  ->  zero-ref    "Inline return value spill temp"
-;* V08 tmp6         [V08    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline stloc first use temp"
-;* V09 tmp7         [V09    ] (  0,  0   )     ref  ->  zero-ref    "CASTCLASS eval op1"
-;* V10 tmp8         [V10    ] (  0,  0   )    long  ->  zero-ref    "fgMakeTemp is creating a new local variable"
-;* V11 tmp9         [V11    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "spilling QMark2"
-;* V12 tmp10        [V12    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline return value spill temp"
-;* V13 tmp11        [V13    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "impAppendStmt"
-;* V14 tmp12        [V14    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline stloc first use temp"
-;  V15 tmp13        [V15,T02] (  2,  4   )     ref  ->  r15         single-def "arr expr"
-;  V16 tmp14        [V16,T01] (  3,  6   )     int  ->  rax         "index expr"
-;* V17 tmp15        [V17    ] (  0,  0   )     ref  ->  zero-ref    "arr expr"
-;* V18 tmp16        [V18    ] (  0,  0   )     int  ->  zero-ref    "index expr"
-;
-; Lcl frame size = 0
-
-G_M19464_IG01:
-       push     rbp
-       push     r15
-       push     rbx
-       lea      rbp, [rsp+10H]
-       mov      rbx, rdi
-						;; size=12 bbWeight=1 PerfScore 3.75
-G_M19464_IG02:
-       mov      rdi, rbx
-       mov      rsi, 0xD1FFAB1E      ; 'enumType'
-
-       mov      rax, 0xD1FFAB1E      ; code for System.ArgumentNullException:ThrowIfNull(System.Object,System.String)
-       call     [rax]System.ArgumentNullException:ThrowIfNull(System.Object,System.String)
-       cmp      byte  ptr [rbx], bl
-       mov      rdi, rbx
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:get_IsActualEnum():bool:this
-       call     [rax]System.RuntimeType:get_IsActualEnum():bool:this
-       test     eax, eax
-       je       SHORT G_M19464_IG10
-       mov      rdi, 0xD1FFAB1E      ; const ptr
-       mov      r15, gword ptr [rdi]
-       mov      rdi, qword ptr [rbx+18H]
-       call     System.Enum:InternalGetCorElementType(ulong):ubyte
-       cmp      eax, 26
-       jae      SHORT G_M19464_IG11
-       mov      edi, eax
-       mov      rdi, gword ptr [r15+8*rdi+10H]
-       test     rdi, rdi
-       jne      SHORT G_M19464_IG04
-						;; size=85 bbWeight=1 PerfScore 21.50
-G_M19464_IG03:
-       xor      r15d, r15d
-       jmp      SHORT G_M19464_IG05
-						;; size=5 bbWeight=0.50 PerfScore 1.12
-G_M19464_IG04:
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:GetTypeCodeImpl():int:this
-       call     [rax]System.RuntimeType:GetTypeCodeImpl():int:this
-       mov      r15d, eax
-						;; size=15 bbWeight=0.50 PerfScore 1.75
-G_M19464_IG05:
-       add      r15d, -5
-       cmp      r15d, 7
-       ja       SHORT G_M19464_IG08
-						;; size=10 bbWeight=1 PerfScore 1.50
-G_M19464_IG06:
-       mov      rsi, rbx
-       mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.EnumComparer`1[T]'
-
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
-						;; size=23 bbWeight=0.50 PerfScore 0.38
-G_M19464_IG07:
-       pop      rbx
-       pop      r15
-       pop      rbp
-       tail.jmp [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
-						;; size=7 bbWeight=0.50 PerfScore 1.75
-G_M19464_IG08:
-       xor      rax, rax
-						;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M19464_IG09:
-       pop      rbx
-       pop      r15
-       pop      rbp
-       ret      
-						;; size=5 bbWeight=0.50 PerfScore 1.25
-G_M19464_IG10:
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:ThrowMustBeEnum()
-       call     [rax]System.RuntimeType:ThrowMustBeEnum()
-       int3     
-						;; size=13 bbWeight=0 PerfScore 0.00
-G_M19464_IG11:
-       call     CORINFO_HELP_RNGCHKFAIL
-       int3     
-						;; size=6 bbWeight=0 PerfScore 0.00
-
-; Total bytes of code 183, prolog size 9, PerfScore 51.43, instruction count 50, allocated bytes for code 183 (MethodHash=5e08b3f7) for method System.Collections.Generic.ComparerHelpers:TryCreateEnumComparer(System.RuntimeType):System.Object (FullOpts)
-; ============================================================
-183 (-100.00 % of base) - System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object
-; Assembly listing for method System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts)
-; Emitting BLENDED_CODE for X64 with AVX512 - Unix
-; FullOpts code
-; optimized code
-; rbp based frame
-; partially interruptible
-; No PGO data
-; 0 inlinees with PGO data; 5 single block inlinees; 4 inlinees without PGO data
-; Final local variable assignments
-;
-;  V00 arg0         [V00,T00] (  8,  7.50)     ref  ->  rbx         class-hnd single-def
-;* V01 loc0         [V01    ] (  0,  0   )     int  ->  zero-ref   
-;# V02 OutArgs      [V02    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;  V03 tmp1         [V03,T03] (  3,  2.50)     ref  ->  rdi         class-hnd single-def "Inline return value spill temp"
-;* V04 tmp2         [V04    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "impAppendStmt"
-;  V05 tmp3         [V05,T05] (  2,  2   )     ref  ->  rdi         class-hnd single-def "Inline stloc first use temp"
-;  V06 tmp4         [V06,T04] (  3,  2   )     int  ->  r15         "Inline return value spill temp"
-;* V07 tmp5         [V07    ] (  0,  0   )     int  ->  zero-ref    "Inline return value spill temp"
-;* V08 tmp6         [V08    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline stloc first use temp"
-;* V09 tmp7         [V09    ] (  0,  0   )     ref  ->  zero-ref    "CASTCLASS eval op1"
-;* V10 tmp8         [V10    ] (  0,  0   )    long  ->  zero-ref    "fgMakeTemp is creating a new local variable"
-;* V11 tmp9         [V11    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "spilling QMark2"
-;* V12 tmp10        [V12    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline return value spill temp"
-;* V13 tmp11        [V13    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "impAppendStmt"
-;* V14 tmp12        [V14    ] (  0,  0   )     ref  ->  zero-ref    class-hnd "Inline stloc first use temp"
-;  V15 tmp13        [V15,T02] (  2,  4   )     ref  ->  r15         single-def "arr expr"
-;  V16 tmp14        [V16,T01] (  3,  6   )     int  ->  rax         "index expr"
-;* V17 tmp15        [V17    ] (  0,  0   )     ref  ->  zero-ref    "arr expr"
-;* V18 tmp16        [V18    ] (  0,  0   )     int  ->  zero-ref    "index expr"
-;
-; Lcl frame size = 0
-
-G_M39904_IG01:
-       push     rbp
-       push     r15
-       push     rbx
-       lea      rbp, [rsp+10H]
-       mov      rbx, rdi
-						;; size=12 bbWeight=1 PerfScore 3.75
-G_M39904_IG02:
-       mov      rdi, rbx
-       mov      rsi, 0xD1FFAB1E      ; 'enumType'
-
-       mov      rax, 0xD1FFAB1E      ; code for System.ArgumentNullException:ThrowIfNull(System.Object,System.String)
-       call     [rax]System.ArgumentNullException:ThrowIfNull(System.Object,System.String)
-       cmp      byte  ptr [rbx], bl
-       mov      rdi, rbx
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:get_IsActualEnum():bool:this
-       call     [rax]System.RuntimeType:get_IsActualEnum():bool:this
-       test     eax, eax
-       je       SHORT G_M39904_IG10
-       mov      rdi, 0xD1FFAB1E      ; const ptr
-       mov      r15, gword ptr [rdi]
-       mov      rdi, qword ptr [rbx+18H]
-       call     System.Enum:InternalGetCorElementType(ulong):ubyte
-       cmp      eax, 26
-       jae      SHORT G_M39904_IG11
-       mov      edi, eax
-       mov      rdi, gword ptr [r15+8*rdi+10H]
-       test     rdi, rdi
-       jne      SHORT G_M39904_IG04
-						;; size=85 bbWeight=1 PerfScore 21.50
-G_M39904_IG03:
-       xor      r15d, r15d
-       jmp      SHORT G_M39904_IG05
-						;; size=5 bbWeight=0.50 PerfScore 1.12
-G_M39904_IG04:
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:GetTypeCodeImpl():int:this
-       call     [rax]System.RuntimeType:GetTypeCodeImpl():int:this
-       mov      r15d, eax
-						;; size=15 bbWeight=0.50 PerfScore 1.75
-G_M39904_IG05:
-       add      r15d, -5
-       cmp      r15d, 7
-       ja       SHORT G_M39904_IG08
-						;; size=10 bbWeight=1 PerfScore 1.50
-G_M39904_IG06:
-       mov      rsi, rbx
-       mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.EnumEqualityComparer`1[T]'
-
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
-						;; size=23 bbWeight=0.50 PerfScore 0.38
-G_M39904_IG07:
-       pop      rbx
-       pop      r15
-       pop      rbp
-       tail.jmp [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
-						;; size=7 bbWeight=0.50 PerfScore 1.75
-G_M39904_IG08:
-       xor      rax, rax
-						;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M39904_IG09:
-       pop      rbx
-       pop      r15
-       pop      rbp
-       ret      
-						;; size=5 bbWeight=0.50 PerfScore 1.25
-G_M39904_IG10:
-       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:ThrowMustBeEnum()
-       call     [rax]System.RuntimeType:ThrowMustBeEnum()
-       int3     
-						;; size=13 bbWeight=0 PerfScore 0.00
-G_M39904_IG11:
-       call     CORINFO_HELP_RNGCHKFAIL
-       int3     
-						;; size=6 bbWeight=0 PerfScore 0.00
-
-; Total bytes of code 183, prolog size 9, PerfScore 51.43, instruction count 50, allocated bytes for code 183 (MethodHash=013b641f) for method System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object (FullOpts)
-; ============================================================
-24 (-4.79 % of base) - System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object
 ; Assembly listing for method System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
-; fully interruptible
+; partially interruptible
 ; No PGO data
-; 0 inlinees with PGO data; 6 single block inlinees; 1 inlinees without PGO data
+; 0 inlinees with PGO data; 3 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 arg0         [V00,T01] (  5,  4   )     ref  ->  rbx         class-hnd single-def
-;  V01 loc0         [V01,T02] (  7,  4.50)     ref  ->  r15         class-hnd
-;  V02 loc1         [V02,T00] ( 16,  9   )     ref  ->  rbx         class-hnd single-def
+;  V01 loc0         [V01,T05] (  5,  3   )     ref  ->  r15         class-hnd
+;  V02 loc1         [V02,T00] ( 15,  8.50)     ref  ->  rbx         class-hnd single-def
 ;* V03 loc2         [V03    ] (  0,  0   )     ref  ->  zero-ref    class-hnd
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;  V05 tmp1         [V05,T12] (  3,  1   )    long  ->  rax         "fgMakeTemp is creating a new local variable"
-;  V06 tmp2         [V06,T03] (  3,  4.50)     ref  ->  rdi         class-hnd "spilling QMark2"
+;  V06 tmp2         [V06,T02] (  3,  4.50)     ref  ->  rdi         class-hnd "spilling QMark2"
 ;  V07 tmp3         [V07,T06] (  3,  3   )     ref  ->  r14         class-hnd exact single-def "dup spill"
 ;* V08 tmp4         [V08    ] (  0,  0   )     ref  ->  zero-ref    class-hnd single-def "impAppendStmt"
-;  V09 tmp5         [V09,T08] (  3,  2.50)     ref  ->  rax         single-def
-;  V10 tmp6         [V10,T09] (  3,  2   )     ref  ->  rsi         single-def "CASTCLASS eval op1"
+;  V09 tmp5         [V09,T09] (  3,  1.50)     ref  ->  rax         single-def
+;  V10 tmp6         [V10,T08] (  3,  2   )     ref  ->  rsi         single-def "CASTCLASS eval op1"
 ;  V11 tmp7         [V11,T13] (  3,  1   )    long  ->  rax         "fgMakeTemp is creating a new local variable"
-;  V12 tmp8         [V12,T05] (  4,  3.50)     ref  ->  rdi         class-hnd "spilling QMark2"
+;  V12 tmp8         [V12,T04] (  4,  3.50)     ref  ->  rdi         class-hnd "spilling QMark2"
 ;* V13 tmp9         [V13    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "NewObj constructor temp"
-;* V14 tmp10        [V14    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact "NewObj constructor temp"
-;  V15 tmp11        [V15,T10] (  2,  1   )    bool  ->  rax         "Inline return value spill temp"
-;  V16 tmp12        [V16,T04] (  4,  4   )     ref  ->  rax         class-hnd single-def "Inlining Arg"
-;  V17 tmp13        [V17,T07] (  3,  3   )     ref  ->  rax         single-def "arr expr"
-;  V18 cse0         [V18,T11] (  3,  1.50)    long  ->  r14         "CSE - moderate"
+;  V14 tmp10        [V14,T10] (  2,  1   )    bool  ->  rax         "Inline return value spill temp"
+;  V15 tmp11        [V15,T03] (  4,  4   )     ref  ->  rax         class-hnd single-def "Inlining Arg"
+;  V16 tmp12        [V16,T07] (  3,  3   )     ref  ->  rax         single-def "arr expr"
+;  V17 cse0         [V17,T11] (  3,  1.50)    long  ->  r14         "CSE - moderate"
 ;
 ; Lcl frame size = 8
 
 G_M53179_IG01:
        push     rbp
        push     r15
        push     r14
        push     rbx
        push     rax
        lea      rbp, [rsp+20H]
        mov      rbx, rdi
 						;; size=15 bbWeight=1 PerfScore 5.75
 G_M53179_IG02:
        xor      r15, r15
        mov      rdi, rbx
        test     rdi, rdi
        je       SHORT G_M53179_IG04
 						;; size=11 bbWeight=1 PerfScore 1.75
 G_M53179_IG03:
        mov      rax, 0xD1FFAB1E      ; System.RuntimeType
        cmp      qword ptr [rdi], rax
-       jne      G_M53179_IG16
+       jne      G_M53179_IG15
 						;; size=19 bbWeight=0.25 PerfScore 1.06
 G_M53179_IG04:
-       mov      rdi, 0xD1FFAB1E      ; 'System.Byte'
-
-       cmp      rbx, rdi
-       jne      SHORT G_M53179_IG06
-						;; size=15 bbWeight=1 PerfScore 1.50
-G_M53179_IG05:
-       mov      rdi, 0xD1FFAB1E      ; System.Collections.Generic.ByteEqualityComparer
-       call     CORINFO_HELP_NEWSFAST
-       mov      r15, rax
-       jmp      G_M53179_IG12
-						;; size=23 bbWeight=0.50 PerfScore 1.75
-G_M53179_IG06:
        mov      rdi, 0xD1FFAB1E      ; 'System.String'
 
        cmp      rbx, rdi
        jne      SHORT G_M53179_IG07
+						;; size=15 bbWeight=1 PerfScore 1.50
+G_M53179_IG05:
        mov      rdi, 0xD1FFAB1E      ; System.Collections.Generic.GenericEqualityComparer`1[System.String]
        call     CORINFO_HELP_NEWSFAST
-       mov      r15, rax
-       jmp      G_M53179_IG12
-						;; size=38 bbWeight=0.50 PerfScore 2.50
+       nop      
+						;; size=16 bbWeight=0.50 PerfScore 0.75
+G_M53179_IG06:
+       add      rsp, 8
+       pop      rbx
+       pop      r14
+       pop      r15
+       pop      rbp
+       ret      
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M53179_IG07:
        mov      rdi, 0xD1FFAB1E      ; System.Type[]
        mov      esi, 1
        call     CORINFO_HELP_NEWARR_1_OBJ
        mov      r14, rax
        lea      rdi, bword ptr [r14+10H]
        mov      rsi, rbx
        call     CORINFO_HELP_ASSIGN_REF
        mov      rsi, r14
        mov      rdi, 0xD1FFAB1E      ; 'System.IEquatable`1[T]'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeType:MakeGenericType(System.Type[]):System.Type:this
        cmp      dword ptr [rdi], edi
        call     [rax]System.RuntimeType:MakeGenericType(System.Type[]):System.Type:this
        cmp      byte  ptr [rbx], bl
        test     rax, rax
        je       SHORT G_M53179_IG08
        mov      rdi, rax
        mov      rsi, rbx
        mov      rax, qword ptr [rax]
        mov      rax, qword ptr [rax+B0H]
        call     [rax+20H]System.Type:IsAssignableFrom(System.Type):bool:this
        test     eax, eax
        je       SHORT G_M53179_IG08
        mov      rsi, rbx
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.GenericEqualityComparer`1[System.Str'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
        jmp      G_M53179_IG12
 						;; size=125 bbWeight=0.50 PerfScore 14.62
 G_M53179_IG08:
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      rax, qword ptr [rax+60H]
        call     [rax+08H]System.Type:get_IsGenericType():bool:this
        test     eax, eax
        je       SHORT G_M53179_IG11
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      r14, qword ptr [rax+68H]
        call     [r14+18H]System.Type:GetGenericTypeDefinition():System.Type:this
        mov      rdi, 0xD1FFAB1E      ; 'System.Nullable`1[T]'
 
        cmp      rax, rdi
        jne      SHORT G_M53179_IG11
        mov      rdi, rbx
        call     [r14+28H]System.Type:GetGenericArguments():System.Type[]:this
        cmp      dword ptr [rax+08H], 0
-       jbe      G_M53179_IG18
+       jbe      G_M53179_IG17
        mov      rsi, gword ptr [rax+10H]
        mov      rdi, rsi
        test     rdi, rdi
        je       SHORT G_M53179_IG10
 						;; size=75 bbWeight=0.50 PerfScore 14.00
 G_M53179_IG09:
        mov      rax, 0xD1FFAB1E      ; System.RuntimeType
        cmp      qword ptr [rdi], rax
-       jne      G_M53179_IG17
+       jne      G_M53179_IG16
 						;; size=19 bbWeight=0.25 PerfScore 1.06
 G_M53179_IG10:
        mov      rsi, rdi
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.NullableEqualityComparer`1[System.In'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
        jmp      SHORT G_M53179_IG12
 						;; size=30 bbWeight=0.50 PerfScore 3.00
 G_M53179_IG11:
        mov      rdi, rbx
        mov      rax, qword ptr [rbx]
        mov      rax, qword ptr [rax+70H]
        call     [rax+30H]System.Type:get_IsEnum():bool:this
        test     eax, eax
        je       SHORT G_M53179_IG12
-       mov      rdi, rbx
-       mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object
-       call     [rax]System.Collections.Generic.ComparerHelpers:TryCreateEnumEqualityComparer(System.RuntimeType):System.Object
+       mov      rsi, rbx
+       mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.EnumEqualityComparer`1[T]'
+
+       mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
+       call     [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
        mov      r15, rax
-						;; size=35 bbWeight=0.50 PerfScore 6.12
+						;; size=45 bbWeight=0.50 PerfScore 6.25
 G_M53179_IG12:
        mov      rax, r15
        test     rax, rax
-       jne      SHORT G_M53179_IG15
-						;; size=8 bbWeight=1 PerfScore 1.50
-G_M53179_IG13:
+       jne      SHORT G_M53179_IG14
        mov      rsi, rbx
        mov      rdi, 0xD1FFAB1E      ; 'System.Collections.Generic.ObjectEqualityComparer`1[System.Obje'
 
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
-						;; size=23 bbWeight=0.50 PerfScore 0.38
-G_M53179_IG14:
+						;; size=31 bbWeight=0.50 PerfScore 1.12
+G_M53179_IG13:
        add      rsp, 8
        pop      rbx
        pop      r14
        pop      r15
        pop      rbp
        tail.jmp [rax]System.RuntimeTypeHandle:CreateInstanceForAnotherGenericParameter(System.RuntimeType,System.RuntimeType):System.Object
 						;; size=13 bbWeight=0.50 PerfScore 2.12
-G_M53179_IG15:
+G_M53179_IG14:
        add      rsp, 8
        pop      rbx
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=11 bbWeight=0.50 PerfScore 1.62
-G_M53179_IG16:
+G_M53179_IG15:
        mov      rdi, rax
        mov      rsi, rbx
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_CHKCASTCLASS_SPECIAL
        call     [rax]CORINFO_HELP_CHKCASTCLASS_SPECIAL
        int3     
 						;; size=19 bbWeight=0 PerfScore 0.00
-G_M53179_IG17:
+G_M53179_IG16:
        mov      rdi, rax
        mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_CHKCASTCLASS_SPECIAL
        call     [rax]CORINFO_HELP_CHKCASTCLASS_SPECIAL
        int3     
 						;; size=16 bbWeight=0 PerfScore 0.00
-G_M53179_IG18:
+G_M53179_IG17:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 501, prolog size 15, PerfScore 108.85, instruction count 125, allocated bytes for code 501 (MethodHash=6fa03044) for method System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
+; Total bytes of code 477, prolog size 12, PerfScore 103.95, instruction count 124, allocated bytes for code 477 (MethodHash=6fa03044) for method System.Collections.Generic.ComparerHelpers:CreateDefaultEqualityComparer(System.Type):System.Object (FullOpts)
-4 (-0.90 % of base) - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this
 ; Assembly listing for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; fully interruptible
 ; No PGO data
-; 0 inlinees with PGO data; 7 single block inlinees; 0 inlinees without PGO data
+; 0 inlinees with PGO data; 7 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T04] ( 11,  7   )     ref  ->  rbx         this class-hnd single-def
-;  V01 arg1         [V01,T10] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
-;  V02 arg2         [V02,T09] (  4,  3   )   byref  ->  r15         single-def
+;  V01 arg1         [V01,T11] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
+;  V02 arg2         [V02,T10] (  4,  3   )   byref  ->  r15         single-def
 ;  V03 loc0         [V03,T02] (  4, 12.50)     int  ->  r14        
-;  V04 loc1         [V04,T08] (  5,  5.50)     ref  ->  r13         class-hnd single-def
-;  V05 loc2         [V05,T11] (  3,  5   )     int  ->  [rbp-2CH]   spill-single-def
-;  V06 loc3         [V06,T13] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
+;  V04 loc1         [V04,T09] (  5,  5.50)     ref  ->  r13         class-hnd single-def
+;  V05 loc2         [V05,T12] (  3,  5   )     int  ->  [rbp-2CH]   spill-single-def
+;  V06 loc3         [V06,T14] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
 ;  V07 loc4         [V07,T05] (  4,  9   )     ref  ->  [rbp-48H]   class-hnd spill-single-def
 ;  V08 loc5         [V08,T07] (  5,  6   )     int  ->  [rbp-30H]  
 ;  V09 loc6         [V09,T00] (  8, 21.50)     int  ->  [rbp-34H]  
 ;  V10 loc7         [V10,T01] (  9, 18   )   byref  ->  [rbp-50H]   spill-single-def
 ;# V11 OutArgs      [V11    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;  V12 tmp1         [V12,T15] (  3,  1.50)     int  ->  rax        
-;  V13 tmp2         [V13,T12] (  2,  4   )     int  ->  rax        
+;  V12 tmp1         [V12,T16] (  3,  1.50)     int  ->  rax        
+;  V13 tmp2         [V13,T08] (  3,  6   )     int  ->  registers  
 ;* V14 tmp3         [V14    ] (  0,  0   )   byref  ->  zero-ref    "Inline return value spill temp"
-;  V15 tmp4         [V15,T14] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
+;  V15 tmp4         [V15,T15] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
 ;* V16 tmp5         [V16    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V17 tmp6         [V17    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
-;  V18 tmp7         [V18,T16] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
-;* V19 tmp8         [V19    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;* V20 tmp9         [V20    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;  V21 cse0         [V21,T17] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
-;  V22 cse1         [V22,T03] (  4, 12.50)     int  ->  [rbp-38H]   spill-single-def "CSE - aggressive"
-;  V23 cse2         [V23,T06] (  6,  6   )     int  ->  r12         "CSE - moderate"
+;  V18 tmp7         [V18,T17] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
+;  V19 tmp8         [V19,T13] (  2,  4   )    bool  ->  rdx         "Inline return value spill temp"
+;* V20 tmp9         [V20    ] (  0,  0   )   ubyte  ->  zero-ref    ld-addr-op "Inlining Arg"
+;* V21 tmp10        [V21    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
+;  V22 cse0         [V22,T18] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
+;  V23 cse1         [V23,T03] (  4, 12.50)     int  ->  [rbp-38H]   spill-single-def "CSE - aggressive"
+;  V24 cse2         [V24,T06] (  6,  6   )     int  ->  r12         "CSE - moderate"
 ;
 ; Lcl frame size = 40
 
 G_M55048_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 40
        lea      rbp, [rsp+50H]
        mov      rbx, rdi
        mov      r15, rdx
 						;; size=25 bbWeight=1 PerfScore 7.25
 G_M55048_IG02:
        cmp      gword ptr [rbx+08H], 0
-       je       G_M55048_IG13
+       je       G_M55048_IG11
 						;; size=11 bbWeight=1 PerfScore 4.00
 G_M55048_IG03:
        xor      r14d, r14d
        mov      r13, gword ptr [rbx+18H]
        test     r13, r13
        je       SHORT G_M55048_IG04
        movzx    r12, sil
        mov      esi, r12d
        mov      rdi, r13
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        jmp      SHORT G_M55048_IG05
 						;; size=37 bbWeight=0.50 PerfScore 4.75
 G_M55048_IG04:
        movzx    r12, sil
        mov      eax, r12d
 						;; size=7 bbWeight=0.50 PerfScore 0.25
 G_M55048_IG05:
        mov      dword ptr [rbp-2CH], eax
        mov      rsi, gword ptr [rbx+08H]
        mov      edx, eax
        imul     rdx, qword ptr [rbx+30H]
        shr      rdx, 32
        inc      rdx
        mov      edi, dword ptr [rsi+08H]
        mov      r11d, edi
        imul     rdx, r11
        shr      rdx, 32
        cmp      edx, edi
-       jae      G_M55048_IG20
+       jae      G_M55048_IG18
        mov      edx, edx
        lea      rcx, bword ptr [rsi+4*rdx+10H]
        mov      bword ptr [rbp-40H], rcx
        mov      r8, gword ptr [rbx+10H]
        mov      gword ptr [rbp-48H], r8
        mov      dword ptr [rbp-30H], -1
        mov      r10d, dword ptr [rcx]
        dec      r10d
-       js       G_M55048_IG13
+       js       G_M55048_IG11
 						;; size=81 bbWeight=0.50 PerfScore 12.25
 G_M55048_IG06:
        mov      r11d, dword ptr [r8+08H]
        mov      dword ptr [rbp-38H], r11d
        cmp      r10d, r11d
-       jae      G_M55048_IG20
+       jae      G_M55048_IG18
        mov      dword ptr [rbp-34H], r10d
        mov      esi, r10d
        lea      rsi, [rsi+4*rsi]
        lea      rdi, bword ptr [r8+4*rsi+10H]
        mov      bword ptr [rbp-50H], rdi
        cmp      dword ptr [rdi], eax
-       jne      SHORT G_M55048_IG12
+       jne      SHORT G_M55048_IG10
 						;; size=41 bbWeight=4 PerfScore 48.00
 G_M55048_IG07:
        test     r13, r13
        je       SHORT G_M55048_IG08
        movzx    rsi, byte  ptr [rdi+08H]
        mov      edx, r12d
        mov      rdi, r13
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
-       jmp      SHORT G_M55048_IG10
+       jmp      SHORT G_M55048_IG09
 						;; size=31 bbWeight=2 PerfScore 18.00
 G_M55048_IG08:
        movzx    rdx, byte  ptr [rdi+08H]
        cmp      edx, r12d
-       jne      SHORT G_M55048_IG12
-						;; size=9 bbWeight=2 PerfScore 6.50
+       sete     dl
+       movzx    rdx, dl
+       mov      eax, edx
+						;; size=15 bbWeight=2 PerfScore 7.50
 G_M55048_IG09:
-       jmp      SHORT G_M55048_IG15
-						;; size=2 bbWeight=0.50 PerfScore 1.00
-G_M55048_IG10:
        test     eax, eax
-       jne      SHORT G_M55048_IG15
-						;; size=4 bbWeight=2 PerfScore 2.50
-G_M55048_IG11:
        mov      rdi, bword ptr [rbp-50H]
-						;; size=4 bbWeight=1 PerfScore 1.00
-G_M55048_IG12:
+       jne      SHORT G_M55048_IG13
+						;; size=8 bbWeight=2 PerfScore 4.50
+G_M55048_IG10:
        mov      r10d, dword ptr [rbp-34H]
        mov      r9d, r10d
        mov      r10d, dword ptr [rdi+04H]
        inc      r14d
        cmp      dword ptr [rbp-38H], r14d
-       jb       G_M55048_IG19
+       jb       G_M55048_IG17
        test     r10d, r10d
        mov      dword ptr [rbp-30H], r9d
        mov      eax, dword ptr [rbp-2CH]
        mov      r8, gword ptr [rbp-48H]
        jge      G_M55048_IG06
 						;; size=44 bbWeight=4 PerfScore 43.00
-G_M55048_IG13:
+G_M55048_IG11:
        xor      eax, eax
        mov      qword ptr [r15], rax
 						;; size=5 bbWeight=0.50 PerfScore 0.62
-G_M55048_IG14:
+G_M55048_IG12:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M55048_IG15:
+G_M55048_IG13:
        mov      r9d, dword ptr [rbp-30H]
        test     r9d, r9d
-       jge      SHORT G_M55048_IG16
-       mov      rdi, bword ptr [rbp-50H]
+       jge      SHORT G_M55048_IG14
        mov      r9d, dword ptr [rdi+04H]
        inc      r9d
        mov      rcx, bword ptr [rbp-40H]
        mov      dword ptr [rcx], r9d
-       jmp      SHORT G_M55048_IG17
-						;; size=29 bbWeight=0.50 PerfScore 4.75
-G_M55048_IG16:
+       jmp      SHORT G_M55048_IG15
+						;; size=25 bbWeight=0.50 PerfScore 4.25
+G_M55048_IG14:
        cmp      r9d, dword ptr [rbp-38H]
-       jae      SHORT G_M55048_IG20
+       jae      SHORT G_M55048_IG18
        mov      eax, r9d
        lea      rax, [rax+4*rax]
-       mov      rdi, bword ptr [rbp-50H]
        mov      ecx, dword ptr [rdi+04H]
        mov      r8, gword ptr [rbp-48H]
        mov      dword ptr [r8+4*rax+14H], ecx
-						;; size=29 bbWeight=0.50 PerfScore 4.38
-G_M55048_IG17:
+						;; size=25 bbWeight=0.50 PerfScore 3.88
+G_M55048_IG15:
        mov      rax, qword ptr [rdi+0CH]
        mov      qword ptr [r15], rax
        mov      eax, dword ptr [rbx+3CH]
        neg      eax
        add      eax, -3
        mov      dword ptr [rdi+04H], eax
        mov      r10d, dword ptr [rbp-34H]
        mov      dword ptr [rbx+3CH], r10d
        inc      dword ptr [rbx+40H]
        mov      eax, 1
 						;; size=34 bbWeight=0.50 PerfScore 5.88
-G_M55048_IG18:
+G_M55048_IG16:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M55048_IG19:
+G_M55048_IG17:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        call     [rax]System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
-G_M55048_IG20:
+G_M55048_IG18:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 442, prolog size 25, PerfScore 212.58, instruction count 132, allocated bytes for code 442 (MethodHash=f4f128f7) for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)
+; Total bytes of code 438, prolog size 25, PerfScore 212.18, instruction count 131, allocated bytes for code 438 (MethodHash=f4f128f7) for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte,byref):bool:this (FullOpts)
-4 (-0.93 % of base) - System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this
 ; Assembly listing for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; fully interruptible
 ; No PGO data
-; 0 inlinees with PGO data; 7 single block inlinees; 0 inlinees without PGO data
+; 0 inlinees with PGO data; 7 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T04] ( 11,  7   )     ref  ->  rbx         this class-hnd single-def
-;  V01 arg1         [V01,T09] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
+;  V01 arg1         [V01,T10] (  4,  3   )   ubyte  ->  rsi         ld-addr-op single-def
 ;  V02 loc0         [V02,T02] (  4, 12.50)     int  ->  r15        
-;  V03 loc1         [V03,T08] (  5,  5.50)     ref  ->  r14         class-hnd single-def
-;  V04 loc2         [V04,T10] (  3,  5   )     int  ->  r12        
-;  V05 loc3         [V05,T12] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
+;  V03 loc1         [V03,T09] (  5,  5.50)     ref  ->  r14         class-hnd single-def
+;  V04 loc2         [V04,T11] (  3,  5   )     int  ->  r12        
+;  V05 loc3         [V05,T13] (  3,  1.50)   byref  ->  [rbp-40H]   spill-single-def
 ;  V06 loc4         [V06,T05] (  4,  9   )     ref  ->  [rbp-48H]   class-hnd spill-single-def
 ;  V07 loc5         [V07,T07] (  5,  6   )     int  ->  [rbp-2CH]  
 ;  V08 loc6         [V08,T00] (  8, 21.50)     int  ->  [rbp-30H]  
 ;  V09 loc7         [V09,T01] (  8, 17.50)   byref  ->  [rbp-50H]   spill-single-def
 ;# V10 OutArgs      [V10    ] (  1,  1   )  struct ( 0) [rsp+00H]   do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
-;  V11 tmp1         [V11,T14] (  3,  1.50)     int  ->  r12        
-;  V12 tmp2         [V12,T11] (  2,  4   )     int  ->  rax        
+;  V11 tmp1         [V11,T15] (  3,  1.50)     int  ->  r12        
+;  V12 tmp2         [V12,T08] (  3,  6   )     int  ->  registers  
 ;* V13 tmp3         [V13    ] (  0,  0   )   byref  ->  zero-ref    "Inline return value spill temp"
-;  V14 tmp4         [V14,T13] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
+;  V14 tmp4         [V14,T14] (  3,  1.50)     ref  ->  rsi         class-hnd single-def "Inline stloc first use temp"
 ;* V15 tmp5         [V15    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V16 tmp6         [V16    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
-;  V17 tmp7         [V17,T15] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
-;* V18 tmp8         [V18    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;* V19 tmp9         [V19    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
-;  V20 cse0         [V20,T16] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
-;  V21 cse1         [V21,T03] (  4, 12.50)     int  ->  [rbp-34H]   spill-single-def "CSE - aggressive"
-;  V22 cse2         [V22,T06] (  6,  6   )     int  ->  r13         "CSE - moderate"
+;  V17 tmp7         [V17,T16] (  3,  1.50)     int  ->  rdx         "Inline stloc first use temp"
+;  V18 tmp8         [V18,T12] (  2,  4   )    bool  ->  rdx         "Inline return value spill temp"
+;* V19 tmp9         [V19    ] (  0,  0   )   ubyte  ->  zero-ref    ld-addr-op "Inlining Arg"
+;* V20 tmp10        [V20    ] (  0,  0   )   ubyte  ->  zero-ref    "Inlining Arg"
+;  V21 cse0         [V21,T17] (  3,  1.50)     int  ->  rdi         "CSE - moderate"
+;  V22 cse1         [V22,T03] (  4, 12.50)     int  ->  [rbp-34H]   spill-single-def "CSE - aggressive"
+;  V23 cse2         [V23,T06] (  6,  6   )     int  ->  r13         "CSE - moderate"
 ;
 ; Lcl frame size = 40
 
 G_M14222_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 40
        lea      rbp, [rsp+50H]
        mov      rbx, rdi
 						;; size=22 bbWeight=1 PerfScore 7.00
 G_M14222_IG02:
        cmp      gword ptr [rbx+08H], 0
-       je       G_M14222_IG13
+       je       G_M14222_IG11
 						;; size=11 bbWeight=1 PerfScore 4.00
 G_M14222_IG03:
        xor      r15d, r15d
        mov      r14, gword ptr [rbx+18H]
        test     r14, r14
        je       SHORT G_M14222_IG04
        movzx    r13, sil
        mov      esi, r13d
        mov      rdi, r14
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:GetHashCode(ubyte):int:this
        mov      r12d, eax
        jmp      SHORT G_M14222_IG05
 						;; size=40 bbWeight=0.50 PerfScore 4.88
 G_M14222_IG04:
        movzx    r13, sil
        mov      r12d, r13d
 						;; size=7 bbWeight=0.50 PerfScore 0.25
 G_M14222_IG05:
        mov      rsi, gword ptr [rbx+08H]
        mov      edx, r12d
        imul     rdx, qword ptr [rbx+30H]
        shr      rdx, 32
        inc      rdx
        mov      edi, dword ptr [rsi+08H]
        mov      r11d, edi
        imul     rdx, r11
        shr      rdx, 32
        cmp      edx, edi
-       jae      G_M14222_IG20
+       jae      G_M14222_IG18
        mov      edx, edx
        lea      rax, bword ptr [rsi+4*rdx+10H]
        mov      bword ptr [rbp-40H], rax
        mov      rcx, gword ptr [rbx+10H]
        mov      gword ptr [rbp-48H], rcx
        mov      dword ptr [rbp-2CH], -1
        mov      r9d, dword ptr [rax]
        dec      r9d
-       js       G_M14222_IG13
+       js       G_M14222_IG11
 						;; size=79 bbWeight=0.50 PerfScore 11.75
 G_M14222_IG06:
        mov      r10d, dword ptr [rcx+08H]
        mov      dword ptr [rbp-34H], r10d
        cmp      r9d, r10d
-       jae      G_M14222_IG20
+       jae      G_M14222_IG18
        mov      dword ptr [rbp-30H], r9d
        mov      esi, r9d
        lea      rsi, [rsi+4*rsi]
        lea      r11, bword ptr [rcx+4*rsi+10H]
        mov      bword ptr [rbp-50H], r11
        cmp      dword ptr [r11], r12d
-       jne      SHORT G_M14222_IG12
+       jne      SHORT G_M14222_IG10
 						;; size=42 bbWeight=4 PerfScore 48.00
 G_M14222_IG07:
        test     r14, r14
        je       SHORT G_M14222_IG08
        movzx    rsi, byte  ptr [r11+08H]
        mov      edx, r13d
        mov      rdi, r14
        mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
        call     [r11]System.Collections.Generic.IEqualityComparer`1[ubyte]:Equals(ubyte,ubyte):bool:this
-       jmp      SHORT G_M14222_IG10
+       jmp      SHORT G_M14222_IG09
 						;; size=31 bbWeight=2 PerfScore 18.00
 G_M14222_IG08:
        movzx    rdx, byte  ptr [r11+08H]
        cmp      edx, r13d
-       jne      SHORT G_M14222_IG12
-						;; size=10 bbWeight=2 PerfScore 6.50
+       sete     dl
+       movzx    rdx, dl
+       mov      eax, edx
+						;; size=16 bbWeight=2 PerfScore 7.50
 G_M14222_IG09:
-       jmp      SHORT G_M14222_IG15
-						;; size=2 bbWeight=0.50 PerfScore 1.00
-G_M14222_IG10:
        test     eax, eax
-       jne      SHORT G_M14222_IG15
-						;; size=4 bbWeight=2 PerfScore 2.50
-G_M14222_IG11:
        mov      r11, bword ptr [rbp-50H]
-						;; size=4 bbWeight=1 PerfScore 1.00
-G_M14222_IG12:
+       jne      SHORT G_M14222_IG13
+						;; size=8 bbWeight=2 PerfScore 4.50
+G_M14222_IG10:
        mov      r9d, dword ptr [rbp-30H]
        mov      r8d, r9d
        mov      r9d, dword ptr [r11+04H]
        inc      r15d
        cmp      dword ptr [rbp-34H], r15d
-       jb       G_M14222_IG19
+       jb       G_M14222_IG17
        test     r9d, r9d
        mov      dword ptr [rbp-2CH], r8d
        mov      rcx, gword ptr [rbp-48H]
        jge      G_M14222_IG06
 						;; size=41 bbWeight=4 PerfScore 39.00
-G_M14222_IG13:
+G_M14222_IG11:
        xor      eax, eax
 						;; size=2 bbWeight=0.50 PerfScore 0.12
-G_M14222_IG14:
+G_M14222_IG12:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M14222_IG15:
+G_M14222_IG13:
        mov      r8d, dword ptr [rbp-2CH]
        test     r8d, r8d
-       jge      SHORT G_M14222_IG16
-       mov      r11, bword ptr [rbp-50H]
+       jge      SHORT G_M14222_IG14
        mov      r8d, dword ptr [r11+04H]
        inc      r8d
-       mov      r15, bword ptr [rbp-40H]
-       mov      dword ptr [r15], r8d
-       jmp      SHORT G_M14222_IG17
-						;; size=29 bbWeight=0.50 PerfScore 4.75
-G_M14222_IG16:
+       mov      rax, bword ptr [rbp-40H]
+       mov      dword ptr [rax], r8d
+       jmp      SHORT G_M14222_IG15
+						;; size=25 bbWeight=0.50 PerfScore 4.25
+G_M14222_IG14:
        cmp      r8d, dword ptr [rbp-34H]
-       jae      SHORT G_M14222_IG20
+       jae      SHORT G_M14222_IG18
        mov      eax, r8d
        lea      rax, [rax+4*rax]
-       mov      r11, bword ptr [rbp-50H]
        mov      edx, dword ptr [r11+04H]
        mov      rcx, gword ptr [rbp-48H]
        mov      dword ptr [rcx+4*rax+14H], edx
-						;; size=29 bbWeight=0.50 PerfScore 4.38
-G_M14222_IG17:
+						;; size=25 bbWeight=0.50 PerfScore 3.88
+G_M14222_IG15:
        mov      eax, dword ptr [rbx+3CH]
        neg      eax
        add      eax, -3
        mov      dword ptr [r11+04H], eax
        mov      r9d, dword ptr [rbp-30H]
        mov      dword ptr [rbx+3CH], r9d
        inc      dword ptr [rbx+40H]
        mov      eax, 1
 						;; size=28 bbWeight=0.50 PerfScore 4.38
-G_M14222_IG18:
+G_M14222_IG16:
        add      rsp, 40
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=0.50 PerfScore 2.12
-G_M14222_IG19:
+G_M14222_IG17:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        call     [rax]System.ThrowHelper:ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
-G_M14222_IG20:
+G_M14222_IG18:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 430, prolog size 22, PerfScore 204.75, instruction count 127, allocated bytes for code 430 (MethodHash=5346c871) for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)
+; Total bytes of code 426, prolog size 22, PerfScore 204.35, instruction count 126, allocated bytes for code 426 (MethodHash=5346c871) for method System.Collections.Generic.Dictionary`2[ubyte,System.Nullable`1[int]]:Remove(ubyte):bool:this (FullOpts)

@MihuBot
Copy link
Owner Author

MihuBot commented Jul 5, 2023

@MichalPetryka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant