Internal llvm error: UNREACHABLE executed at ARMCallingConv.h:213

Initially this one got triggered from rustc, so I don’t have a simple test case for you, unfortunately.

IR after processing through bugpoint:


rustc --target thumbv7em-linux-eabi -Ctarget-cpu=cortex-m4 --opt-level 2 libcore/
Unexpected member type for HA
UNREACHABLE executed at /Users/farcaller/temp/rust/src/llvm/lib/Target/ARM/ARMCallingConv.h:213!

Compiles as expected if either -O2 or target-cpu is removed.

This looks very similar to the issue fixed[*] in r209650. Are you
running on trunk, or an older build of LLVM?



[*] Well, we generate *some* code now. I believe there are still
issues around strict AAPCS-VFP conformance on Cortex-M4.