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

[JitDiff X64] xtqqczze/dotnet-runtime/remove-this-trick #861

Open
MihuBot opened this issue Jan 4, 2025 · 2 comments
Open

[JitDiff X64] xtqqczze/dotnet-runtime/remove-this-trick #861

MihuBot opened this issue Jan 4, 2025 · 2 comments

Comments

@MihuBot
Copy link
Owner

MihuBot commented Jan 4, 2025

Job completed in 13 minutes 53 seconds.
https://github.com/xtqqczze/dotnet-runtime/tree/remove-this-trick

Diffs

Found 262 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 40225541
Total bytes of diff: 40225579
Total bytes of delta: 38 (0.00 % of base)
Total relative delta: 0.26
    diff is a regression.
    relative diff is a regression.


Total byte diff includes 10 bytes from reconciling methods
	Base had    4 unique methods,     1186 unique bytes
	Diff had    4 unique methods,     1196 unique bytes

Top file regressions (bytes):
          38 : System.Text.Encodings.Web.dasm (0.17 % of base)

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

Top method regressions (bytes):
         473 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Text.Rune,System.Span`1[ushort]):int (FullOpts) (0 base, 1 diff methods)
         424 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Text.Rune,System.Span`1[ubyte]):int (FullOpts) (0 base, 1 diff methods)
         152 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(uint,System.Span`1[ubyte]):int (FullOpts) (0 base, 1 diff methods)
         147 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(uint,System.Span`1[ushort]):int (FullOpts) (0 base, 1 diff methods)
           7 (4.58 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
           7 (5.74 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
           7 (7.78 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
           7 (8.05 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)

Top method improvements (bytes):
        -475 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Object,System.Text.Rune,System.Span`1[ushort]):int (FullOpts) (1 base, 0 diff methods)
        -426 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Object,System.Text.Rune,System.Span`1[ubyte]):int (FullOpts) (1 base, 0 diff methods)
        -147 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(System.Object,uint,System.Span`1[ushort]):int (FullOpts) (1 base, 0 diff methods)
        -138 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(System.Object,uint,System.Span`1[ubyte]):int (FullOpts) (1 base, 0 diff methods)

Top method regressions (percentages):
         147 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(uint,System.Span`1[ushort]):int (FullOpts) (0 base, 1 diff methods)
         152 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(uint,System.Span`1[ubyte]):int (FullOpts) (0 base, 1 diff methods)
         473 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Text.Rune,System.Span`1[ushort]):int (FullOpts) (0 base, 1 diff methods)
         424 (Infinity of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Text.Rune,System.Span`1[ubyte]):int (FullOpts) (0 base, 1 diff methods)
           7 (8.05 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
           7 (7.78 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
           7 (5.74 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
           7 (4.58 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)

Top method improvements (percentages):
        -147 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(System.Object,uint,System.Span`1[ushort]):int (FullOpts) (1 base, 0 diff methods)
        -138 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(System.Object,uint,System.Span`1[ubyte]):int (FullOpts) (1 base, 0 diff methods)
        -475 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Object,System.Text.Rune,System.Span`1[ushort]):int (FullOpts) (1 base, 0 diff methods)
        -426 (-100.00 % of base) : System.Text.Encodings.Web.dasm - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Object,System.Text.Rune,System.Span`1[ubyte]):int (FullOpts) (1 base, 0 diff methods)

12 total methods with Code Size differences (4 improved, 8 regressed), 233010 unchanged.

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

Artifacts:

@MihuBot
Copy link
Owner Author

MihuBot commented Jan 4, 2025

Top method regressions

7 (4.58 % of base) - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this
 ; Assembly listing for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (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; 13 single block inlinees; 12 inlinees without PGO data
 ; Final local variable assignments
 ;
-;  V00 this         [V00,T03] (  3,  2.50)     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation>
+;* V00 this         [V00    ] (  0,  0   )     ref  ->  zero-ref    this class-hnd single-def <System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation>
 ;* V01 arg1         [V01    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op single-def <System.Text.Rune>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg single-def <System.Span`1[ushort]>
 ;* V03 loc0         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.ReadOnlySpan`1[ushort]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    "Inline return value spill temp" <System.ReadOnlySpan`1[ushort]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ushort]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;* V08 tmp4         [V08,T09] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V08 tmp4         [V08,T08] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V09 tmp5         [V09    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ushort]>
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V11 tmp7         [V11    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V12 tmp8         [V12    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V13 tmp9         [V13    ] (  0,  0   )  struct (16) zero-ref    "Inline return value spill temp" <System.ReadOnlySpan`1[ushort]>
 ;* V14 tmp10        [V14    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ushort]>
 ;* V15 tmp11        [V15    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;* V16 tmp12        [V16,T10] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V16 tmp12        [V16,T09] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V17 tmp13        [V17    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ushort]>
 ;* V18 tmp14        [V18    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V19 tmp15        [V19    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V20 tmp16        [V20    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V21 tmp17        [V21    ] (  0,  0   )  struct (16) zero-ref    "Inline return value spill temp" <System.ReadOnlySpan`1[ushort]>
 ;* V22 tmp18        [V22    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ushort]>
 ;* V23 tmp19        [V23    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;* V24 tmp20        [V24,T11] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V24 tmp20        [V24,T10] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V25 tmp21        [V25    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ushort]>
 ;* V26 tmp22        [V26    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V27 tmp23        [V27    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V28 tmp24        [V28    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V29 tmp25        [V29    ] (  0,  0   )  struct (16) zero-ref    "Inline return value spill temp" <System.ReadOnlySpan`1[ushort]>
 ;* V30 tmp26        [V30    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ushort]>
 ;* V31 tmp27        [V31    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;* V32 tmp28        [V32,T12] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V32 tmp28        [V32,T11] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V33 tmp29        [V33    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ushort]>
 ;* V34 tmp30        [V34    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V35 tmp31        [V35    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V36 tmp32        [V36    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
-;  V37 tmp33        [V37,T04] (  3,  3   )     int  ->  rax         "Single return block return value"
-;  V38 tmp34        [V38,T01] (  6,  4   )     int  ->  rsi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
+;  V37 tmp33        [V37,T03] (  3,  3   )     int  ->  rax         "Single return block return value"
+;  V38 tmp34        [V38,T01] (  6,  4   )     int  ->  rdi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
 ;  V39 tmp35        [V39,T00] (  8,  4.50)   byref  ->  rdx         single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V40 tmp36        [V40,T02] (  6,  3.50)     int  ->  rcx         single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;* V41 tmp37        [V41    ] (  0,  0   )   byref  ->  zero-ref    "field V03._reference (fldOffset=0x0)" P-INDEP
 ;* V42 tmp38        [V42    ] (  0,  0   )     int  ->  zero-ref    "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V43 tmp39        [V43    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-INDEP
 ;* V44 tmp40        [V44    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-INDEP
-;* V45 tmp41        [V45,T05] (  0,  0   )   byref  ->  zero-ref    single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;* V45 tmp41        [V45,T04] (  0,  0   )   byref  ->  zero-ref    single-def "field V06._reference (fldOffset=0x0)" P-INDEP
 ;* V46 tmp42        [V46    ] (  0,  0   )     int  ->  zero-ref    "field V06._length (fldOffset=0x8)" P-INDEP
 ;* V47 tmp43        [V47    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V09._reference (fldOffset=0x0)" P-INDEP
 ;* V48 tmp44        [V48    ] (  0,  0   )     int  ->  zero-ref    "field V09._length (fldOffset=0x8)" P-INDEP
 ;* V49 tmp45        [V49    ] (  0,  0   )   byref  ->  zero-ref    "field V13._reference (fldOffset=0x0)" P-INDEP
 ;* V50 tmp46        [V50    ] (  0,  0   )     int  ->  zero-ref    "field V13._length (fldOffset=0x8)" P-INDEP
-;* V51 tmp47        [V51,T06] (  0,  0   )   byref  ->  zero-ref    single-def "field V14._reference (fldOffset=0x0)" P-INDEP
+;* V51 tmp47        [V51,T05] (  0,  0   )   byref  ->  zero-ref    single-def "field V14._reference (fldOffset=0x0)" P-INDEP
 ;* V52 tmp48        [V52    ] (  0,  0   )     int  ->  zero-ref    "field V14._length (fldOffset=0x8)" P-INDEP
 ;* V53 tmp49        [V53    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V17._reference (fldOffset=0x0)" P-INDEP
 ;* V54 tmp50        [V54    ] (  0,  0   )     int  ->  zero-ref    "field V17._length (fldOffset=0x8)" P-INDEP
 ;* V55 tmp51        [V55    ] (  0,  0   )   byref  ->  zero-ref    "field V21._reference (fldOffset=0x0)" P-INDEP
 ;* V56 tmp52        [V56    ] (  0,  0   )     int  ->  zero-ref    "field V21._length (fldOffset=0x8)" P-INDEP
-;* V57 tmp53        [V57,T07] (  0,  0   )   byref  ->  zero-ref    single-def "field V22._reference (fldOffset=0x0)" P-INDEP
+;* V57 tmp53        [V57,T06] (  0,  0   )   byref  ->  zero-ref    single-def "field V22._reference (fldOffset=0x0)" P-INDEP
 ;* V58 tmp54        [V58    ] (  0,  0   )     int  ->  zero-ref    "field V22._length (fldOffset=0x8)" P-INDEP
 ;* V59 tmp55        [V59    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V25._reference (fldOffset=0x0)" P-INDEP
 ;* V60 tmp56        [V60    ] (  0,  0   )     int  ->  zero-ref    "field V25._length (fldOffset=0x8)" P-INDEP
 ;* V61 tmp57        [V61    ] (  0,  0   )   byref  ->  zero-ref    "field V29._reference (fldOffset=0x0)" P-INDEP
 ;* V62 tmp58        [V62    ] (  0,  0   )     int  ->  zero-ref    "field V29._length (fldOffset=0x8)" P-INDEP
-;* V63 tmp59        [V63,T08] (  0,  0   )   byref  ->  zero-ref    single-def "field V30._reference (fldOffset=0x0)" P-INDEP
+;* V63 tmp59        [V63,T07] (  0,  0   )   byref  ->  zero-ref    single-def "field V30._reference (fldOffset=0x0)" P-INDEP
 ;* V64 tmp60        [V64    ] (  0,  0   )     int  ->  zero-ref    "field V30._length (fldOffset=0x8)" P-INDEP
 ;* V65 tmp61        [V65    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V33._reference (fldOffset=0x0)" P-INDEP
 ;* V66 tmp62        [V66    ] (  0,  0   )     int  ->  zero-ref    "field V33._length (fldOffset=0x8)" P-INDEP
 ;
 ; Lcl frame size = 0
 
 G_M621_IG01:
        push     rbp
        mov      rbp, rsp
-						;; size=4 bbWeight=1 PerfScore 1.25
+       mov      edi, esi
+						;; size=6 bbWeight=1 PerfScore 1.50
 G_M621_IG02:
-       cmp      esi, 60
+       cmp      edi, 60
        je       SHORT G_M621_IG09
 						;; size=5 bbWeight=1 PerfScore 1.25
 G_M621_IG03:
-       cmp      esi, 62
+       cmp      edi, 62
        je       SHORT G_M621_IG08
-       cmp      esi, 38
+       cmp      edi, 38
        je       SHORT G_M621_IG06
-       cmp      esi, 34
+       cmp      edi, 34
        je       SHORT G_M621_IG04
-       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(System.Object,uint,System.Span`1[ushort]):int
-       call     [rax]System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(System.Object,uint,System.Span`1[ushort]):int
+       mov      rsi, rdx
+       mov      edx, ecx
+       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(uint,System.Span`1[ushort]):int
+       call     [rax]System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|3_0(uint,System.Span`1[ushort]):int
        jmp      SHORT G_M621_IG11
-						;; size=29 bbWeight=0.50 PerfScore 4.50
+						;; size=34 bbWeight=0.50 PerfScore 4.75
 G_M621_IG04:
        cmp      ecx, 6
        jl       SHORT G_M621_IG10
        mov      rax, 0xD1FFAB1E
        mov      qword ptr [rdx], rax
        mov      dword ptr [rdx+0x08], 0xD1FFAB1E
        mov      eax, 6
 						;; size=30 bbWeight=0.50 PerfScore 1.88
 G_M621_IG05:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M621_IG06:
        cmp      ecx, 5
        jl       SHORT G_M621_IG10
        mov      rax, 0xD1FFAB1E
        mov      qword ptr [rdx], rax
        mov      word  ptr [rdx+0x08], 59
        mov      eax, 5
 						;; size=29 bbWeight=0.50 PerfScore 1.88
 G_M621_IG07:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M621_IG08:
        cmp      ecx, 4
        jl       SHORT G_M621_IG10
        mov      rcx, 0xD1FFAB1E
        mov      qword ptr [rdx], rcx
        jmp      SHORT G_M621_IG13
 						;; size=20 bbWeight=0.50 PerfScore 2.25
 G_M621_IG09:
        cmp      ecx, 4
        jge      SHORT G_M621_IG12
 						;; size=5 bbWeight=0.50 PerfScore 0.62
 G_M621_IG10:
        mov      eax, -1
 						;; size=5 bbWeight=0.50 PerfScore 0.12
 G_M621_IG11:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M621_IG12:
        mov      rax, 0xD1FFAB1E
        mov      qword ptr [rdx], rax
 						;; size=13 bbWeight=0.50 PerfScore 0.62
 G_M621_IG13:
        mov      eax, 4
 						;; size=5 bbWeight=0.50 PerfScore 0.12
 G_M621_IG14:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 
-; Total bytes of code 153, prolog size 4, PerfScore 17.50, instruction count 44, allocated bytes for code 153 (MethodHash=87bffd92) for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
+; Total bytes of code 160, prolog size 4, PerfScore 18.00, instruction count 47, allocated bytes for code 160 (MethodHash=87bffd92) for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
 ; ============================================================
7 (5.74 % of base) - System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this
 ; Assembly listing for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (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; 12 inlinees without PGO data
 ; Final local variable assignments
 ;
-;  V00 this         [V00,T03] (  3,  2.50)     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation>
+;* V00 this         [V00    ] (  0,  0   )     ref  ->  zero-ref    this class-hnd single-def <System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation>
 ;* V01 arg1         [V01    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op single-def <System.Text.Rune>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg single-def <System.Span`1[ubyte]>
 ;* V03 loc0         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.ReadOnlySpan`1[ubyte]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ubyte]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ubyte]>
 ;* V07 tmp3         [V07    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ubyte]>
 ;* V08 tmp4         [V08    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[ubyte]>
-;* V09 tmp5         [V09,T05] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V09 tmp5         [V09,T04] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V10 tmp6         [V10    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ubyte]>
 ;* V11 tmp7         [V11    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V12 tmp8         [V12    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V13 tmp9         [V13    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
-;* V14 tmp10        [V14,T06] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V14 tmp10        [V14,T05] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V15 tmp11        [V15    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ubyte]>
 ;* V16 tmp12        [V16    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V17 tmp13        [V17    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V18 tmp14        [V18    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
-;* V19 tmp15        [V19,T07] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V19 tmp15        [V19,T06] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V20 tmp16        [V20    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ubyte]>
 ;* V21 tmp17        [V21    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V22 tmp18        [V22    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V23 tmp19        [V23    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
-;* V24 tmp20        [V24,T08] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
+;* V24 tmp20        [V24,T07] (  0,  0   )   ubyte  ->  zero-ref    "Inline stloc first use temp"
 ;* V25 tmp21        [V25    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.Span`1[ubyte]>
 ;* V26 tmp22        [V26    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V27 tmp23        [V27    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
 ;* V28 tmp24        [V28    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
-;  V29 tmp25        [V29,T04] (  3,  3   )     int  ->  rax         "Single return block return value"
-;  V30 tmp26        [V30,T01] (  6,  4   )     int  ->  rsi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
+;  V29 tmp25        [V29,T03] (  3,  3   )     int  ->  rax         "Single return block return value"
+;  V30 tmp26        [V30,T01] (  6,  4   )     int  ->  rdi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
 ;  V31 tmp27        [V31,T00] (  8,  4.50)   byref  ->  rdx         single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V32 tmp28        [V32,T02] (  6,  3.50)     int  ->  rcx         single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;* V33 tmp29        [V33    ] (  0,  0   )   byref  ->  zero-ref    "field V03._reference (fldOffset=0x0)" P-INDEP
 ;* V34 tmp30        [V34    ] (  0,  0   )     int  ->  zero-ref    "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V35 tmp31        [V35    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V05._reference (fldOffset=0x0)" P-INDEP
 ;* V36 tmp32        [V36    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-INDEP
 ;* V37 tmp33        [V37    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V06._reference (fldOffset=0x0)" P-INDEP
 ;* V38 tmp34        [V38    ] (  0,  0   )     int  ->  zero-ref    "field V06._length (fldOffset=0x8)" P-INDEP
 ;* V39 tmp35        [V39    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V07._reference (fldOffset=0x0)" P-INDEP
 ;* V40 tmp36        [V40    ] (  0,  0   )     int  ->  zero-ref    "field V07._length (fldOffset=0x8)" P-INDEP
 ;* V41 tmp37        [V41    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V08._reference (fldOffset=0x0)" P-INDEP
 ;* V42 tmp38        [V42    ] (  0,  0   )     int  ->  zero-ref    "field V08._length (fldOffset=0x8)" P-INDEP
 ;* V43 tmp39        [V43    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V10._reference (fldOffset=0x0)" P-INDEP
 ;* V44 tmp40        [V44    ] (  0,  0   )     int  ->  zero-ref    "field V10._length (fldOffset=0x8)" P-INDEP
 ;* V45 tmp41        [V45    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V15._reference (fldOffset=0x0)" P-INDEP
 ;* V46 tmp42        [V46    ] (  0,  0   )     int  ->  zero-ref    "field V15._length (fldOffset=0x8)" P-INDEP
 ;* V47 tmp43        [V47    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V20._reference (fldOffset=0x0)" P-INDEP
 ;* V48 tmp44        [V48    ] (  0,  0   )     int  ->  zero-ref    "field V20._length (fldOffset=0x8)" P-INDEP
 ;* V49 tmp45        [V49    ] (  0,  0   )   byref  ->  zero-ref    single-def "field V25._reference (fldOffset=0x0)" P-INDEP
 ;* V50 tmp46        [V50    ] (  0,  0   )     int  ->  zero-ref    "field V25._length (fldOffset=0x8)" P-INDEP
 ;
 ; Lcl frame size = 0
 
 G_M18986_IG01:
        push     rbp
        mov      rbp, rsp
-						;; size=4 bbWeight=1 PerfScore 1.25
+       mov      edi, esi
+						;; size=6 bbWeight=1 PerfScore 1.50
 G_M18986_IG02:
-       cmp      esi, 60
+       cmp      edi, 60
        je       SHORT G_M18986_IG09
 						;; size=5 bbWeight=1 PerfScore 1.25
 G_M18986_IG03:
-       cmp      esi, 62
+       cmp      edi, 62
        je       SHORT G_M18986_IG08
-       cmp      esi, 38
+       cmp      edi, 38
        je       SHORT G_M18986_IG06
-       cmp      esi, 34
+       cmp      edi, 34
        je       SHORT G_M18986_IG04
-       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(System.Object,uint,System.Span`1[ubyte]):int
-       call     [rax]System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(System.Object,uint,System.Span`1[ubyte]):int
+       mov      rsi, rdx
+       mov      edx, ecx
+       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(uint,System.Span`1[ubyte]):int
+       call     [rax]System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|2_0(uint,System.Span`1[ubyte]):int
        jmp      SHORT G_M18986_IG11
-						;; size=29 bbWeight=0.50 PerfScore 4.50
+						;; size=34 bbWeight=0.50 PerfScore 4.75
 G_M18986_IG04:
        cmp      ecx, 6
        jl       SHORT G_M18986_IG10
        mov      dword ptr [rdx], 0xD1FFAB1E
        mov      word  ptr [rdx+0x04], 0x3B74
        mov      eax, 6
 						;; size=22 bbWeight=0.50 PerfScore 1.75
 G_M18986_IG05:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M18986_IG06:
        cmp      ecx, 5
        jl       SHORT G_M18986_IG10
        mov      dword ptr [rdx], 0xD1FFAB1E
        mov      byte  ptr [rdx+0x04], 59
        mov      eax, 5
 						;; size=20 bbWeight=0.50 PerfScore 1.75
 G_M18986_IG07:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M18986_IG08:
        cmp      ecx, 4
        jl       SHORT G_M18986_IG10
        mov      dword ptr [rdx], 0xD1FFAB1E
        jmp      SHORT G_M18986_IG13
 						;; size=13 bbWeight=0.50 PerfScore 2.12
 G_M18986_IG09:
        cmp      ecx, 4
        jge      SHORT G_M18986_IG12
 						;; size=5 bbWeight=0.50 PerfScore 0.62
 G_M18986_IG10:
        mov      eax, -1
 						;; size=5 bbWeight=0.50 PerfScore 0.12
 G_M18986_IG11:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 G_M18986_IG12:
        mov      dword ptr [rdx], 0xD1FFAB1E
 						;; size=6 bbWeight=0.50 PerfScore 0.50
 G_M18986_IG13:
        mov      eax, 4
 						;; size=5 bbWeight=0.50 PerfScore 0.12
 G_M18986_IG14:
        pop      rbp
        ret      
 						;; size=2 bbWeight=0.50 PerfScore 0.75
 
-; Total bytes of code 122, prolog size 4, PerfScore 17.00, instruction count 40, allocated bytes for code 122 (MethodHash=3025b5d5) for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
+; Total bytes of code 129, prolog size 4, PerfScore 17.50, instruction count 43, allocated bytes for code 129 (MethodHash=3025b5d5) for method System.Text.Encodings.Web.DefaultHtmlEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
 ; ============================================================
7 (7.78 % of base) - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this
 ; Assembly listing for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (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; 3 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
-;  V00 this         [V00,T00] (  5,  4.50)     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation>
+;  V00 this         [V00,T00] (  4,  4   )     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation>
 ;* V01 arg1         [V01    ] (  0,  0   )  struct ( 8) zero-ref    single-def <System.Text.Rune>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.Span`1[ushort]>
 ;  V03 loc0         [V03,T06] (  2,  1   )   ubyte  ->  rbx         ld-addr-op
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )   ubyte  ->  zero-ref    "Inline return value spill temp"
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "Inlining Arg" <System.Text.Rune>
-;  V07 tmp3         [V07,T04] (  2,  3   )   byref  ->  rax         single-def "Inlining Arg"
+;  V07 tmp3         [V07,T04] (  2,  3   )   byref  ->  rdi         single-def "Inlining Arg"
 ;* V08 tmp4         [V08    ] (  0,  0   )   byref  ->  zero-ref    "impAppendStmt"
 ;  V09 tmp5         [V09,T05] (  3,  1.50)   ubyte  ->  rbx         "Inline stloc first use temp"
 ;* V10 tmp6         [V10    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
-;  V11 tmp7         [V11,T01] (  4,  3   )     int  ->  rsi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
+;  V11 tmp7         [V11,T01] (  4,  3   )     int  ->  rax         single-def "field V01._value (fldOffset=0x0)" P-INDEP
 ;  V12 tmp8         [V12,T02] (  4,  2.50)   byref  ->  rdx         single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V13 tmp9         [V13,T03] (  3,  2   )     int  ->  rcx         single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;* V14 tmp10        [V14    ] (  0,  0   )     int  ->  zero-ref    "field V06._value (fldOffset=0x0)" P-INDEP
 ;
 ; Lcl frame size = 8
 
 G_M19651_IG01:
        push     rbp
        push     rbx
        push     rax
        lea      rbp, [rsp+0x10]
-						;; size=8 bbWeight=1 PerfScore 3.50
+       mov      eax, esi
+						;; size=10 bbWeight=1 PerfScore 3.75
 G_M19651_IG02:
        cmp      byte  ptr [rdi], dil
-       lea      rax, bword ptr [rdi+0x08]
-       cmp      esi, 127
+       add      rdi, 8
+       cmp      eax, 127
        ja       SHORT G_M19651_IG04
-						;; size=12 bbWeight=1 PerfScore 4.75
+						;; size=12 bbWeight=1 PerfScore 4.50
 G_M19651_IG03:
-       mov      r8d, esi
-       movzx    rbx, byte  ptr [rax+r8]
+       mov      esi, eax
+       movzx    rbx, byte  ptr [rdi+rsi]
        test     ebx, ebx
        jne      SHORT G_M19651_IG06
-						;; size=12 bbWeight=0.50 PerfScore 1.75
+						;; size=10 bbWeight=0.50 PerfScore 1.75
 G_M19651_IG04:
-       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Object,System.Text.Rune,System.Span`1[ushort]):int
-       call     [rax]System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Object,System.Text.Rune,System.Span`1[ushort]):int
+       mov      rsi, rdx
+       mov      edx, ecx
+       mov      edi, eax
+       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Text.Rune,System.Span`1[ushort]):int
+       call     [rax]System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf16>g__TryEncodeScalarAsHex|5_0(System.Text.Rune,System.Span`1[ushort]):int
        nop      
-						;; size=13 bbWeight=0.50 PerfScore 1.75
+						;; size=20 bbWeight=0.50 PerfScore 2.12
 G_M19651_IG05:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 G_M19651_IG06:
        cmp      ecx, 1
        jg       SHORT G_M19651_IG08
        mov      eax, -1
 						;; size=10 bbWeight=0.50 PerfScore 0.75
 G_M19651_IG07:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 G_M19651_IG08:
        mov      word  ptr [rdx], 92
        mov      word  ptr [rdx+0x02], bx
        mov      eax, 2
 						;; size=14 bbWeight=0.50 PerfScore 1.12
 G_M19651_IG09:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 
-; Total bytes of code 90, prolog size 8, PerfScore 17.00, instruction count 33, allocated bytes for code 90 (MethodHash=2131b33c) for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
+; Total bytes of code 97, prolog size 8, PerfScore 17.38, instruction count 37, allocated bytes for code 97 (MethodHash=2131b33c) for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf16(System.Text.Rune,System.Span`1[ushort]):int:this (FullOpts)
 ; ============================================================
7 (8.05 % of base) - System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this
 ; Assembly listing for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (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; 3 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
-;  V00 this         [V00,T00] (  5,  4.50)     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation>
+;  V00 this         [V00,T00] (  4,  4   )     ref  ->  rdi         this class-hnd single-def <System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation>
 ;* V01 arg1         [V01    ] (  0,  0   )  struct ( 8) zero-ref    single-def <System.Text.Rune>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.Span`1[ubyte]>
 ;  V03 loc0         [V03,T06] (  2,  1   )   ubyte  ->  rbx         ld-addr-op
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )   ubyte  ->  zero-ref    "Inline return value spill temp"
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct ( 8) zero-ref    ld-addr-op "Inlining Arg" <System.Text.Rune>
-;  V07 tmp3         [V07,T04] (  2,  3   )   byref  ->  rax         single-def "Inlining Arg"
+;  V07 tmp3         [V07,T04] (  2,  3   )   byref  ->  rdi         single-def "Inlining Arg"
 ;* V08 tmp4         [V08    ] (  0,  0   )   byref  ->  zero-ref    "impAppendStmt"
 ;  V09 tmp5         [V09,T05] (  3,  1.50)   ubyte  ->  rbx         "Inline stloc first use temp"
 ;* V10 tmp6         [V10    ] (  0,  0   )     int  ->  zero-ref    "Inlining Arg"
-;  V11 tmp7         [V11,T01] (  4,  3   )     int  ->  rsi         single-def "field V01._value (fldOffset=0x0)" P-INDEP
+;  V11 tmp7         [V11,T01] (  4,  3   )     int  ->  rax         single-def "field V01._value (fldOffset=0x0)" P-INDEP
 ;  V12 tmp8         [V12,T02] (  4,  2.50)   byref  ->  rdx         single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V13 tmp9         [V13,T03] (  3,  2   )     int  ->  rcx         single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;* V14 tmp10        [V14    ] (  0,  0   )     int  ->  zero-ref    "field V06._value (fldOffset=0x0)" P-INDEP
 ;
 ; Lcl frame size = 8
 
 G_M55940_IG01:
        push     rbp
        push     rbx
        push     rax
        lea      rbp, [rsp+0x10]
-						;; size=8 bbWeight=1 PerfScore 3.50
+       mov      eax, esi
+						;; size=10 bbWeight=1 PerfScore 3.75
 G_M55940_IG02:
        cmp      byte  ptr [rdi], dil
-       lea      rax, bword ptr [rdi+0x08]
-       cmp      esi, 127
+       add      rdi, 8
+       cmp      eax, 127
        ja       SHORT G_M55940_IG04
-						;; size=12 bbWeight=1 PerfScore 4.75
+						;; size=12 bbWeight=1 PerfScore 4.50
 G_M55940_IG03:
-       mov      r8d, esi
-       movzx    rbx, byte  ptr [rax+r8]
+       mov      esi, eax
+       movzx    rbx, byte  ptr [rdi+rsi]
        test     ebx, ebx
        jne      SHORT G_M55940_IG06
-						;; size=12 bbWeight=0.50 PerfScore 1.75
+						;; size=10 bbWeight=0.50 PerfScore 1.75
 G_M55940_IG04:
-       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Object,System.Text.Rune,System.Span`1[ubyte]):int
-       call     [rax]System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Object,System.Text.Rune,System.Span`1[ubyte]):int
+       mov      rsi, rdx
+       mov      edx, ecx
+       mov      edi, eax
+       mov      rax, 0xD1FFAB1E      ; code for System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Text.Rune,System.Span`1[ubyte]):int
+       call     [rax]System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:<EncodeUtf8>g__TryEncodeScalarAsHex|4_0(System.Text.Rune,System.Span`1[ubyte]):int
        nop      
-						;; size=13 bbWeight=0.50 PerfScore 1.75
+						;; size=20 bbWeight=0.50 PerfScore 2.12
 G_M55940_IG05:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 G_M55940_IG06:
        cmp      ecx, 1
        jg       SHORT G_M55940_IG08
        mov      eax, -1
 						;; size=10 bbWeight=0.50 PerfScore 0.75
 G_M55940_IG07:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 G_M55940_IG08:
        mov      byte  ptr [rdx], 92
        mov      byte  ptr [rdx+0x01], bl
        mov      eax, 2
 						;; size=11 bbWeight=0.50 PerfScore 1.12
 G_M55940_IG09:
        add      rsp, 8
        pop      rbx
        pop      rbp
        ret      
 						;; size=7 bbWeight=0.50 PerfScore 1.12
 
-; Total bytes of code 87, prolog size 8, PerfScore 17.00, instruction count 33, allocated bytes for code 87 (MethodHash=fb37257b) for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
+; Total bytes of code 94, prolog size 8, PerfScore 17.38, instruction count 37, allocated bytes for code 94 (MethodHash=fb37257b) for method System.Text.Encodings.Web.DefaultJavaScriptEncoder+EscaperImplementation:EncodeUtf8(System.Text.Rune,System.Span`1[ubyte]):int:this (FullOpts)
 ; ============================================================

@MihuBot
Copy link
Owner Author

MihuBot commented Jan 4, 2025

@xtqqczze

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