Uh oh!
There was an error while loading. Please reload this page.
Optimize scalar conversions with AVX512 - #84384
Conversation
ghost
commented
Apr 5, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsDraft PR for testing purposes. No need for review at this time. This PR optimize the following cases:
publicstaticUInt64FloatToULong(floatval){return(UInt64)val;}Assembly before optimization G_M22196_IG01: ;; offset=0000H 4883EC28 subrsp,40 C5F877 vzeroupper ;; size=7 bbWeight=1 PerfScore 1.25G_M22196_IG02: ;; offset=0007H 62F17E085AC0 vcvtss2sd xmm0,xmm0 E87E57815E call CORINFO_HELP_DBL2ULNG90nop ;; size=12 bbWeight=1 PerfScore 5.25G_M22196_IG03: ;; offset=0013H 4883C428 addrsp,40 C3 ret ;; size=5 bbWeight=1 PerfScore 1.25Assembly afteroptimization G_M22196_IG01: ;; offset=0000H C5F877 vzeroupper ;; size=3 bbWeight=1 PerfScore 1.00G_M22196_IG02: ;; offset=0003H 62F1FE0878C0 vcvttss2usirax,xmm0 ;; size=6 bbWeight=1 PerfScore 6.00G_M22196_IG03: ;; offset=0009H C3 ret
publicstaticUInt64DoubleToULong(doubleval){return(UInt64)val;}Assembly before optimization G_M30068_IG01: ;; offset=0000H 4883EC28 subrsp,40 C5F877 vzeroupper ;; size=7 bbWeight=1 PerfScore 1.25G_M30068_IG02: ;; offset=0007H E874577F5E call CORINFO_HELP_DBL2ULNG90nop ;; size=6 bbWeight=1 PerfScore 1.25G_M30068_IG03: ;; offset=000DH 4883C428 addrsp,40 C3 retAssembly afteroptimization G_M30068_IG01: ;; offset=0000H C5F877 vzeroupper ;; size=3 bbWeight=1 PerfScore 1.00G_M30068_IG02: ;; offset=0003H 62F1FF0878C0 vcvttsd2usirax,xmm0 ;; size=6 bbWeight=1 PerfScore 5.00G_M30068_IG03: ;; offset=0009H C3 ret
publicstaticdoubleUIntToDouble(UInt64val){return(double)val;}Assembly before optimization G_M33997_IG01: ;; offset=0000H C5F877 vzeroupper ;; size=3 bbWeight=1 PerfScore 1.00G_M33997_IG02: ;; offset=0003H 62F17C0857C0 vxorps xmm0,xmm0 62F1FF082AC1 vcvtsi2sd xmm0,rcx 4885C9 testrcx,rcx 7D0A jge SHORT G_M33997_IG03 62F1FF08580502000000 vaddsd xmm0, qword ptr [reloc @RWD00] ;; size=27 bbWeight=1 PerfScore 12.58G_M33997_IG03: ;; offset=001EH C3 retAssembly afteroptimization G_M33997_IG01: ;; offset=0000H C5F877 vzeroupper ;; size=3 bbWeight=1 PerfScore 1.00G_M33997_IG02: ;; offset=0003H 62F1FF087BC1 vcvtusi2sdxmm0,rcx ;; size=6 bbWeight=1 PerfScore 4.00G_M33997_IG03: ;; offset=0009H C3 ret
|
I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a2c8d52 to
bb4a91eCompareUh oh!
There was an error while loading. Please reload this page.
khushal1996
commented
Jun 30, 2023
We are narrowing down the scope of the PR to ulong -> float conversions. The changes will b e updated soon. |
| @@ -18,8 +18,46 @@ FORCEINLINE int64_t FastDbl2Lng(double val) | |||
| #endif | |||
There was a problem hiding this comment.
The changes in this file and in jithelpers.cpp should be rolled back too.
khushal1996
commented
Jul 1, 2023
@tannergooding@jkotas does this look good for merge? I have rolled back the changes for float/double -> I long and optimized ulong -> float/double cases. |
jkotas
left a comment
There was a problem hiding this comment.
It looks good to me. I have commented on a few nits.
Somebody on @dotnet/jit-contrib should do final review and merge.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
khushal1996
commented
Jul 5, 2023
@jkotas I think we are good to go here. Would you please help with the approval and merge. |
jkotas
commented
Jul 5, 2023
@kunalspathak Could you please do final review and merge? |
khushal1996
commented
Jul 11, 2023
@kunalspathak can you help to merge this changes? They have been approved and we are trying to get them in before the next release. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tannergooding
commented
Jul 16, 2023
SPMI failures are the general CI was passing before the minor formatting cleanup requested |
This PR optimize the following cases:
Assembly before optimization
Assembly after optimization
Assembly before optimization
Assembly after optimization