Skip to content

[JitDiff X64] [xtqqczze] Optimize logic in SliceLongerSpanToMatchShorterLength #1651

Open

Description

@MihuBot

Job completed in 17 minutes 9 seconds (remote runner delay: 59 seconds).
dotnet/runtime#121104

Diffs

Found 82 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 45957539
Total bytes of diff: 45956700
Total bytes of delta: -839 (-0.00 % of base)
Total relative delta: -3.29
    diff is an improvement.
    relative diff is an improvement.


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

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

Top method improvements (bytes):
        -143 (-42.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int (FullOpts)
        -101 (-26.58 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int (FullOpts)
         -67 (-18.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int (FullOpts)
         -66 (-38.37 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int (FullOpts)
         -62 (-35.43 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]):int (FullOpts)
         -58 (-17.68 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[double](System.ReadOnlySpan`1[double],System.ReadOnlySpan`1[double],System.Collections.Generic.IEqualityComparer`1[double]):int (FullOpts)
         -56 (-17.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[short](System.ReadOnlySpan`1[short],System.ReadOnlySpan`1[short],System.Collections.Generic.IEqualityComparer`1[short]):int (FullOpts)
         -55 (-17.08 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[byte](System.ReadOnlySpan`1[byte],System.ReadOnlySpan`1[byte],System.Collections.Generic.IEqualityComparer`1[byte]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[int](System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[int],System.Collections.Generic.IEqualityComparer`1[int]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[long](System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long],System.Collections.Generic.IEqualityComparer`1[long]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]):int (FullOpts)
         -53 (-39.55 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[double](System.ReadOnlySpan`1[double],System.ReadOnlySpan`1[double]):int (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[double](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[int](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[long](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[short](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.__Canon](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.Nullable`1[int]](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.Numerics.Vector`1[float]](byref,byref) (FullOpts)

Top method improvements (percentages):
        -143 (-42.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int (FullOpts)
         -53 (-39.55 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[double](System.ReadOnlySpan`1[double],System.ReadOnlySpan`1[double]):int (FullOpts)
         -66 (-38.37 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int (FullOpts)
         -62 (-35.43 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]):int (FullOpts)
        -101 (-26.58 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int (FullOpts)
         -67 (-18.31 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int (FullOpts)
         -58 (-17.68 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[double](System.ReadOnlySpan`1[double],System.ReadOnlySpan`1[double],System.Collections.Generic.IEqualityComparer`1[double]):int (FullOpts)
         -56 (-17.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[short](System.ReadOnlySpan`1[short],System.ReadOnlySpan`1[short],System.Collections.Generic.IEqualityComparer`1[short]):int (FullOpts)
         -55 (-17.08 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[byte](System.ReadOnlySpan`1[byte],System.ReadOnlySpan`1[byte],System.Collections.Generic.IEqualityComparer`1[byte]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[int](System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[int],System.Collections.Generic.IEqualityComparer`1[int]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[long](System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long],System.Collections.Generic.IEqualityComparer`1[long]):int (FullOpts)
         -54 (-16.88 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]],System.Collections.Generic.IEqualityComparer`1[System.Nullable`1[int]]):int (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[double](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[int](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[long](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[short](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.__Canon](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.Nullable`1[int]](byref,byref) (FullOpts)
          -2 (-3.28 % of base) : System.Private.CoreLib.dasm - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[System.Numerics.Vector`1[float]](byref,byref) (FullOpts)

20 total methods with Code Size differences (20 improved, 0 regressed), 283121 unchanged.

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

Artifacts:

Activity

  1. MihuBot commented on Nov 29, 2025

    @MihuBot
    OwnerAuthor

    Top method improvements

    -143 (-42.31 % of base) - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int
     ; Assembly listing for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int (FullOpts)
     ; Emitting BLENDED_CODE for generic X64 + VEX + EVEX on Unix
     ; FullOpts code
     ; optimized code
     ; rbp based frame
     ; partially interruptible
     ; No PGO data
     ; 0 inlinees with PGO data; 6 single block inlinees; 4 inlinees without PGO data
     ; Final local variable assignments
     ;
    -;  V00 TypeCtx      [V00,T08] (  7,  3.65)    long  ->  r12         single-def
    +;  V00 TypeCtx      [V00,T08] (  5,  3.60)    long  ->  rdi         single-def
     ;* V01 arg0         [V01    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.__Canon]>
     ;* V02 arg1         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.__Canon]>
     ;* V03 loc0         [V03    ] (  0,  0   )    long  ->  zero-ref   
     ;* V04 loc1         [V04    ] (  0,  0   )    long  ->  zero-ref   
    -;  V05 loc2         [V05,T01] ( 12, 17.58)     int  ->  [rbp-0x34] 
    +;  V05 loc2         [V05,T01] (  6, 17.34)     int  ->  r13        
     ;# V06 OutArgs      [V06    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <Empty>
     ;* V07 tmp1         [V07    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V08 tmp2         [V08    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V09 tmp3         [V09    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V10 tmp4         [V10    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V11 tmp5         [V11    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V12 tmp6         [V12    ] (  0,  0   )   byref  ->  zero-ref    "impAppendStmt"
     ;* V13 tmp7         [V13    ] (  0,  0   )    long  ->  zero-ref    "Inline return value spill temp"
     ;* V14 tmp8         [V14    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V15 tmp9         [V15    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V16 tmp10        [V16    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V17 tmp11        [V17    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V18 tmp12        [V18    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V19 tmp13        [V19    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V20 tmp14        [V20    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V21 tmp15        [V21    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V22 tmp16        [V22    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V23 tmp17        [V23    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V24 tmp18        [V24    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V25 tmp19        [V25    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V26 tmp20        [V26    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V27 tmp21        [V27    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V28 tmp22        [V28    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V29 tmp23        [V29    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
    -;  V30 tmp24        [V30,T05] (  5,  6   )   byref  ->  r15         "field V01._reference (fldOffset=0x0)" P-INDEP
    -;  V31 tmp25        [V31,T04] ( 10,  9.50)     int  ->  rbx         "field V01._length (fldOffset=0x8)" P-INDEP
    -;  V32 tmp26        [V32,T06] (  5,  6   )   byref  ->  r14         "field V02._reference (fldOffset=0x0)" P-INDEP
    -;  V33 tmp27        [V33,T07] (  7,  4.04)     int  ->  r13         "field V02._length (fldOffset=0x8)" P-INDEP
    +;  V30 tmp24        [V30,T05] (  4,  6.96)   byref  ->  r15         "field V01._reference (fldOffset=0x0)" P-INDEP
    +;  V31 tmp25        [V31,T04] (  7,  8.96)     int  ->  rbx         "field V01._length (fldOffset=0x8)" P-INDEP
    +;  V32 tmp26        [V32,T06] (  4,  5.96)   byref  ->  r14         "field V02._reference (fldOffset=0x0)" P-INDEP
    +;  V33 tmp27        [V33,T07] (  6,  5.50)     int  ->   r8         "field V02._length (fldOffset=0x8)" P-INDEP
     ;* V34 tmp28        [V34    ] (  0,  0   )   byref  ->  zero-ref    "field V16._reference (fldOffset=0x0)" P-INDEP
     ;* V35 tmp29        [V35    ] (  0,  0   )     int  ->  zero-ref    "field V16._length (fldOffset=0x8)" P-INDEP
     ;* V36 tmp30        [V36    ] (  0,  0   )   byref  ->  zero-ref    "field V17._reference (fldOffset=0x0)" P-INDEP
     ;* V37 tmp31        [V37    ] (  0,  0   )     int  ->  zero-ref    "field V17._length (fldOffset=0x8)" P-INDEP
    -;  V38 tmp32        [V38,T12] (  2,  1   )   byref  ->  r14         single-def "field V22._reference (fldOffset=0x0)" P-INDEP
    +;  V38 tmp32        [V38,T13] (  2,  1   )   byref  ->  r14         single-def "field V22._reference (fldOffset=0x0)" P-INDEP
     ;* V39 tmp33        [V39    ] (  0,  0   )     int  ->  zero-ref    "field V22._length (fldOffset=0x8)" P-INDEP
    -;  V40 tmp34        [V40,T13] (  2,  1   )   byref  ->  r15         single-def "field V26._reference (fldOffset=0x0)" P-INDEP
    +;  V40 tmp34        [V40,T12] (  2,  2   )   byref  ->  r15         single-def "field V26._reference (fldOffset=0x0)" P-INDEP
     ;* V41 tmp35        [V41    ] (  0,  0   )     int  ->  zero-ref    "field V26._length (fldOffset=0x8)" P-INDEP
    -;  V42 tmp36        [V42,T00] (  6, 24   )     ref  ->  rdi         "argument with side effect"
    -;  V43 tmp37        [V43,T02] (  4, 16   )     ref  ->  rsi         "argument with side effect"
    -;  V44 cse0         [V44,T09] (  4,  4.54)    long  ->  registers   hoist multi-def "CSE #01: moderate"
    +;  V42 tmp36        [V42,T00] (  3, 23.76)     ref  ->  rdi         "argument with side effect"
    +;  V43 tmp37        [V43,T02] (  2, 15.84)     ref  ->  rsi         "argument with side effect"
    +;  V44 cse0         [V44,T09] (  2,  4.46)    long  ->  r12         hoist "CSE #01: moderate"
     ;  V45 cse1         [V45,T03] (  3, 11.88)    long  ->  rdx         "CSE #02: aggressive"
    -;  V46 rat0         [V46,T11] (  3,  2   )    long  ->  r13         "runtime lookup"
    -;  V47 rat1         [V47,T10] (  3,  2.80)    long  ->  r13         "fgMakeTemp is creating a new local variable"
    -;  V48 rat2         [V48,T15] (  3,  0.16)    long  ->  rcx         "runtime lookup"
    -;  V49 rat3         [V49,T14] (  3,  0.22)    long  ->  rcx         "fgMakeTemp is creating a new local variable"
    +;  V46 rat0         [V46,T11] (  3,  2   )    long  ->  r12         "runtime lookup"
    +;  V47 rat1         [V47,T10] (  3,  2.80)    long  ->  r12         "fgMakeTemp is creating a new local variable"
     ;
    -; Lcl frame size = 24
    +; Lcl frame size = 8
     
     G_M24901_IG01:
            push     rbp
            push     r15
            push     r14
            push     r13
            push     r12
            push     rbx
    -       sub      rsp, 24
    -       lea      rbp, [rsp+0x40]
    +       push     rax
    +       lea      rbp, [rsp+0x30]
            mov      qword ptr [rbp-0x30], rdi
    -       mov      r12, rdi
            mov      r15, rsi
            mov      ebx, edx
            mov      r14, rcx
    -       mov      r13d, r8d
    -						;; size=37 bbWeight=1 PerfScore 9.00
    +						;; size=28 bbWeight=1 PerfScore 9.25
     G_M24901_IG02:
    -       cmp      r13d, ebx
    -       jg       SHORT G_M24901_IG04
    +       cmp      r8d, ebx
    +       jle      SHORT G_M24901_IG04
     						;; size=5 bbWeight=1 PerfScore 1.25
     G_M24901_IG03:
    -       cmp      ebx, r13d
    -       jle      SHORT G_M24901_IG05
    -       mov      ebx, r13d
    -       jmp      SHORT G_M24901_IG05
    -						;; size=10 bbWeight=0.50 PerfScore 1.75
    -G_M24901_IG04:
    -       mov      r13d, ebx
    +       mov      r8d, ebx
     						;; size=3 bbWeight=0.50 PerfScore 0.12
    +G_M24901_IG04:
    +       cmp      r8d, ebx
    +       jg       G_M24901_IG13
    +       mov      ebx, r8d
    +       xor      r13d, r13d
    +       test     r8d, r8d
    +       jle      SHORT G_M24901_IG11
    +						;; size=20 bbWeight=1 PerfScore 3.00
     G_M24901_IG05:
    -       xor      eax, eax
    -       mov      dword ptr [rbp-0x34], eax
    -       test     ebx, ebx
    -       jle      SHORT G_M24901_IG08
    -						;; size=9 bbWeight=1 PerfScore 2.50
    +       mov      rsi, qword ptr [rdi+0x18]
    +       mov      r12, qword ptr [rsi+0x20]
    +       test     r12, r12
    +       je       SHORT G_M24901_IG09
    +						;; size=13 bbWeight=0.50 PerfScore 2.62
     G_M24901_IG06:
    -       cmp      ebx, r13d
    -       jg       SHORT G_M24901_IG11
    -       mov      rdi, qword ptr [r12+0x18]
    -       mov      r13, qword ptr [rdi+0x20]
    -       test     r13, r13
    -       je       G_M24901_IG16
    -						;; size=23 bbWeight=0.50 PerfScore 3.25
    -G_M24901_IG07:
    -       mov      rdi, r13
    -       mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_GET_GCSTATIC_BASE
    -       call     [rcx]CORINFO_HELP_GET_GCSTATIC_BASE
    +       mov      rdi, r12
    +       mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_GET_GCSTATIC_BASE
    +       call     [rax]CORINFO_HELP_GET_GCSTATIC_BASE
            mov      rdi, gword ptr [rax]
    -       mov      r12d, dword ptr [rbp-0x34]
    -       mov      edx, r12d
    +       mov      edx, r13d
            mov      rsi, gword ptr [r15+8*rdx]
            mov      rdx, gword ptr [r14+8*rdx]
            mov      rax, qword ptr [rdi]
            mov      rax, qword ptr [rax+0x40]
            call     [rax+0x20]System.Collections.Generic.EqualityComparer`1[System.__Canon]:Equals(System.__Canon,System.__Canon):bool:this
            test     eax, eax
    -       je       SHORT G_M24901_IG14
    -       inc      r12d
    -       mov      dword ptr [rbp-0x34], r12d
    -       cmp      r12d, ebx
    -       jl       SHORT G_M24901_IG07
    -						;; size=59 bbWeight=3.96 PerfScore 85.14
    +       jne      SHORT G_M24901_IG10
    +						;; size=43 bbWeight=3.96 PerfScore 71.28
    +G_M24901_IG07:
    +       mov      eax, r13d
    +						;; size=3 bbWeight=0.50 PerfScore 0.12
     G_M24901_IG08:
    +       add      rsp, 8
    +       pop      rbx
    +       pop      r12
    +       pop      r13
    +       pop      r14
    +       pop      r15
    +       pop      rbp
    +       ret      
    +						;; size=15 bbWeight=0.50 PerfScore 2.12
    +G_M24901_IG09:
    +       mov      rsi, 0xD1FFAB1E      ; global ptr
    +       mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
    +       call     [rax]CORINFO_HELP_RUNTIMEHANDLE_METHOD
    +       mov      r12, rax
    +       jmp      SHORT G_M24901_IG06
    +						;; size=27 bbWeight=0.10 PerfScore 0.58
    +G_M24901_IG10:
    +       inc      r13d
    +       cmp      r13d, ebx
    +       jl       SHORT G_M24901_IG06
    +						;; size=8 bbWeight=3.96 PerfScore 5.94
    +G_M24901_IG11:
            mov      eax, ebx
     						;; size=2 bbWeight=0.50 PerfScore 0.12
    -G_M24901_IG09:
    -       add      rsp, 24
    -       pop      rbx
    -       pop      r12
    -       pop      r13
    -       pop      r14
    -       pop      r15
    -       pop      rbp
    -       ret      
    -						;; size=15 bbWeight=0.50 PerfScore 2.12
    -G_M24901_IG10:
    -       mov      ecx, dword ptr [rbp-0x34]
    -       inc      ecx
    -       cmp      ecx, ebx
    -       mov      dword ptr [rbp-0x34], ecx
    -       jge      SHORT G_M24901_IG08
    -						;; size=12 bbWeight=0.04 PerfScore 0.14
    -G_M24901_IG11:
    -       mov      rdi, qword ptr [r12+0x18]
    -       mov      rcx, qword ptr [rdi+0x20]
    -       test     rcx, rcx
    -       je       SHORT G_M24901_IG17
    -						;; size=14 bbWeight=0.04 PerfScore 0.21
     G_M24901_IG12:
    -       mov      rdi, rcx
    -       mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_GET_GCSTATIC_BASE
    -       call     [rcx]CORINFO_HELP_GET_GCSTATIC_BASE
    -       mov      rdi, gword ptr [rax]
    -       mov      eax, dword ptr [rbp-0x34]
    -       mov      esi, eax
    -       mov      rsi, gword ptr [r15+8*rsi]
    -       cmp      eax, r13d
    -       jae      SHORT G_M24901_IG18
    -       mov      dword ptr [rbp-0x34], eax
    -       mov      edx, eax
    -       mov      rdx, gword ptr [r14+8*rdx]
    -       mov      rcx, qword ptr [rdi]
    -       mov      rcx, qword ptr [rcx+0x40]
    -       call     [rcx+0x20]System.Collections.Generic.EqualityComparer`1[System.__Canon]:Equals(System.__Canon,System.__Canon):bool:this
    -       test     eax, eax
    -       jne      SHORT G_M24901_IG10
    -						;; size=55 bbWeight=0.04 PerfScore 0.86
    -G_M24901_IG13:
    -       mov      r12d, dword ptr [rbp-0x34]
    -						;; size=4 bbWeight=0.02 PerfScore 0.02
    -G_M24901_IG14:
    -       mov      eax, r12d
    -						;; size=3 bbWeight=0.50 PerfScore 0.12
    -G_M24901_IG15:
    -       add      rsp, 24
    +       add      rsp, 8
            pop      rbx
            pop      r12
            pop      r13
            pop      r14
            pop      r15
            pop      rbp
            ret      
     						;; size=15 bbWeight=0.50 PerfScore 2.12
    -G_M24901_IG16:
    -       mov      rdi, r12
    -       mov      rsi, 0xD1FFAB1E      ; global ptr
    -       mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       call     [rcx]CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       mov      r13, rax
    -       jmp      G_M24901_IG07
    -						;; size=33 bbWeight=0.10 PerfScore 0.60
    -G_M24901_IG17:
    -       mov      rdi, r12
    -       mov      rsi, 0xD1FFAB1E      ; global ptr
    -       mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       call     [rcx]CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       mov      rcx, rax
    -       jmp      G_M24901_IG12
    -						;; size=33 bbWeight=0.01 PerfScore 0.05
    -G_M24901_IG18:
    -       call     CORINFO_HELP_RNGCHKFAIL
    +G_M24901_IG13:
    +       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
    +       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
            int3     
    -						;; size=6 bbWeight=0 PerfScore 0.00
    +						;; size=13 bbWeight=0 PerfScore 0.00
     
    -; Total bytes of code 338, prolog size 23, PerfScore 109.39, instruction count 107, allocated bytes for code 338 (MethodHash=81ba9eba) for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int (FullOpts)
    +; Total bytes of code 195, prolog size 20, PerfScore 98.54, instruction count 66, allocated bytes for code 195 (MethodHash=81ba9eba) for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon]):int (FullOpts)
     ; ============================================================
    -101 (-26.58 % of base) - System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int
     ; Assembly listing for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int (FullOpts)
     ; Emitting BLENDED_CODE for generic X64 + VEX + EVEX on Unix
     ; FullOpts code
     ; optimized code
     ; rbp based frame
     ; partially interruptible
     ; No PGO data
     ; 0 inlinees with PGO data; 3 single block inlinees; 3 inlinees without PGO data
     ; Final local variable assignments
     ;
    -;  V00 TypeCtx      [V00,T08] (  9,  4.25)    long  ->  r12         single-def
    +;  V00 TypeCtx      [V00,T09] (  7,  4.20)    long  ->  [rbp-0x38]  single-def
     ;* V01 arg0         [V01    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.__Canon]>
     ;* V02 arg1         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.__Canon]>
    -;  V03 arg2         [V03,T05] (  6,  7.50)     ref  ->  r15         class-hnd <System.Collections.Generic.IEqualityComparer`1[System.__Canon]>
    -;  V04 loc0         [V04,T01] ( 12, 17.58)     int  ->  [rbp-0x34] 
    +;  V03 arg2         [V03,T05] (  5,  7.46)     ref  ->  r15         class-hnd <System.Collections.Generic.IEqualityComparer`1[System.__Canon]>
    +;  V04 loc0         [V04,T01] (  6, 17.34)     int  ->  [rbp-0x3C] 
     ;# V05 OutArgs      [V05    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <Empty>
     ;* V06 tmp1         [V06    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
    -;  V07 tmp2         [V07,T00] (  6, 24   )    long  ->  r11         "spilling helperCall"
    +;  V07 tmp2         [V07,T00] (  3, 23.76)    long  ->  r11         "spilling helperCall"
     ;* V08 tmp3         [V08    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V09 tmp4         [V09    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V10 tmp5         [V10    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V11 tmp6         [V11    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
     ;* V12 tmp7         [V12    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V13 tmp8         [V13    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V14 tmp9         [V14    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V15 tmp10        [V15    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V16 tmp11        [V16    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V17 tmp12        [V17    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.__Canon]>
     ;* V18 tmp13        [V18    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V19 tmp14        [V19    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V20 tmp15        [V20    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
    -;  V21 tmp16        [V21,T06] (  5,  6   )   byref  ->  r14         "field V01._reference (fldOffset=0x0)" P-INDEP
    -;  V22 tmp17        [V22,T04] ( 10,  9.50)     int  ->  rbx         "field V01._length (fldOffset=0x8)" P-INDEP
    -;  V23 tmp18        [V23,T07] (  5,  6   )   byref  ->  r13         "field V02._reference (fldOffset=0x0)" P-INDEP
    -;  V24 tmp19        [V24,T09] (  7,  4.04)     int  ->  [rbp-0x38]  "field V02._length (fldOffset=0x8)" P-INDEP
    -;  V25 tmp20        [V25,T15] (  2,  1   )   byref  ->  r13         single-def "field V13._reference (fldOffset=0x0)" P-INDEP
    +;  V21 tmp16        [V21,T06] (  4,  6.96)   byref  ->  r14         "field V01._reference (fldOffset=0x0)" P-INDEP
    +;  V22 tmp17        [V22,T04] (  7,  8.96)     int  ->  rbx         "field V01._length (fldOffset=0x8)" P-INDEP
    +;  V23 tmp18        [V23,T07] (  4,  5.96)   byref  ->  r13         "field V02._reference (fldOffset=0x0)" P-INDEP
    +;  V24 tmp19        [V24,T08] (  6,  5.50)     int  ->  r12         "field V02._length (fldOffset=0x8)" P-INDEP
    +;  V25 tmp20        [V25,T16] (  2,  1   )   byref  ->  r13         single-def "field V13._reference (fldOffset=0x0)" P-INDEP
     ;* V26 tmp21        [V26    ] (  0,  0   )     int  ->  zero-ref    "field V13._length (fldOffset=0x8)" P-INDEP
    -;  V27 tmp22        [V27,T16] (  2,  1   )   byref  ->  r14         single-def "field V17._reference (fldOffset=0x0)" P-INDEP
    +;  V27 tmp22        [V27,T15] (  2,  2   )   byref  ->  r14         single-def "field V17._reference (fldOffset=0x0)" P-INDEP
     ;* V28 tmp23        [V28    ] (  0,  0   )     int  ->  zero-ref    "field V17._length (fldOffset=0x8)" P-INDEP
    -;  V29 tmp24        [V29,T02] (  4, 16   )     ref  ->  rsi         "argument with side effect"
    -;  V30 cse0         [V30,T10] (  4,  4.54)    long  ->  registers   hoist multi-def "CSE #01: moderate"
    +;  V29 tmp24        [V29,T02] (  2, 15.84)     ref  ->  rsi         "argument with side effect"
    +;  V30 cse0         [V30,T10] (  2,  4.46)    long  ->  r12         hoist "CSE #01: moderate"
     ;  V31 cse1         [V31,T03] (  3, 11.88)    long  ->  rdx         "CSE #02: aggressive"
     ;  V32 rat0         [V32,T13] (  3,  2   )    long  ->  rdi         "runtime lookup"
     ;  V33 rat1         [V33,T11] (  3,  2.80)    long  ->  rdi         "fgMakeTemp is creating a new local variable"
     ;  V34 rat2         [V34,T14] (  3,  2   )    long  ->  r12         "runtime lookup"
    -;  V35 rat3         [V35,T12] (  3,  2.80)    long  ->  rax         "fgMakeTemp is creating a new local variable"
    -;  V36 rat4         [V36,T18] (  3,  0.16)    long  ->  rdx         "runtime lookup"
    -;  V37 rat5         [V37,T17] (  3,  0.22)    long  ->  rdx         "fgMakeTemp is creating a new local variable"
    +;  V35 rat3         [V35,T12] (  3,  2.80)    long  ->  r12         "fgMakeTemp is creating a new local variable"
     ;
     ; Lcl frame size = 24
     
     G_M28531_IG01:
            push     rbp
            push     r15
            push     r14
            push     r13
            push     r12
            push     rbx
            sub      rsp, 24
            lea      rbp, [rsp+0x40]
            mov      qword ptr [rbp-0x30], rdi
    -       mov      r12, rdi
    +       mov      rax, rdi
            mov      r14, rsi
            mov      ebx, edx
            mov      r13, rcx
    -       mov      eax, r8d
    +       mov      r12d, r8d
            mov      r15, r9
     						;; size=40 bbWeight=1 PerfScore 9.25
     G_M28531_IG02:
    -       cmp      eax, ebx
    -       jg       SHORT G_M28531_IG06
    -						;; size=4 bbWeight=1 PerfScore 1.25
    -G_M28531_IG03:
    -       cmp      ebx, eax
    -       jg       SHORT G_M28531_IG05
    -						;; size=4 bbWeight=0.50 PerfScore 0.62
    -G_M28531_IG04:
    -       mov      dword ptr [rbp-0x38], eax
    -       jmp      SHORT G_M28531_IG07
    -						;; size=5 bbWeight=0.25 PerfScore 0.75
    -G_M28531_IG05:
    -       mov      ebx, eax
    -       mov      dword ptr [rbp-0x38], eax
    -       jmp      SHORT G_M28531_IG07
    -						;; size=7 bbWeight=0.50 PerfScore 1.62
    -G_M28531_IG06:
    -       mov      dword ptr [rbp-0x38], ebx
    -						;; size=3 bbWeight=0.50 PerfScore 0.50
    -G_M28531_IG07:
    -       test     r15, r15
    -       jne      SHORT G_M28531_IG10
    +       cmp      r12d, ebx
    +       jle      SHORT G_M28531_IG04
     						;; size=5 bbWeight=1 PerfScore 1.25
    -G_M28531_IG08:
    -       mov      rdi, qword ptr [r12+0x18]
    +G_M28531_IG03:
    +       mov      r12d, ebx
    +						;; size=3 bbWeight=0.50 PerfScore 0.12
    +G_M28531_IG04:
    +       cmp      r12d, ebx
    +       jg       G_M28531_IG18
    +       mov      ebx, r12d
    +       test     r15, r15
    +       jne      SHORT G_M28531_IG08
    +						;; size=17 bbWeight=1 PerfScore 2.75
    +G_M28531_IG05:
    +       mov      rdi, qword ptr [rax+0x18]
            mov      rdi, qword ptr [rdi+0x20]
            test     rdi, rdi
    -       je       SHORT G_M28531_IG17
    -						;; size=14 bbWeight=0.50 PerfScore 2.62
    -G_M28531_IG09:
    +       je       SHORT G_M28531_IG13
    +						;; size=13 bbWeight=0.50 PerfScore 2.62
    +G_M28531_IG06:
    +       mov      qword ptr [rbp-0x38], rax
    +						;; size=4 bbWeight=0.40 PerfScore 0.40
    +G_M28531_IG07:
            mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_GET_GCSTATIC_BASE
            call     [rcx]CORINFO_HELP_GET_GCSTATIC_BASE
            mov      r15, gword ptr [rax]
    -						;; size=15 bbWeight=0.50 PerfScore 2.62
    -G_M28531_IG10:
    +       mov      rax, qword ptr [rbp-0x38]
    +						;; size=19 bbWeight=0.50 PerfScore 3.12
    +G_M28531_IG08:
            xor      ecx, ecx
    -       mov      dword ptr [rbp-0x34], ecx
    -       test     ebx, ebx
    -       jle      G_M28531_IG20
    -						;; size=13 bbWeight=1 PerfScore 2.50
    -G_M28531_IG11:
    -       cmp      ebx, dword ptr [rbp-0x38]
    -       jg       G_M28531_IG23
    -       mov      rdi, qword ptr [r12+0x18]
    -       mov      rax, qword ptr [rdi+0x18]
    -       test     rax, rax
    -       je       SHORT G_M28531_IG18
    -						;; size=23 bbWeight=0.50 PerfScore 4.12
    -G_M28531_IG12:
    -       mov      r12, rax
    -						;; size=3 bbWeight=0.40 PerfScore 0.10
    -G_M28531_IG13:
    +       mov      dword ptr [rbp-0x3C], ecx
    +       test     r12d, r12d
    +       jle      G_M28531_IG16
    +						;; size=14 bbWeight=1 PerfScore 2.50
    +G_M28531_IG09:
    +       mov      rdi, qword ptr [rax+0x18]
    +       mov      r12, qword ptr [rdi+0x18]
    +       test     r12, r12
    +       je       SHORT G_M28531_IG14
    +						;; size=13 bbWeight=0.50 PerfScore 2.62
    +G_M28531_IG10:
            mov      r11, r12
    -       mov      edx, dword ptr [rbp-0x34]
    +       mov      edx, dword ptr [rbp-0x3C]
            mov      rsi, gword ptr [r14+8*rdx]
            mov      rdx, gword ptr [r13+8*rdx]
            mov      rdi, r15
            call     [r11]
            test     eax, eax
    -       jne      SHORT G_M28531_IG19
    +       jne      SHORT G_M28531_IG15
     						;; size=25 bbWeight=3.96 PerfScore 38.61
    -G_M28531_IG14:
    -       mov      ecx, dword ptr [rbp-0x34]
    -						;; size=3 bbWeight=1.98 PerfScore 1.98
    -G_M28531_IG15:
    +G_M28531_IG11:
    +       mov      ecx, dword ptr [rbp-0x3C]
            mov      eax, ecx
    -						;; size=2 bbWeight=0.50 PerfScore 0.12
    -G_M28531_IG16:
    +						;; size=5 bbWeight=0.50 PerfScore 0.62
    +G_M28531_IG12:
            add      rsp, 24
            pop      rbx
            pop      r12
            pop      r13
            pop      r14
            pop      r15
            pop      rbp
            ret      
     						;; size=15 bbWeight=0.50 PerfScore 2.12
    -G_M28531_IG17:
    -       mov      rdi, r12
    +G_M28531_IG13:
    +       mov      qword ptr [rbp-0x38], rax
    +       mov      rdi, rax
            mov      rsi, 0xD1FFAB1E      ; global ptr
            mov      rcx, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
            call     [rcx]CORINFO_HELP_RUNTIMEHANDLE_METHOD
            mov      rdi, rax
    -       jmp      G_M28531_IG09
    -						;; size=33 bbWeight=0.10 PerfScore 0.60
    -G_M28531_IG18:
    -       mov      rdi, r12
    +       jmp      SHORT G_M28531_IG07
    +						;; size=34 bbWeight=0.10 PerfScore 0.70
    +G_M28531_IG14:
    +       mov      rdi, rax
            mov      rsi, 0xD1FFAB1E      ; global ptr
            mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
            call     [rax]CORINFO_HELP_RUNTIMEHANDLE_METHOD
            mov      r12, rax
    -       jmp      SHORT G_M28531_IG13
    +       jmp      SHORT G_M28531_IG10
     						;; size=30 bbWeight=0.10 PerfScore 0.60
    -G_M28531_IG19:
    -       mov      ecx, dword ptr [rbp-0x34]
    +G_M28531_IG15:
    +       mov      ecx, dword ptr [rbp-0x3C]
            inc      ecx
    -       mov      dword ptr [rbp-0x34], ecx
            cmp      ecx, ebx
    -       jl       SHORT G_M28531_IG13
    +       mov      dword ptr [rbp-0x3C], ecx
    +       jl       SHORT G_M28531_IG10
     						;; size=12 bbWeight=3.96 PerfScore 13.86
    -G_M28531_IG20:
    +G_M28531_IG16:
            mov      eax, ebx
     						;; size=2 bbWeight=0.50 PerfScore 0.12
    -G_M28531_IG21:
    +G_M28531_IG17:
            add      rsp, 24
            pop      rbx
            pop      r12
            pop      r13
            pop      r14
            pop      r15
            pop      rbp
            ret      
     						;; size=15 bbWeight=0.50 PerfScore 2.12
    -G_M28531_IG22:
    -       mov      ecx, dword ptr [rbp-0x34]
    -       inc      ecx
    -       cmp      ecx, ebx
    -       mov      dword ptr [rbp-0x34], ecx
    -       jge      SHORT G_M28531_IG20
    -						;; size=12 bbWeight=0.04 PerfScore 0.14
    -G_M28531_IG23:
    -       mov      rdi, qword ptr [r12+0x18]
    -       mov      rdx, qword ptr [rdi+0x18]
    -       test     rdx, rdx
    -       je       SHORT G_M28531_IG26
    -						;; size=14 bbWeight=0.04 PerfScore 0.21
    -G_M28531_IG24:
    -       mov      r11, rdx
    -       mov      ecx, dword ptr [rbp-0x34]
    -       mov      esi, ecx
    -       mov      rsi, gword ptr [r14+8*rsi]
    -       cmp      ecx, dword ptr [rbp-0x38]
    -       jae      SHORT G_M28531_IG27
    -       mov      dword ptr [rbp-0x34], ecx
    -       mov      edx, ecx
    -       mov      rdx, gword ptr [r13+8*rdx]
    -       mov      rdi, r15
    -       call     [r11]
    -       test     eax, eax
    -       jne      SHORT G_M28531_IG22
    -						;; size=37 bbWeight=0.04 PerfScore 0.57
    -G_M28531_IG25:
    -       mov      ecx, dword ptr [rbp-0x34]
    -       jmp      G_M28531_IG15
    -						;; size=8 bbWeight=0.02 PerfScore 0.06
    -G_M28531_IG26:
    -       mov      rdi, r12
    -       mov      rsi, 0xD1FFAB1E      ; global ptr
    -       mov      rdx, 0xD1FFAB1E      ; code for CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       call     [rdx]CORINFO_HELP_RUNTIMEHANDLE_METHOD
    -       mov      rdx, rax
    -       jmp      SHORT G_M28531_IG24
    -						;; size=30 bbWeight=0.01 PerfScore 0.05
    -G_M28531_IG27:
    -       call     CORINFO_HELP_RNGCHKFAIL
    +G_M28531_IG18:
    +       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
    +       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
            int3     
    -						;; size=6 bbWeight=0 PerfScore 0.00
    +						;; size=13 bbWeight=0 PerfScore 0.00
     
    -; Total bytes of code 380, prolog size 23, PerfScore 88.40, instruction count 121, allocated bytes for code 380 (MethodHash=5711908c) for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int (FullOpts)
    +; Total bytes of code 279, prolog size 23, PerfScore 83.42, instruction count 88, allocated bytes for code 279 (MethodHash=5711908c) for method System.MemoryExtensions:CommonPrefixLength[System.__Canon](System.ReadOnlySpan`1[System.__Canon],System.ReadOnlySpan`1[System.__Canon],System.Collections.Generic.IEqualityComparer`1[System.__Canon]):int (FullOpts)
     ; ============================================================
    -67 (-18.31 % of base) - System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int
     ; Assembly listing for method System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int (FullOpts)
     ; Emitting BLENDED_CODE for generic X64 + VEX + EVEX on Unix
     ; FullOpts code
     ; optimized code
     ; rbp based frame
     ; fully interruptible
     ; No PGO data
     ; 0 inlinees with PGO data; 4 single block inlinees; 3 inlinees without PGO data
     ; Final local variable assignments
     ;
     ;* V00 arg0         [V00    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]>
     ;* V01 arg1         [V01    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]>
    -;  V02 arg2         [V02,T03] (  6,  7.50)     ref  ->  r15         class-hnd single-def <System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]>
    -;  V03 loc0         [V03,T00] ( 11, 17.04)     int  ->  [rbp-0x2C] 
    +;  V02 arg2         [V02,T03] (  5,  7.46)     ref  ->  r15         class-hnd single-def <System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]>
    +;  V03 loc0         [V03,T07] (  2,  1   )     int  ->  rax        
     ;  V04 OutArgs      [V04    ] (  1,  1   )  struct (64) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <UNNAMED>
     ;* V05 tmp1         [V05    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]>
     ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V08 tmp4         [V08    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V09 tmp5         [V09    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]>
     ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
    -;  V11 tmp7         [V11,T04] (  6,  6.50)   byref  ->  r14         "field V00._reference (fldOffset=0x0)" P-INDEP
    -;  V12 tmp8         [V12,T02] ( 11,  9   )     int  ->  rbx         "field V00._length (fldOffset=0x8)" P-INDEP
    -;  V13 tmp9         [V13,T05] (  6,  6.50)   byref  ->  r13         "field V01._reference (fldOffset=0x0)" P-INDEP
    -;  V14 tmp10        [V14,T06] (  8,  4.04)     int  ->  r12         "field V01._length (fldOffset=0x8)" P-INDEP
    -;  V15 tmp11        [V15,T07] (  2,  1   )   byref  ->  r13         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
    +;  V11 tmp7         [V11,T04] (  5,  6.46)   byref  ->  r14         "field V00._reference (fldOffset=0x0)" P-INDEP
    +;  V12 tmp8         [V12,T02] (  8,  7.96)     int  ->  rbx         "field V00._length (fldOffset=0x8)" P-INDEP
    +;  V13 tmp9         [V13,T05] (  5,  6.46)   byref  ->  r13         "field V01._reference (fldOffset=0x0)" P-INDEP
    +;  V14 tmp10        [V14,T06] (  7,  4   )     int  ->  r12         "field V01._length (fldOffset=0x8)" P-INDEP
    +;  V15 tmp11        [V15,T08] (  2,  1   )   byref  ->  r13         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
     ;* V16 tmp12        [V16    ] (  0,  0   )     int  ->  zero-ref    "field V06._length (fldOffset=0x8)" P-INDEP
    -;  V17 tmp13        [V17,T08] (  2,  1   )   byref  ->  r14         single-def "field V09._reference (fldOffset=0x0)" P-INDEP
    +;  V17 tmp13        [V17,T09] (  2,  1   )   byref  ->  r14         single-def "field V09._reference (fldOffset=0x0)" P-INDEP
     ;* V18 tmp14        [V18    ] (  0,  0   )     int  ->  zero-ref    "field V09._length (fldOffset=0x8)" P-INDEP
    -;  V19 tmp15        [V19,T10] (  4, 16   )  simd32  ->  mm0         "argument with side effect"
    +;  V19 tmp15        [V19,T10] (  2, 15.84)  simd32  ->  mm0         "argument with side effect"
     ;  V20 cse0         [V20,T01] (  3, 11.88)    long  ->  rdi         "CSE #02: aggressive"
    -;  V21 cse1         [V21,T09] (  3,  0.12)    long  ->  rdi         "CSE #04: conservative"
    +;  V21 rat0         [V21,T00] (  6, 16.84)    long  ->  [rbp-0x30]  "Widened IV V03"
     ;
     ; Lcl frame size = 72
     
     G_M4499_IG01:
            push     rbp
            push     r15
            push     r14
            push     r13
            push     r12
            push     rbx
            sub      rsp, 72
            lea      rbp, [rsp+0x70]
            mov      r14, rdi
            mov      ebx, esi
            mov      r13, rdx
            mov      r12d, ecx
            mov      r15, r8
     						;; size=33 bbWeight=1 PerfScore 8.00
     G_M4499_IG02:
            test     r15, r15
    -       je       G_M4499_IG16
    +       je       G_M4499_IG11
     						;; size=9 bbWeight=1 PerfScore 1.25
     G_M4499_IG03:
            mov      rdi, 0xD1FFAB1E      ; global ptr
            test     byte  ptr [rdi], 1
    -       je       G_M4499_IG18
    +       je       G_M4499_IG13
     						;; size=19 bbWeight=0.50 PerfScore 2.12
     G_M4499_IG04:
            mov      rdi, 0xD1FFAB1E      ; data for System.Collections.Generic.EqualityComparer`1[System.Numerics.Vector`1[float]]:<Default>k__BackingField
            cmp      r15, gword ptr [rdi]
    -       je       G_M4499_IG16
    +       je       G_M4499_IG11
            cmp      r12d, ebx
    -       jg       SHORT G_M4499_IG05
    -       cmp      ebx, r12d
    -       jle      SHORT G_M4499_IG06
    -       mov      ebx, r12d
    -       jmp      SHORT G_M4499_IG06
    -						;; size=34 bbWeight=0.50 PerfScore 4.50
    -G_M4499_IG05:
    +       jle      SHORT G_M4499_IG05
            mov      r12d, ebx
    -						;; size=3 bbWeight=0.50 PerfScore 0.12
    -G_M4499_IG06:
    +						;; size=27 bbWeight=0.50 PerfScore 2.88
    +G_M4499_IG05:
    +       cmp      r12d, ebx
    +       jg       G_M4499_IG14
    +       mov      ebx, r12d
            xor      eax, eax
    -       test     ebx, ebx
    -       jle      SHORT G_M4499_IG08
    -       cmp      ebx, r12d
    -       jg       SHORT G_M4499_IG14
    -						;; size=11 bbWeight=0.50 PerfScore 1.38
    -G_M4499_IG07:
    -       mov      dword ptr [rbp-0x2C], eax
    -       mov      edi, eax
    +       test     r12d, r12d
    +       jle      SHORT G_M4499_IG07
    +						;; size=19 bbWeight=0.50 PerfScore 1.50
    +G_M4499_IG06:
    +       mov      qword ptr [rbp-0x30], rax
    +       mov      rdi, rax
            shl      rdi, 5
            vmovups  ymm0, ymmword ptr [r14+rdi]
            vmovups  ymm1, ymmword ptr [rdi+r13]
            vmovups  ymmword ptr [rsp+0x20], ymm1
            vmovups  ymmword ptr [rsp], ymm0
            mov      rdi, r15
            mov      r11, 0xD1FFAB1E      ; code for System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]:Equals(System.Numerics.Vector`1[float],System.Numerics.Vector`1[float]):bool:this
            call     [r11]System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]:Equals(System.Numerics.Vector`1[float],System.Numerics.Vector`1[float]):bool:this
            test     eax, eax
    -       je       SHORT G_M4499_IG10
    -       mov      r12d, dword ptr [rbp-0x2C]
    +       je       SHORT G_M4499_IG09
    +       mov      r12, qword ptr [rbp-0x30]
            inc      r12d
            cmp      r12d, ebx
    -       mov      eax, r12d
    -       jl       SHORT G_M4499_IG07
    -						;; size=67 bbWeight=3.96 PerfScore 84.15
    -G_M4499_IG08:
    +       mov      rax, r12
    +       jl       SHORT G_M4499_IG06
    +						;; size=69 bbWeight=3.96 PerfScore 84.15
    +G_M4499_IG07:
            mov      eax, ebx
     						;; size=2 bbWeight=0.50 PerfScore 0.12
    +G_M4499_IG08:
    +       vzeroupper 
    +       add      rsp, 72
    +       pop      rbx
    +       pop      r12
    +       pop      r13
    +       pop      r14
    +       pop      r15
    +       pop      rbp
    +       ret      
    +						;; size=18 bbWeight=0.50 PerfScore 2.62
     G_M4499_IG09:
    -       vzeroupper 
    -       add      rsp, 72
    -       pop      rbx
    -       pop      r12
    -       pop      r13
    -       pop      r14
    -       pop      r15
    -       pop      rbp
    -       ret      
    -						;; size=18 bbWeight=0.50 PerfScore 2.62
    +       mov      rax, qword ptr [rbp-0x30]
    +						;; size=4 bbWeight=0.50 PerfScore 0.50
     G_M4499_IG10:
    -       mov      edi, dword ptr [rbp-0x2C]
    -						;; size=3 bbWeight=1.98 PerfScore 1.98
    -G_M4499_IG11:
    -       mov      eax, edi
    -						;; size=2 bbWeight=0.50 PerfScore 0.12
    -G_M4499_IG12:
            vzeroupper 
            add      rsp, 72
            pop      rbx
            pop      r12
            pop      r13
            pop      r14
            pop      r15
            pop      rbp
            ret      
     						;; size=18 bbWeight=0.50 PerfScore 2.62
    -G_M4499_IG13:
    -       mov      edi, dword ptr [rbp-0x2C]
    -       inc      edi
    -       cmp      edi, ebx
    -       mov      eax, edi
    -       jge      SHORT G_M4499_IG08
    -						;; size=11 bbWeight=0.04 PerfScore 0.11
    -G_M4499_IG14:
    -       mov      edi, eax
    -       shl      rdi, 5
    -       vmovups  ymm0, ymmword ptr [r14+rdi]
    -       mov      dword ptr [rbp-0x2C], eax
    -       cmp      eax, r12d
    -       jae      SHORT G_M4499_IG19
    -       vmovups  ymm1, ymmword ptr [rdi+r13]
    -       vmovups  ymmword ptr [rsp+0x20], ymm1
    -       vmovups  ymmword ptr [rsp], ymm0
    -       mov      rdi, r15
    -       mov      r11, 0xD1FFAB1E      ; function address
    -       call     [r11]System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]:Equals(System.Numerics.Vector`1[float],System.Numerics.Vector`1[float]):bool:this
    -       test     eax, eax
    -       jne      SHORT G_M4499_IG13
    -						;; size=57 bbWeight=0.04 PerfScore 0.79
    -G_M4499_IG15:
    -       mov      edi, dword ptr [rbp-0x2C]
    -       jmp      SHORT G_M4499_IG11
    -						;; size=5 bbWeight=0.02 PerfScore 0.06
    -G_M4499_IG16:
    +G_M4499_IG11:
            mov      rdi, r14
            mov      esi, ebx
            mov      rdx, r13
            mov      ecx, r12d
            mov      rax, 0xD1FFAB1E      ; code for System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]):int
     						;; size=21 bbWeight=0.50 PerfScore 0.62
    -G_M4499_IG17:
    +G_M4499_IG12:
            vzeroupper 
            add      rsp, 72
            pop      rbx
            pop      r12
            pop      r13
            pop      r14
            pop      r15
            pop      rbp
            tail.jmp [rax]System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]]):int
     						;; size=20 bbWeight=0.50 PerfScore 4.12
    -G_M4499_IG18:
    +G_M4499_IG13:
            mov      rdi, 0xD1FFAB1E      ; System.Collections.Generic.EqualityComparer`1[System.Numerics.Vector`1[float]]
            mov      rax, 0xD1FFAB1E      ; code for CORINFO_HELP_GET_GCSTATIC_BASE
            call     [rax]CORINFO_HELP_GET_GCSTATIC_BASE
            jmp      G_M4499_IG04
     						;; size=27 bbWeight=0 PerfScore 0.00
    -G_M4499_IG19:
    -       call     CORINFO_HELP_RNGCHKFAIL
    +G_M4499_IG14:
    +       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
    +       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
            int3     
    -						;; size=6 bbWeight=0 PerfScore 0.00
    +						;; size=13 bbWeight=0 PerfScore 0.00
     
    -; Total bytes of code 366, prolog size 33, PerfScore 114.72, instruction count 112, allocated bytes for code 366 (MethodHash=df29ee6c) for method System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int (FullOpts)
    +; Total bytes of code 299, prolog size 33, PerfScore 110.52, instruction count 88, allocated bytes for code 299 (MethodHash=df29ee6c) for method System.MemoryExtensions:CommonPrefixLength[System.Numerics.Vector`1[float]](System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.ReadOnlySpan`1[System.Numerics.Vector`1[float]],System.Collections.Generic.IEqualityComparer`1[System.Numerics.Vector`1[float]]):int (FullOpts)
     ; ============================================================
    -66 (-38.37 % of base) - System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int
     ; Assembly listing for method System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int (FullOpts)
     ; Emitting BLENDED_CODE for generic X64 + VEX + EVEX on Unix
     ; FullOpts code
     ; optimized code
     ; rbp based frame
     ; fully interruptible
     ; No PGO data
     ; 0 inlinees with PGO data; 11 single block inlinees; 6 inlinees without PGO data
     ; Final local variable assignments
     ;
     ;* V00 arg0         [V00    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V01 arg1         [V01    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V02 loc0         [V02    ] (  0,  0   )    long  ->  zero-ref   
     ;* V03 loc1         [V03    ] (  0,  0   )    long  ->  zero-ref   
    -;  V04 loc2         [V04,T02] ( 11, 17.54)     int  ->  rax        
    +;  V04 loc2         [V04,T12] (  3,  1.99)     int  ->  rax        
     ;# V05 OutArgs      [V05    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <Empty>
     ;* V06 tmp1         [V06    ] (  0,  0   )   byref  ->  zero-ref    "impAppendStmt"
     ;* V07 tmp2         [V07    ] (  0,  0   )    long  ->  zero-ref    "Inline return value spill temp"
     ;* V08 tmp3         [V08    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V09 tmp4         [V09    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
     ;* V10 tmp5         [V10    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V11 tmp6         [V11    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V12 tmp7         [V12    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V13 tmp8         [V13    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V14 tmp9         [V14    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V15 tmp10        [V15    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
     ;* V16 tmp11        [V16    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[System.Nullable`1[int]]>
     ;* V17 tmp12        [V17    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
     ;* V18 tmp13        [V18    ] (  0,  0   )   ubyte  ->  zero-ref    "Inline return value spill temp"
     ;* V19 tmp14        [V19    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "Inlining Arg" <System.Nullable`1[int]>
     ;* V20 tmp15        [V20    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "Inlining Arg" <System.Nullable`1[int]>
     ;* V21 tmp16        [V21    ] (  0,  0   )   ubyte  ->  zero-ref    "Inline return value spill temp"
     ;* V22 tmp17        [V22    ] (  0,  0   )     int  ->  zero-ref    ld-addr-op "Inlining Arg"
     ;* V23 tmp18        [V23    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
    -;  V24 tmp19        [V24,T06] (  5,  6   )   byref  ->  rdi         "field V00._reference (fldOffset=0x0)" P-INDEP
    -;  V25 tmp20        [V25,T04] ( 10,  9.50)     int  ->  rsi         "field V00._length (fldOffset=0x8)" P-INDEP
    -;  V26 tmp21        [V26,T07] (  5,  6   )   byref  ->  rdx         "field V01._reference (fldOffset=0x0)" P-INDEP
    -;  V27 tmp22        [V27,T09] (  7,  4.04)     int  ->  rcx         "field V01._length (fldOffset=0x8)" P-INDEP
    +;  V24 tmp19        [V24,T05] (  4,  6.96)   byref  ->  rdi         "field V00._reference (fldOffset=0x0)" P-INDEP
    +;  V25 tmp20        [V25,T04] (  7,  8.96)     int  ->  rsi         "field V00._length (fldOffset=0x8)" P-INDEP
    +;  V26 tmp21        [V26,T06] (  4,  5.96)   byref  ->  rdx         "field V01._reference (fldOffset=0x0)" P-INDEP
    +;  V27 tmp22        [V27,T09] (  6,  5.50)     int  ->  rcx         "field V01._length (fldOffset=0x8)" P-INDEP
     ;* V28 tmp23        [V28    ] (  0,  0   )   byref  ->  zero-ref    "field V10._reference (fldOffset=0x0)" P-INDEP
     ;* V29 tmp24        [V29    ] (  0,  0   )     int  ->  zero-ref    "field V10._length (fldOffset=0x8)" P-INDEP
     ;* V30 tmp25        [V30    ] (  0,  0   )   byref  ->  zero-ref    "field V11._reference (fldOffset=0x0)" P-INDEP
     ;* V31 tmp26        [V31    ] (  0,  0   )     int  ->  zero-ref    "field V11._length (fldOffset=0x8)" P-INDEP
    -;  V32 tmp27        [V32,T12] (  2,  1   )   byref  ->  rdx         single-def "field V13._reference (fldOffset=0x0)" P-INDEP
    +;  V32 tmp27        [V32,T14] (  2,  1   )   byref  ->  rdx         single-def "field V13._reference (fldOffset=0x0)" P-INDEP
     ;* V33 tmp28        [V33    ] (  0,  0   )     int  ->  zero-ref    "field V13._length (fldOffset=0x8)" P-INDEP
    -;  V34 tmp29        [V34,T13] (  2,  1   )   byref  ->  rdi         single-def "field V16._reference (fldOffset=0x0)" P-INDEP
    +;  V34 tmp29        [V34,T13] (  2,  2   )   byref  ->  rdi         single-def "field V16._reference (fldOffset=0x0)" P-INDEP
     ;* V35 tmp30        [V35    ] (  0,  0   )     int  ->  zero-ref    "field V16._length (fldOffset=0x8)" P-INDEP
    -;  V36 tmp31        [V36,T08] (  4,  8   )   ubyte  ->  registers   "field V19.hasValue (fldOffset=0x0)" P-INDEP
    -;  V37 tmp32        [V37,T10] (  4,  6   )     int  ->  registers   "field V19.value (fldOffset=0x4)" P-INDEP
    -;  V38 tmp33        [V38,T05] (  6,  8   )   ubyte  ->  registers   "field V20.hasValue (fldOffset=0x0)" P-INDEP
    -;  V39 tmp34        [V39,T11] (  4,  6   )     int  ->  rbx         "field V20.value (fldOffset=0x4)" P-INDEP
    -;  V40 tmp35        [V40,T00] (  6, 24   )   byref  ->  registers   "BlockOp address local"
    -;  V41 tmp36        [V41,T01] (  6, 24   )   byref  ->   r8         "BlockOp address local"
    -;  V42 cse0         [V42,T03] (  3, 11.88)    long  ->   r8         "CSE #02: aggressive"
    -;  V43 cse1         [V43,T14] (  3,  0.12)    long  ->   r8         "CSE #04: conservative"
    +;  V36 tmp31        [V36,T08] (  2,  7.92)   ubyte  ->   r9         "field V19.hasValue (fldOffset=0x0)" P-INDEP
    +;  V37 tmp32        [V37,T10] (  2,  5.94)     int  ->  rcx         "field V19.value (fldOffset=0x4)" P-INDEP
    +;  V38 tmp33        [V38,T07] (  3,  7.92)   ubyte  ->  r10         "field V20.hasValue (fldOffset=0x0)" P-INDEP
    +;  V39 tmp34        [V39,T11] (  2,  5.94)     int  ->  rax         "field V20.value (fldOffset=0x4)" P-INDEP
    +;  V40 tmp35        [V40,T00] (  3, 23.76)   byref  ->  rcx         "BlockOp address local"
    +;  V41 tmp36        [V41,T01] (  3, 23.76)   byref  ->  rax         "BlockOp address local"
    +;  V42 cse0         [V42,T03] (  3, 11.88)    long  ->  rax         "CSE #02: aggressive"
    +;  V43 rat0         [V43,T02] (  7, 18.33)    long  ->   r8         "Widened IV V04"
     ;
    -; Lcl frame size = 8
    +; Lcl frame size = 0
     
     G_M39229_IG01:
            push     rbp
    -       push     rbx
    -       push     rax
    -       lea      rbp, [rsp+0x10]
    -						;; size=8 bbWeight=1 PerfScore 3.50
    +       mov      rbp, rsp
    +						;; size=4 bbWeight=1 PerfScore 1.25
     G_M39229_IG02:
            cmp      ecx, esi
    -       jg       SHORT G_M39229_IG04
    +       jle      SHORT G_M39229_IG04
     						;; size=4 bbWeight=1 PerfScore 1.25
     G_M39229_IG03:
    -       cmp      esi, ecx
    -       jle      SHORT G_M39229_IG05
    -       mov      esi, ecx
    -       jmp      SHORT G_M39229_IG05
    -       align    [0 bytes for IG07]
    -						;; size=8 bbWeight=0.50 PerfScore 1.75
    -G_M39229_IG04:
            mov      ecx, esi
     						;; size=2 bbWeight=0.50 PerfScore 0.12
    -G_M39229_IG05:
    -       xor      eax, eax
    -       test     esi, esi
    +G_M39229_IG04:
    +       cmp      ecx, esi
    +       jg       SHORT G_M39229_IG14
    +       mov      esi, ecx
    +       xor      r8d, r8d
    +       test     ecx, ecx
            jle      SHORT G_M39229_IG12
    -						;; size=6 bbWeight=1 PerfScore 1.50
    -G_M39229_IG06:
    -       cmp      esi, ecx
    -       jg       SHORT G_M39229_IG16
    -						;; size=4 bbWeight=0.50 PerfScore 0.62
    -G_M39229_IG07:
    -       mov      r8d, eax
    -       shl      r8, 3
    -       lea      rcx, bword ptr [rdi+r8]
    +       align    [0 bytes for IG05]
    +						;; size=13 bbWeight=1 PerfScore 3.00
    +G_M39229_IG05:
    +       lea      rax, [8*r8]
    +       lea      rcx, bword ptr [rdi+rax]
            movzx    r9, byte  ptr [rcx]
    -       mov      r10d, dword ptr [rcx+0x04]
    -       add      r8, rdx
    -       movzx    r11, byte  ptr [r8]
    -       mov      ebx, dword ptr [r8+0x04]
    +       mov      ecx, dword ptr [rcx+0x04]
    +       add      rax, rdx
    +       movzx    r10, byte  ptr [rax]
    +       mov      eax, dword ptr [rax+0x04]
            test     r9d, r9d
            jne      SHORT G_M39229_IG10
    -						;; size=35 bbWeight=3.96 PerfScore 42.57
    -G_M39229_IG08:
    -       test     r11d, r11d
    +						;; size=34 bbWeight=3.96 PerfScore 41.58
    +G_M39229_IG06:
    +       test     r10d, r10d
            je       SHORT G_M39229_IG11
     						;; size=5 bbWeight=1.98 PerfScore 2.48
    +G_M39229_IG07:
    +       mov      eax, r8d
    +       jmp      SHORT G_M39229_IG09
    +						;; size=5 bbWeight=0.50 PerfScore 1.12
    +G_M39229_IG08:
    +       mov      eax, r8d
    +						;; size=3 bbWeight=0.99 PerfScore 0.25
     G_M39229_IG09:
    -       add      rsp, 8
    -       pop      rbx
            pop      rbp
            ret      
    -						;; size=7 bbWeight=0.50 PerfScore 1.12
    +						;; size=2 bbWeight=0.50 PerfScore 0.75
     G_M39229_IG10:
    -       test     r11d, r11d
    -       je       SHORT G_M39229_IG09
    -       cmp      r10d, ebx
    -       jne      SHORT G_M39229_IG09
    -						;; size=10 bbWeight=1.98 PerfScore 4.95
    +       test     r10d, r10d
    +       je       SHORT G_M39229_IG07
    +       cmp      ecx, eax
    +       jne      SHORT G_M39229_IG08
    +						;; size=9 bbWeight=1.98 PerfScore 4.95
     G_M39229_IG11:
    -       inc      eax
    -       cmp      eax, esi
    -       jl       SHORT G_M39229_IG07
    -						;; size=6 bbWeight=3.96 PerfScore 5.94
    +       inc      r8d
    +       cmp      r8d, esi
    +       jl       SHORT G_M39229_IG05
    +						;; size=8 bbWeight=3.96 PerfScore 5.94
     G_M39229_IG12:
            mov      eax, esi
     						;; size=2 bbWeight=0.50 PerfScore 0.12
     G_M39229_IG13:
    -       add      rsp, 8
    -       pop      rbx
            pop      rbp
            ret      
    -						;; size=7 bbWeight=0.50 PerfScore 1.12
    +						;; size=2 bbWeight=0.50 PerfScore 0.75
     G_M39229_IG14:
    -       test     r9d, r9d
    -       je       SHORT G_M39229_IG09
    -       cmp      r11d, ebx
    -       jne      SHORT G_M39229_IG09
    -						;; size=10 bbWeight=0.02 PerfScore 0.05
    -G_M39229_IG15:
    -       inc      eax
    -       cmp      eax, esi
    -       jge      SHORT G_M39229_IG12
    -						;; size=6 bbWeight=0.04 PerfScore 0.06
    -G_M39229_IG16:
    -       mov      r8d, eax
    -       shl      r8, 3
    -       lea      r9, bword ptr [rdi+r8]
    -       movzx    r10, byte  ptr [r9]
    -       mov      r11d, dword ptr [r9+0x04]
    -       cmp      eax, ecx
    -       jae      SHORT G_M39229_IG18
    -       add      r8, rdx
    -       movzx    r9, byte  ptr [r8]
    -       mov      ebx, dword ptr [r8+0x04]
    -       test     r10d, r10d
    -       jne      SHORT G_M39229_IG14
    -						;; size=39 bbWeight=0.04 PerfScore 0.48
    -G_M39229_IG17:
    -       test     r9d, r9d
    -       jne      SHORT G_M39229_IG09
    -       jmp      SHORT G_M39229_IG15
    -						;; size=7 bbWeight=0.02 PerfScore 0.07
    -G_M39229_IG18:
    -       call     CORINFO_HELP_RNGCHKFAIL
    +       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
    +       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
            int3     
    -						;; size=6 bbWeight=0 PerfScore 0.00
    +						;; size=13 bbWeight=0 PerfScore 0.00
     
    -; Total bytes of code 172, prolog size 8, PerfScore 67.72, instruction count 69, allocated bytes for code 172 (MethodHash=a15e66c2) for method System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int (FullOpts)
    +; Total bytes of code 106, prolog size 4, PerfScore 63.57, instruction count 41, allocated bytes for code 106 (MethodHash=a15e66c2) for method System.MemoryExtensions:CommonPrefixLength[System.Nullable`1[int]](System.ReadOnlySpan`1[System.Nullable`1[int]],System.ReadOnlySpan`1[System.Nullable`1[int]]):int (FullOpts)
     ; ============================================================
    -2 (-3.28 % of base) - System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref)
     ; Assembly listing for method System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref) (FullOpts)
     ; Emitting BLENDED_CODE for generic X64 + VEX + EVEX on Unix
     ; FullOpts code
     ; optimized code
     ; rbp based frame
     ; partially interruptible
     ; No PGO data
     ; 0 inlinees with PGO data; 2 single block inlinees; 2 inlinees without PGO data
     ; Final local variable assignments
     ;
    -;  V00 arg0         [V00,T00] (  6,  4.50)   byref  ->  rdi         single-def
    -;  V01 arg1         [V01,T01] (  6,  4.50)   byref  ->  rsi         single-def
    +;  V00 arg0         [V00,T00] (  7,  7   )   byref  ->  rdi         single-def
    +;  V01 arg1         [V01,T01] (  7,  5.50)   byref  ->  rsi         single-def
     ;# V02 OutArgs      [V02    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace" <Empty>
    -;  V03 tmp1         [V03,T04] (  3,  3   )     int  ->  rcx         "Inlining Arg"
    +;  V03 tmp1         [V03,T03] (  3,  3   )     int  ->  rcx         "Inlining Arg"
     ;* V04 tmp2         [V04    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[byte]>
     ;* V05 tmp3         [V05    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
    -;  V06 tmp4         [V06,T05] (  3,  3   )     int  ->  rax         "Inlining Arg"
    +;  V06 tmp4         [V06,T02] (  3,  6   )     int  ->  rax         "Inlining Arg"
     ;* V07 tmp5         [V07    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[byte]>
     ;* V08 tmp6         [V08    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
    -;  V09 tmp7         [V09,T06] (  2,  1   )   byref  ->  rax         single-def "field V04._reference (fldOffset=0x0)" P-INDEP
    +;  V09 tmp7         [V09,T07] (  2,  1   )   byref  ->  rax         single-def "field V04._reference (fldOffset=0x0)" P-INDEP
     ;* V10 tmp8         [V10    ] (  0,  0   )     int  ->  zero-ref    "field V04._length (fldOffset=0x8)" P-INDEP
    -;  V11 tmp9         [V11,T07] (  2,  1   )   byref  ->  rcx         single-def "field V07._reference (fldOffset=0x0)" P-INDEP
    +;  V11 tmp9         [V11,T06] (  2,  2   )   byref  ->  rcx         single-def "field V07._reference (fldOffset=0x0)" P-INDEP
     ;* V12 tmp10        [V12    ] (  0,  0   )     int  ->  zero-ref    "field V07._length (fldOffset=0x8)" P-INDEP
    -;  V13 cse0         [V13,T02] (  5,  3.50)     int  ->  rcx         "CSE #01: aggressive"
    -;  V14 cse1         [V14,T03] (  5,  3.50)     int  ->  rax         "CSE #02: aggressive"
    +;  V13 cse0         [V13,T04] (  3,  2.50)     int  ->  rcx         "CSE #01: aggressive"
    +;  V14 cse1         [V14,T05] (  3,  2.50)     int  ->  rax         "CSE #02: aggressive"
     ;
     ; Lcl frame size = 0
     
     G_M21521_IG01:
            push     rbp
            mov      rbp, rsp
     						;; size=4 bbWeight=1 PerfScore 1.25
     G_M21521_IG02:
            mov      eax, dword ptr [rsi+0x08]
            mov      ecx, dword ptr [rdi+0x08]
            cmp      eax, ecx
    -       jg       SHORT G_M21521_IG04
    +       jle      SHORT G_M21521_IG04
     						;; size=10 bbWeight=1 PerfScore 5.25
     G_M21521_IG03:
    -       cmp      ecx, eax
    -       jle      SHORT G_M21521_IG05
    -       cmp      eax, ecx
    -       ja       SHORT G_M21521_IG06
    -       mov      rcx, bword ptr [rdi]
    -       mov      bword ptr [rdi], rcx
    -       mov      dword ptr [rdi+0x08], eax
    -       jmp      SHORT G_M21521_IG05
    -						;; size=19 bbWeight=0.50 PerfScore 4.25
    -G_M21521_IG04:
            cmp      ecx, eax
            ja       SHORT G_M21521_IG06
            mov      rax, bword ptr [rsi]
            mov      bword ptr [rsi], rax
            mov      dword ptr [rsi+0x08], ecx
     						;; size=13 bbWeight=0.50 PerfScore 2.62
    +G_M21521_IG04:
    +       mov      eax, dword ptr [rsi+0x08]
    +       cmp      eax, dword ptr [rdi+0x08]
    +       ja       SHORT G_M21521_IG06
    +       mov      rcx, bword ptr [rdi]
    +       mov      bword ptr [rdi], rcx
    +       mov      dword ptr [rdi+0x08], eax
    +						;; size=17 bbWeight=1 PerfScore 10.00
     G_M21521_IG05:
            pop      rbp
            ret      
     						;; size=2 bbWeight=1 PerfScore 1.50
     G_M21521_IG06:
            mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
            call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
            int3     
     						;; size=13 bbWeight=0 PerfScore 0.00
     
    -; Total bytes of code 61, prolog size 4, PerfScore 14.88, instruction count 24, allocated bytes for code 61 (MethodHash=9db7abee) for method System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref) (FullOpts)
    +; Total bytes of code 59, prolog size 4, PerfScore 20.62, instruction count 22, allocated bytes for code 59 (MethodHash=9db7abee) for method System.MemoryExtensions:SliceLongerSpanToMatchShorterLength[byte](byref,byref) (FullOpts)
     ; ============================================================

    Larger list of diffs: https://gist.github.com/MihuBot/b52dd2a6115ad095e63b199eab2cc414

  2. MihuBot commented on Nov 29, 2025

    @MihuBot
    OwnerAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions