-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Cleanup some xarch emit logic #85536
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsI was working on a In particular:
Most of these were straightfoward fixes. However, we also had but were not using some "scheduling" information that was defined as part of the
|
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The EVEX versions of these instructions produce a K register, not a XMM/YMM/ZMM register.
Since they need entirely different handling (and cannot be freely converted between the two forms), they need to be their own instructions.
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b/w instructions are typically FULL_MEM while d/q are typically FULL (with a few exceptions)
In this case, they should've been FULL
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The various test instructions don't mutate either input; the operate in a temp and set flags.
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FMA instructions are all RMW
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EVEX only instructions don't need to specify REX_W1_EVEX since they don't have a different encoding for non-EVEX.
They can just specify REX_W1 directly and go down the faster path
src/coreclr/jit/instrsxarch.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRC32 is an RMW instruction
cd9fdd2 to
d13305d
Compare
4088fa2 to
992a3f2
Compare
|
CC. @dotnet/jit-contrib We see good TP wins of up to We also see some smaller assembly both from consistent use of the VEX aware path and from using the correct |
|
/azp run runtime-coreclr jitstress-isas-x86, Fuzzlyn |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Fuzzlyn failure is pre-existing and repros on .NET 8 Preview 3: #85602 |
EgorBo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes make sense to me assuming CI is green
|
Merged in dotnet/main to resolve the conflicts caused by #85594 |
|
/azp run runtime-coreclr jitstress-isas-x86, Fuzzlyn |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
JitStress failures are #85608 |
|
Do you think this PR could explain this improvement? |
|
It's possible, but hard to say for certain without seeing the codegen. This fixed up a number of code paths dealing with vectors to be VEX aware and emit more optimal codegen. |
I was working on a
emitValidateInsmethod (debug-only, run as part ofemitDispIns) which verifies that the variousinstrDescwe encounter are "correct". As part of this, I found a few places where things are currently incorrect and should be updated. -- TheemitValidateInswill go up eventually, but as its own PR given size/complexity and because there are still more validation that needs to be done.In particular:
emitAttr(they passed down a scalar size to a vector instruction)insFormatMost of these were straightfoward fixes. However, we also had but were not using some "scheduling" information that was defined as part of the
emitfmtdata. I added functions to be able to query that information and utilize it in a few places rather than checking giant switch tables. -- There are more places this could be used as well, such as in the GC liveness update checks and to remove code duplication in places likeemitDispIns. However, those can be done in their own PRs.