-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[RyuJIT Wasm] Memops on wasm are not containable #122900
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
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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.
Pull request overview
This PR removes an incorrect NYI_WASM assertion from the WasmRegAlloc::isContainableMemoryOp method. The function's implementation—returning false to indicate that memory operations are not containable on WebAssembly—was already complete. The NYI_WASM macro would throw a not-yet-implemented error when TARGET_WASM is defined, preventing the function from executing even though it was correctly implemented.
- Removes blocking NYI_WASM assertion from a fully implemented function
- Allows memory operation containability checks to execute correctly on WebAssembly
| } | ||
| #endif // TRACK_LSRA_STATS | ||
|
|
||
| bool WasmRegAlloc::isContainableMemoryOp(GenTree* node) |
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.
What is the call stack that hits this? We shouldn't be trying to contain any memory ops, not yet. Though we will eventually do this for casts (to emit things like CAST<long>(IND<int>) as one load).
If this is hit from a caller that "makes sense", the right implementation would be to move what is now in lsrabuild.cpp to regalloc.cpp.
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.
If you run a superpmi replay on x86 right now it gets hit ~40 times, see #122627 - I reproduced it locally too
|
cc @dotnet/jit-contrib |
|
@kg can you paste the call stack where you see this? |
|
I don't know how to get stacks out of spmi, but here are a few of the asserts: |
So this is one of those cases that "makes sense" (though it does mean we will need to handle it in bitcast codegen). That implies the second option (moving the existing impl from lsrabuild.cpp). |

No description provided.