Closed
Description
On cross-compiling libcore, if cpu is locked in to cortex-m4
and -O2 is used, llvm fails with unreachable:
rustc --target thumbv7em-linux-eabi -Ctarget-cpu=cortex-m4 --opt-level 2 libcore/lib.rs
Unexpected member type for HA
UNREACHABLE executed at /Users/farcaller/temp/rust/src/llvm/lib/Target/ARM/ARMCallingConv.h:213!
Compiling without --opt-level 2
or -Ctarget-cpu=cortex-m4
works as expected.
PS: I think this is an LLVM bug, but I cannot figure out a small test case.
Activity
alexcrichton commentedon Jun 13, 2014
This is the IR run through bugpoint: https://gist.github.com/ff0487dadc8576d07bdf.
This isn't very actionable on our end as this definitely looks like an LLVM bug, so I'm going to close this. I would recommend reporting the bugpoint output upstream after trying to minimize it further.
farcaller commentedon Jun 14, 2014
It seems that this one is actually fixed at r209650 of llvm. What's the rust policy to bump tracking llvm version?
alexcrichton commentedon Jun 14, 2014
If you make a pull request against
rust-lang/llvm
with the new commits, I can push so you can update the submodule.Optimize documentation lints **a lot** (2/2) (7.5% -> 1%) (rust-lang#…