-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[LLVM] missing some? NEON intrinsics in darwin-aarch64
#4726
Comments
@eregon is it possible for the user to sneak in I'm tempted to add those flags to our @rschatz what is your take on this? How is the situation handled around e.g. AVX on x86_64? |
Currently, we disable what we can on Concretely, we disable SSE3 and higher, and AVX: Line 183 in 2cdb368
Unfortunately, it's not possible to disable SSE2 completely, since that would also disable the scalar floating point operations, not just the vectorized ones. |
Not currently, no.
Yes, I think we should do that, similar to what we do on x86_64. |
See #4738 @Transfusion can you provide some steps to reproduce the issue? Using https://github.com/cyb70289/utf8 as an example kind of confirms my fear that disabling NEON support won't fly with unclean codebases: it needed a few |
#4738 has been merged, and that's part of the current truffleruby-dev build. |
Heavy sigh: There is We could fix this on the LLVM side (and try to upstream it), like this: https://gist.github.com/lewurm/746ab6a78374be9529ce6a58063ae7f0 I tried this fix locally, and tried to build OpenJDK with the Sulong toolchain, but running into this scenario:
The problem is in I guess that Apple assumes that arm64 implies Neon being available is fair as they control the whole stack down to the hardware. I'm reporting it anyway via Radar, but even if they would fix that (and provide a generic implementation), that is probably years away from happening. So I think we are at a loss here, and have to (1) revert the Sulong toolchain PR that disabled Neon, and (2) start implement Neon intrinsics in Sulong as needed. Any thoughts? |
Do we need to do that? I don't think we need OpenJDK compiled by the Sulong toolchain (could be another compiler, or without the Sulong toolchain wrappers), do we? |
We need it for Espresso which supports a mode when running on HotSpot that is called Footnotes
|
I agree, even though I don't really like it. If everyone expects that to be there on the majority of chips out there, we can't really do anything about it, we'll have to implement it, similar to SSE2 on x86_64. The Let's hope it's not too many distinct operations we have to support. |
…h64" This reverts commit d4f3bed and a511c27. This flag does not disable `__ARM_NEON__` which is used on Apple. We could fix LLVM on our side, but there are too many assumptions in the Apple SDK that this is available (see #4726 (comment) ).
…h64" This reverts commit d4f3bed and a511c27. This flag does not disable `__ARM_NEON__` which is used on Apple. We could fix LLVM on our side, but there are too many assumptions in the Apple SDK that this is available (see #4726 (comment) ).
@Transfusion this should be resolved now. Could you please verify with the latest dev build from https://github.com/graalvm/graalvm-ce-dev-builds/releases ? |
Describe GraalVM and your environment :
OpenJDK Runtime Environment GraalVM CE 22.3.0-dev (build 11.0.16+7-jvmci-22.3-b01)
java -Xinternalversion
:Have you verified this issue still happens when using the latest snapshot?
Yes
Describe the issue
I encountered
missing LLVM builtin: llvm.aarch64.neon.ld2.v16i8.p0v16i8
when I tried to use thegoogle-protobuf
gem viatruffleruby
.range2-neon.c
may be found hereCode snippet or code repository that reproduces the problem
Steps to reproduce the problem
$LLVM_TOOLCHAIN/clang++ foo.cpp -emit-llvm -c -o foo.bc
$GRAAALVM_HOME/bin/lli foo.bc
Output
Expected behavior
Program executes without runtime errors like on stock LLVM.
The text was updated successfully, but these errors were encountered: