-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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] Vector Multiplication Crash for SIMD128 #61780
Comments
@llvm/issue-subscribers-backend-webassembly |
Then in the next This vector will be used for self-mul ( |
Previous commit https://reviews.llvm.org/D108669 |
Candidate patch: https://reviews.llvm.org/D147208 |
Constants in BUILD_VECTOR may be down cast into a smaller value that fits LaneBits, i.e., the bit width of elements in the vector. This cast didn't consider 2^N where it would be cast into -2^N, which still doesn't fit into LaneBits after casting. This will cause an assertion in later legalization. 2^N should be cast into 0, and this patch reflects such behavior. This patch also includes a test to reflect the fix. This patch fixes [issue 61780](#61780) Related patch: https://reviews.llvm.org/D108669 Reviewed By: tlively Differential Revision: https://reviews.llvm.org/D147208
Description
The following code targeting
wasm32
orwasm64
withsimd128
feature crashes LLC with assertion error(LaneBits == 64 || Val >= -(1ll << (LaneBits - 1))) && "Unexpected out of bounds negative value"
failed.Minimal Repoduction
https://godbolt.org/z/fdvE7jqcd
Code
Stack Trace
The text was updated successfully, but these errors were encountered: