Skip to content

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented May 12, 2022

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 12, 2022
@ghost ghost assigned jakobbotsch May 12, 2022
@ghost
Copy link

ghost commented May 12, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #69200

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch

This comment was marked as outdated.

@jakobbotsch jakobbotsch marked this pull request as draft May 12, 2022 14:25
@jakobbotsch
Copy link
Member Author

Diff for example in #69200:

        mov      qword ptr [rsp+28H], rax
 						;; size=11 bbWeight=1    PerfScore 1.50
 G_M28380_IG02:
-       mov      eax, edx
-       mov      r8d, dword ptr [rcx+8]
-       cmp      rax, r8
+       cmp      edx, dword ptr [rcx+8]
        ja       SHORT G_M28380_IG04
        mov      rcx, bword ptr [rcx]
        mov      bword ptr [rsp+28H], rcx
@@ -43,7 +41,7 @@ G_M28380_IG02:
        lea      rcx, bword ptr [rsp+28H]
        call     [Program:DoIt(ReadOnlySpan`1)]
        nop      
-						;; size=35 bbWeight=1    PerfScore 11.25
+						;; size=29 bbWeight=1    PerfScore 11.75
 G_M28380_IG03:
        add      rsp, 56
        ret      
@@ -53,6 +51,6 @@ G_M28380_IG04:
        int3     
 						;; size=7 bbWeight=0    PerfScore 0.00
 
-; Total bytes of code 58, prolog size 11, PerfScore 19.80, instruction count 17, allocated bytes for code 58 (MethodHash=f8b59123) for method Program:M(ReadOnlySpan`1,int)
+; Total bytes of code 52, prolog size 11, PerfScore 19.70, instruction count 15, allocated bytes for code 52 (MethodHash=f8b59123) for method Program:M(ReadOnlySpan`1,int)
 ; ============================================================

@jakobbotsch
Copy link
Member Author

/azp run Fuzzlyn

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jakobbotsch jakobbotsch marked this pull request as ready for review May 16, 2022 20:13
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib @GrabYourPitchforks

Copy link
Contributor

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great (modulo nits)!

@jakobbotsch jakobbotsch requested review from EgorBo and TIHan May 19, 2022 19:08
@jakobbotsch jakobbotsch merged commit 534cfe3 into dotnet:main May 23, 2022
@jakobbotsch jakobbotsch deleted the better-rel-comparison-with-casts-opts branch May 23, 2022 17:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT perf: Span.Slice(0, ...) emits unnecessary 64-bit extensions

3 participants