Description
I wrote some code which extracts the two halves of a u64x4, calls some arm neon inline assembly on each half, and combines them again. Trying to compile that code for arm crashes the compiler deep in the LLVM code.
I had previously used the exact same inline assembly without any problem, but I rewrote the surrounding code (previously, the two halves were already kept separate as a pair of u64x2).
The crashing code can be found at cesarb/blake2-rfc@36708b2 (the working code with the same inline asm can be found two commits before that one). Unfortunately, I failed to extract a reduced testcase; the crash only happens when the code is inlined inside the rest of the BLAKE2 core. The crash location within the LLVM code seems to point to some register allocation issue.
To reproduce the crash, you need a nightly rustc configured for cross-compiling to android, checkout that commit, and run the following command: cargo build -v --release --features="bench simd_asm" --target=arm-linux-androideabi
(the offending code is gated by the "simd_asm" feature in the Cargo.toml
).
Expected result: compile correctly so I can copy and modify the rustc command line to add a -C target-cpu=cortex-a9 -C target-feature=+neon
and run the tests and benchmarks on my phone.
What happens: Process didn't exit successfully: [...] (signal: 4)
(which is SIGILL according to kill -l
). Using rust-gdb
reveals the crash is deep within the LLVM code.
Versions:
rustc 1.3.0-dev (eefd6b2c1 2015-07-27)
binary: rustc
commit-hash: eefd6b2c12c8257c85f2121d7f5a3694b192e755
commit-date: 2015-07-27
host: x86_64-unknown-linux-gnu
release: 1.3.0-dev
cargo 0.4.0 (1ce0146 2015-07-27) (built 2015-07-27)