rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
93.93k stars 12.09k forks source link

`f16`/`f128` fallback code is not getting inlined #125229

Closed tgross35 closed 1 week ago

tgross35 commented 2 weeks ago

From @ojeda, RUSTC_BOOTSTRAP=1 rustc --edition=2021 -Csymbol-mangling-version=v0 --cfg no_fp_fmt_parse --crate-type rlib library/core/src/lib.rs --sysroot=/dev/null ICEs at no symbol mangling. --cfg no_fp_fmt_parse is required for the repro.

The symbol mangling ICE was fixed in https://github.com/rust-lang/rust/pull/123816 which is nominated for beta backport, but this seems to hint that something isn't marked #[inline] that should be. I suspect that adding the above --cfg would probably break cg_gcc and cg_clif.

From Miguel, this uses the most recent beta rustc 1.79.0-beta.4 (a26981974 2024-05-10)

tgross35 commented 2 weeks ago

@rustbot label +F-f16_and_f128 +T-libs -needs-triage

beetrees commented 2 weeks ago

The fallback Debug impls for f16 and f128 are lacking an #[inline] hint here.

tgross35 commented 2 weeks ago

I did see that, just didn’t get a chance to test a fix for it yet. Care to put a patch up? (If not, I'll get to it at some point)

beetrees commented 2 weeks ago

PR at #125252.