Closed andresv closed 2 years ago
Thanks for the report! We've been seeing this periodically for a while, I'd really like to nail this thing.
Do you think you could supply the llvm-ir
for building num-rational
? Prepending RUSTFLAGS='--emit=llvm-ir'
should be enough.
Also a couple more details if you don't mind:
Thank you!
Minimum reproducible code: https://github.com/andresv/rust-esp32-std-mini/tree/create-llvm-error
LLVM ERROR: Cannot select: 0x7fb37f9d65a0: f32,f32 = fsincos 0x7fb37f9d8468, /Users/andres/.rustup/toolchains/esp/lib/rustlib/src/rust/library/std/src/f32.rs:563:18 @[ /Users/andres/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-graphics-0.7.1/src/geometry/angle.rs:128:9 @[ /Users/andres/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-graphics-0.7.1/src/primitives/common/linear_equation.rs:83:27 ] ]
0x7fb37f9d8468: f32,ch = CopyFromReg 0x7fb36d4eafd8, Register:f32 %7, /Users/andres/.rustup/toolchains/esp/lib/rustlib/src/rust/library/std/src/f32.rs:563:18 @[ /Users/andres/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-graphics-0.7.1/src/geometry/angle.rs:128:9 @[ /Users/andres/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-graphics-0.7.1/src/primitives/common/linear_equation.rs:83:27 ] ]
0x7fb3dd886f68: f32 = Register %7
In function: _ZN17embedded_graphics10primitives6common15linear_equation20OriginLinearEquation10with_angle17h86e4498f469fd620E
error: could not compile `embedded-graphics`
warning: build failed, waiting for other jobs to finish...
LLVM ERROR: Error while trying to spill A2 from class AR: Cannot scavenge register without an emergency spill slot!
Thanks @andresv!
FYI that first error can be fixed by upgrading to 1.56 release.
Indeed first one is fixed by 1.56. Do you have a hunch the for second one. I try to currently strip down one of the libs to bare minimum hoping that this magically goes away.
FYI: tried with 1.57 and LLVM13 and got the same error.
This should now be fixed as of the 1.60.0.1 release of our fork. Thanks for the report and the helpful test case!
Got this error while building
num-rational
.