[RyuJIT Wasm] Memops on wasm are not containable#122900
[RyuJIT Wasm] Memops on wasm are not containable#122900kg wants to merge 1 commit intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
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
| @@ -48,7 +48,6 @@ void WasmRegAlloc::dumpLsraStatsSummary(FILE* file) | |||
|
|
|||
| bool WasmRegAlloc::isContainableMemoryOp(GenTree* node) | |||
There was a problem hiding this comment.
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.
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). |
Do you mean the logic in |
No, just the part that's called by lowering: Edit: we don't handle contained bitcasts in codegen yet. But when we start to, we can certainly add a version of what |

No description provided.