-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[WASM] Assertion isReg() && "This is not a register operand!"
failed during pass Machine Common Subexpression Elimination
#58904
Comments
@llvm/issue-subscribers-backend-webassembly |
The code compiles using LLVM 14 and 15, but fails to compile using |
I've bisected the first bad commit to e4b2c52 It looks like it changes the result of instruction selection from
to something more like
Resulting in the MIR:
Further passes (not limited to just machine-cse) then throw that assertion because there's a COPY of a stack frame index. |
@RKSimon, would you be able to take a look at this? |
The DAG ends up with this:
|
Description
When targeting
wasm32
/wasm64
, the following code crashes the backend during passMachine Common Subexpression Elimination
with assertionisReg() && "This is not a register operand!"
failed.The crash happens specifically when the second operand for
urem
is -1.This problem does not exist when targeting
aarch64
,x86_64
, orriscv64
.Minimal Reproduction
https://godbolt.org/z/hKr3jo1s6
Code
Stack Trace
The text was updated successfully, but these errors were encountered: