-
Notifications
You must be signed in to change notification settings - Fork 292
Open
Labels
Description
Description
With any clang-18 version shipped with any of the NDK 27.* publicly versions the following SIMD code hangs indefinitely.
More specifically:
With any NDK 27 version and:
- target armv8
- SIMD vector of size 3
- SIMD vector of type short
- compilation not optimised (-O0)
the following SIMD code hangs indefinitely and possibly runs out of memory (exit 137)
typedef __attribute__((__ext_vector_type__(3))) short vector_short3;
void func()
{
vector_short3 result;
result.x = short(1);
}This can be also verified in godbolt here: https://godbolt.org/z/48fdKoEon
Note: it is enough to change any of the pre-condition above to have the compilation to complete successfully.
So to say it is very a nit (yet annoying) case.
Assuming a strict requirements for NDK27, it would be great if you could recommend the workaround with the best tradeoff between the followings - or recommend better.
- just use normal vector/struct of short for 3 dimensional vectors
- just use int instead of short for the vector
- Compile all objs relying on this type with at least -O1 also for debug builds
Upstream bug
Commit to cherry-pick
No response
I am using a supported NDK
- I have checked and the NDK I'm using is currently supported
Affected versions
r27
Host OS
Mac, Linux
Host OS version
All versions
Affected ABIs
arm64-v8a
guy-nianticspatial