- Notifications
You must be signed in to change notification settings - Fork5.2k
Merged stores: Fix alignment-related issues and enable SIMD where possible#92939
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedOct 3, 2023
Tagging subscribers to this area:@JulieLeeMSFT,@jakobbotsch Issue DetailsMerge e.g. two consecutive SIMD stores (e.g. 2x Vector256 into 1x Vector512). But I am still trying to build a mental model for the case with "multiple scalar stores -> SIMD store" (we currently don't do it).
* - only if target (e.g. struct) is known not to contain GC handles So far, it seems that x86/AMD64 doesn't offer any kind of guarantee for atomicity officially (even per component).
|
tannergooding commentedOct 3, 2023
Note this is from |
tannergooding commentedOct 3, 2023
|
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
EgorBo commentedOct 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@jakobbotsch @dotnet/jit-contrib PTAL,Diffs (regression as expected because it made the whole#92852 algorithm more conservative, but the initial diffs were -400kb so most wins are expected to remain, obviously, most base addresses are TYP_REF like Jakob predicted). Wins on ARM64 due better SIMD guarantees. |
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.
EgorBo commentedOct 5, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
ImprovedDiffs on arm64 |
kunalspathak commentedOct 5, 2023
seems there are more regressions on linux/windows x64. Do we know why? |
kunalspathak commentedOct 5, 2023
|
EgorBo commentedOct 5, 2023
these are reverted improvements from#92852 because they turned out to be not legal (but fortunately, most improvements remained) |
EgorBo commentedOct 5, 2023
x86 SPMI jobs failed with timeout/"no space left", I'll check other runs |


Uh oh!
There was an error while loading.Please reload this page.
Adjust rules when we can use unaligned stores for merged ones. Also, enable 2xLONG/REF -> SIMD. And 2xSIMD to wider SIMD.
Wider scalar primitives for naturally aligned data of primitives (>1B):
boundary?
SIMD for for naturally aligned data of primitives (>1B):
* both Intel and AMD
** it's very unlikely JIT can assume 16-byte alignment currently anyhow
PS: Merged stores are conservatively disabled on LA64 and RISC-V
Per "Arm Architecture Reference Manual":
@tannergooding said that x64 with AVX promises atomicy for 16B for 16B aligned data - so far it seems to be the only thing x64 can guarantee to us.
Related issues:#76503,#51638,