-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[SIMD] crash during 'WebAssembly Instruction Selection' pass #55559
Comments
@llvm/issue-subscribers-backend-webassembly |
I get this intermittently when doing AOT builds in the .NET runtime for test suites. I managed to capture a repro where running the same build command fails every time. The command is:
I believe this invocation was performed by emscripten emcc, so I don't know why a given option is or isn't there. log from the failure:
This zip file should contain the directory structure matching the files referenced by the command: |
Reduced testcase:
To reproduce:
Version: The clang executable is |
The @llvm.wasm.shuffle intrinsic is only meant to be used with immediate lane index arguments, but we don't currently have it declared that way in LLVM. That means that using it with non-immediate arguments validates fine and then crashes in the backend when the backend assumes the lane indices are constants. I'll upload a patch fixing the intrinsic definition, but that means that these reproducer bitcode files will fail to validate instead of crash the backend, which isn't much better. How are they generated, and can that part be fixed? |
If this is by design, then we will fix it in our code. Thanks. |
The compiler generating the llvm IR might not be able to determine whenever the arguments are constants. |
The simplest thing to do here is probably to use the |
That is great. I missed you reply til now, I will try to use BuildShuffleVector and hopefully that will solve our issue. |
@tlively I tried to use I pass these values as arguments
and then it crashes in
It works fine when I replace the mask with constant vector, like |
@radekdoulik, sorry about that, I was mistaken when I said that |
I experience crash of clang++ during IR compilation,
.bc
to.o
.The crash:
The IR of
corlib_System_Runtime_Intrinsics_Wasm_WasmBase_Shuffle_System_Runtime_Intrinsics_Vector128_1_byte_System_Runtime_Intrinsic
function:The text was updated successfully, but these errors were encountered: