Skip to content

Sse2 Intrinsics and Vector<T> paths no longer being output at R2R #33544

Description

@benaadams

Using jit-diff to produce the output

jit-diff diff --output d:\diffs
-t DIFF -d D:\GitHub\runtime\artifacts\bin\coreclr\Windows_NT.x64.Release-diff
--core_root D:\GitHub\runtime\artifacts\bin\coreclr\Windows_NT.x64.Release-diff -c

SpanHelpers.IndexOf(ref byte searchSpace, byte value, int length) doesn't look like it gets output at all.

The workhorse SpanHelpers.SequenceEqual(ref byte first, ref byte second, nuint length) doesn't output any vectorized asm

; Assembly listing for method SpanHelpers:SequenceEqual(byref,byref,int):bool; Emitting BLENDED_CODE for X64 CPU with SSE2 - Windows; ReadyToRun compilation; optimized code; rsp based frame; fully interruptible; Final local variable assignments;; V00 arg0 [V00,T03] ( 16, 39 ) byref -> rcx ; ...; V96 cse6 [V96,T27] ( 3, 12 ) long -> r10 "CSE - moderate";; Lcl frame size = 0G_M12780_IG01: ;; bbWeight=1 PerfScore 0.00G_M12780_IG02:cmprcx,rdxje G_M12780_IG09 ;; bbWeight=1 PerfScore 1.25G_M12780_IG03:xorrax,raxcmpr8d,8jl G_M12780_IG06 ;; bbWeight=0.50 PerfScore 0.75G_M12780_IG04:addr8d,-8movzxr9, word ptr [rcx+2*rax]movzxr10, word ptr [rdx+2*rax]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+1]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+2]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+3]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+4]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+5]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+6]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9d ;; bbWeight=4 PerfScore 204.00G_M12780_IG05:je G_M12780_IG11lear10,[rax+7]movr9,r10movzxr9, word ptr [rcx+2*r9]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11addrax,8cmpr8d,8jge G_M12780_IG04 ;; bbWeight=4 PerfScore 40.00G_M12780_IG06:cmpr8d,4jl G_M12780_IG08addr8d,-4movzxr9, word ptr [rcx+2*rax]movzxr10, word ptr [rdx+2*rax]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje G_M12780_IG11lear10,[rax+1]movzxr9, word ptr [rcx+2*r10]lear10,[rax+1]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje SHORT G_M12780_IG11lear10,[rax+2]movzxr9, word ptr [rcx+2*r10]lear10,[rax+2]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje SHORT G_M12780_IG11lear10,[rax+3]movzxr9, word ptr [rcx+2*r10]lear10,[rax+3]movzxr10, word ptr [rdx+2*r10]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje SHORT G_M12780_IG11addrax,4testr8d,r8djle SHORT G_M12780_IG09 ;; bbWeight=0.50 PerfScore 16.50G_M12780_IG07:movzxr9, word ptr [rcx+2*rax]movzxr10, word ptr [rdx+2*rax]cmpr9d,r10d sete r9bmovzxr9,r9btestr9d,r9dje SHORT G_M12780_IG11incraxdecr8d ;; bbWeight=2 PerfScore 14.50G_M12780_IG08:testr8d,r8djg SHORT G_M12780_IG07 ;; bbWeight=4 PerfScore 5.00G_M12780_IG09:moveax,1 ;; bbWeight=0.50 PerfScore 0.13G_M12780_IG10:ret ;; bbWeight=0.50 PerfScore 0.50G_M12780_IG11:xoreax,eax ;; bbWeight=0.50 PerfScore 0.13G_M12780_IG12:ret ;; bbWeight=0.50 PerfScore 0.50; Total bytes of code 529, prolog size 0, PerfScore 336.15, (MethodHash=9c43ce13) for method SpanHelpers:SequenceEqual(byref,byref,int):bool

SpanHelpers.IndexOf(ref char searchSpace, char value, int length) no longer outputs vectorized asm

; Assembly listing for method SpanHelpers:IndexOf(byref,ushort,int):int; Emitting BLENDED_CODE for X64 CPU with SSE2 - Windows; ReadyToRun compilation; optimized code; rsp based frame; fully interruptible; Final local variable assignments;; V00 arg0 [V00,T01] ( 15, 38 ) byref -> rcx ; ...; V92 tmp86 [V92,T20] ( 9, 9 ) int -> rax "Single return block return value";; Lcl frame size = 0G_M36664_IG01:mov dword ptr [rsp+10H],edx ;; bbWeight=1 PerfScore 1.00G_M36664_IG02:xorrdx,rdxcmpr8d,8jl G_M36664_IG04 ;; bbWeight=1 PerfScore 1.50G_M36664_IG03:addr8d,-8movzxrax, word ptr [rcx+2*rdx]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG09learax,[rdx+1]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG10learax,[rdx+2]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG11learax,[rdx+3]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG12learax,[rdx+4]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG13learax,[rdx+5]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG14learax,[rdx+6]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG15learax,[rdx+7]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje G_M36664_IG16addrdx,8cmpr8d,8jge G_M36664_IG03 ;; bbWeight=4 PerfScore 157.00G_M36664_IG04:cmpr8d,4jl SHORT G_M36664_IG06addr8d,-4movzxrax, word ptr [rcx+2*rdx]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje SHORT G_M36664_IG09learax,[rdx+1]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje SHORT G_M36664_IG10learax,[rdx+2]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje SHORT G_M36664_IG11learax,[rdx+3]movzxrax, word ptr [rcx+2*rax]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje SHORT G_M36664_IG12addrdx,4testr8d,r8djle SHORT G_M36664_IG07 ;; bbWeight=0.50 PerfScore 10.75G_M36664_IG05:movzxrax, word ptr [rcx+2*rdx]movzxr9, word ptr [rsp+10H]cmpr9d,eaxje SHORT G_M36664_IG09incrdxdecr8d ;; bbWeight=2 PerfScore 9.50G_M36664_IG06:testr8d,r8djg SHORT G_M36664_IG05 ;; bbWeight=4 PerfScore 5.00G_M36664_IG07:moveax,-1 ;; bbWeight=0.50 PerfScore 0.13G_M36664_IG08:ret ;; bbWeight=0.50 PerfScore 0.50G_M36664_IG09:moveax,edxjmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.13G_M36664_IG10:learax,[rdx+1]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG11:learax,[rdx+2]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG12:learax,[rdx+3]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG13:learax,[rdx+4]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG14:learax,[rdx+5]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG15:learax,[rdx+6]jmp SHORT G_M36664_IG17 ;; bbWeight=0.50 PerfScore 1.25G_M36664_IG16:learax,[rdx+7] ;; bbWeight=0.50 PerfScore 0.25G_M36664_IG17:ret ;; bbWeight=0.50 PerfScore 0.50; Total bytes of code 382, prolog size 4, PerfScore 232.95, (MethodHash=db3370c7) for method SpanHelpers:IndexOf(byref,ushort,int):int

/cc @jkotas@tannergooding

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions