Uh oh!
There was an error while loading. Please reload this page.
Add SIMD to LowerCallMemcmp - #84530
Merged
Merged
Conversation
ghost
commented
Apr 8, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsAdd SIMD to unroll length boolTest(Span<byte>s)=>s.SequenceEqual("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND"u8);Old codegen:; Method Prog:Test(System.Span`1[ubyte]):bool:thisG_M52730_IG01: 4883EC28 subrsp,40G_M52730_IG02: 49B8882A908BDA010000 movr8,0x1DA8B902A88 488B0A movrcx, bword ptr [rdx] 8B5208 movedx, dword ptr [rdx+08H] 4C89442420 mov bword ptr [rsp+20H],r8 83FA3E cmpedx,627513jne SHORT G_M52730_IG04G_M52730_IG03: 41B83E000000 movr8d,62 488B542420 movrdx, bword ptr [rsp+20H] FF1591FE1600 call[System.SpanHelpers:SequenceEqual(byref,byref,ulong):bool] EB02 jmp SHORT G_M52730_IG05G_M52730_IG04: 33C0 xoreax,eaxG_M52730_IG05: 4883C428 addrsp,40 C3 ret; Total bytes of code: 56New codegen:; Method Prog:Test(System.Span`1[ubyte]):bool:thisG_M52730_IG01: C5F877 vzeroupperG_M52730_IG02: 48B8882A7D01B3020000 movrax,0x2B3017D2A88 488B0A movrcx, bword ptr [rdx] 8B5208 movedx, dword ptr [rdx+08H] 4883FA3E cmprdx,62 752B jne SHORT G_M52730_IG04G_M52730_IG03: C5FC1001 vmovupsymm0, ymmword ptr[rcx] C5FC1008 vmovupsymm1, ymmword ptr[rax] C5FC10511E vmovupsymm2, ymmword ptr[rcx+1EH] C5FC10581E vmovupsymm3, ymmword ptr[rax+1EH] C5FDEFC1 vpxorymm0,ymm0,ymm1 C5EDEFCB vpxorymm1,ymm2,ymm3 C5FDEBC1 vporymm0,ymm0,ymm1 C4E27D17C0 vptestymm0,ymm0 0F94C0 sete al 0FB6C0 movzxrax,al EB02 jmp SHORT G_M52730_IG05G_M52730_IG04: 33C0 xoreax,eaxG_M52730_IG05: C5F877 vzeroupper C3 ret; Total bytes of code: 74
|
Comment on lines
+2044
to
+2045
| GenTree* rXor = newBinaryOp(comp, GT_XOR, actualLoadType, l2Indir, r2Indir); | ||
| GenTree* resultOr = newBinaryOp(comp, GT_OR, actualLoadType, lXor, rXor); |
Member
There was a problem hiding this comment.
Can you log an issue tracking us fixing this to opportunistically using vpternlog for AVX-512 hardware?
MemberAuthor
There was a problem hiding this comment.
Can you log an issue tracking us fixing this to opportunistically using
vpternlogfor AVX-512 hardware?
Good idea, done: #84534
tannergooding
commented
Apr 9, 2023
Member
#84536 is the SPMI replay failure |
EgorBo
commented
Apr 10, 2023
MemberAuthor
PTAL @jakobbotsch since you reviewed the previous impl of |
tannergooding
approved these changes
Apr 10, 2023
sbomer added a commit
that referenced
this pull request
Apr 11, 2023
EgorBo added a commit
to EgorBo/runtime-1
that referenced
this pull request
Apr 11, 2023
EgorBo added a commit
that referenced
this pull request
Apr 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SIMD to unroll length
[16..64](can be enabled for[64..128]with avx512),[16..32]on arm64.Old codegen:
New codegen: