-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 Int64x2 code fails to build in optimized mode. #3788
Comments
We end up with However, @sunfishcode , is it normal to have vector types like this? I thought our backend reports to LLVM that it can only support certain kinds. Btw, after that patch, the testcase then fails on |
Checked this again on current incoming, and it is still persists. |
Note that the testcase here passes with |
@sunfishcode: this problem happens due to SROA It seems that if integer promotion fails, it tries vector promotion. I wonder if vector promotion is ever worth it for us? Do you know if this enables other optimizations, or if we could safely just disable vector promotion in SROA? |
My sense is that we can safely disable this. SIMD.js doesn't have Int64x2 anyway, so we can revisit this issue when that changes. |
Fixed on incoming. |
The test case presented by @juj still fails on 1.36.0. |
It fails for me with |
Hi, I get something similar with a different integer type.
Does the same section need to be patched to also handle in16 and int8 or am I misunderstanding the issue ? Thx |
@vrabaud: would you have a test case by any chance? |
Hi,
I could not shrink the example further. skal/ Note that if i move the function func() inside the main.c file, i get a slightly different error:
|
Hi again, actually, here's a single-file version that produces the same error as the original:
I compile with: emcc -o main.js main.c -O3 -msse2 hope it helps, |
Building Int64x2 utilizing code fails under optimization, when PNaCl ExpandI64.cpp attempts to operate on the vectors. Debug builds work ok.
As a result, the following SSE2 Int64x2 functions are currently not available in optimized builds and they are skipped in
test_sse2_full
:As a small test case, one can attempt to build the following with
-O1
or higher:which fails on
LLVM ERROR: I->getType() == I->getOperand(0)->getType()
here https://github.com/kripken/emscripten-fastcomp/blob/master/lib/Transforms/NaCl/ExpandI64.cpp#L831.The text was updated successfully, but these errors were encountered: