Skip to content

c-b: Export fmaf16 now that we have an implementation - #162606

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
tgross35:fmaf16-fallback
Sep 18, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
tgross35:fmaf16-fallback

Conversation

@tgross35

@tgross35 tgross35 commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

tracking issue: #116909

LLVM doesn't currently emit this but probably should, and this is valuable as a fallback in any case.

r? @folkertdev

@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2026
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 10, 2026
@rust-log-analyzer

This comment has been minimized.

@tgross35

Copy link
Copy Markdown
Member Author

Well that's not the error I expected to see from this change... no idea how that triggered

@folkertdev

Copy link
Copy Markdown
Contributor

I can reproduce the error with ./x build library --set rust.debug-assertions-std=true, so compiler-builtins calls something from core and it should not?!

@folkertdev

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 12, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35

Copy link
Copy Markdown
Member Author

Seems like debug_assert_eq! is problematic, added a commit that seems to fix it locally.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 17, 2026
@rust-log-analyzer

This comment has been minimized.

If `fmaf16` is exported, the existing version hits errors like:

    error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `core::fmt::num::<impl core::fmt::Debug for u64>::fmt` to `core::fmt::num::imp::<impl core::fmt::Display for u64>::fmt`
       --> library/core/src/fmt/num.rs:85:17
        |
     79 | / macro_rules! impl_Debug {
     80 | |     ($($T:ident)*) => {
     81 | |         $(
     82 | |             #[stable(feature = "rust1", since = "1.0.0")]
    ...   |
     85 | |                 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        | |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...   |
     96 | |     };
     97 | | }
        | |_- in this expansion of `impl_Debug!`
    ...
    595 | / impl_Debug! {
    596 | |     i8 i16 i32 i64 i128 isize
    597 | |     u8 u16 u32 u64 u128 usize
    598 | | }
        | |_- in this macro invocation

Presumably this comes from the call to `panicking::assert_failed!` that
needs to be monomorphized. Avoid any formatting by using a plain
`debug_assert!` if we are building the crate as compiler-builtins.
LLVM doesn't currently emit this but probably should, and this is
valuable as a fallback in any case.
@folkertdev

Copy link
Copy Markdown
Contributor

Nice

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 362d116 has been approved by folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2026
@folkertdev folkertdev added the F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` label Sep 17, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 17, 2026
…tdev

c-b: Export `fmaf16` now that we have an implementation

tracking issue: rust-lang#116909

LLVM doesn't currently emit this but probably should, and this is valuable as a fallback in any case.
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #161987 (fix `is_single_fp_element` for `s390x` and `x86`)
 - #162366 (Replace hard linked `metadata.rmeta` with a copy when finalizing the incremental compilation session dir fails)
 - #162552 (RISC-V: Add Zmmul target feature)
 - #162602 (Ensure concurrent rustc instances in the same process correctly lock the session dir)
 - #162885 (Remove one remaining use of `Level::Help`)
 - #162606 (c-b: Export `fmaf16` now that we have an implementation)
 - #162817 (rustc_{codegen_,}llvm: adapt to new ThreadModel API)
 - #162860 (offload: add libLLVM rpath for libomptarget)
 - #162895 (Avoid derive edits on macro-generated types)
 - #162899 (Error on invalid placements of the `cfi_encoding` attribute.)
@rust-bors
rust-bors Bot merged commit 32eaee3 into rust-lang:main Sep 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 18, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 18, 2026
Rollup merge of #162606 - tgross35:fmaf16-fallback, r=folkertdev

c-b: Export `fmaf16` now that we have an implementation

tracking issue: #116909

LLVM doesn't currently emit this but probably should, and this is valuable as a fallback in any case.
@tgross35
tgross35 deleted the fmaf16-fallback branch September 19, 2026 03:20
pull Bot pushed a commit to xtqqczze/rust-lang-rust-analyzer that referenced this pull request Sep 21, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#161987 (fix `is_single_fp_element` for `s390x` and `x86`)
 - rust-lang/rust#162366 (Replace hard linked `metadata.rmeta` with a copy when finalizing the incremental compilation session dir fails)
 - rust-lang/rust#162552 (RISC-V: Add Zmmul target feature)
 - rust-lang/rust#162602 (Ensure concurrent rustc instances in the same process correctly lock the session dir)
 - rust-lang/rust#162885 (Remove one remaining use of `Level::Help`)
 - rust-lang/rust#162606 (c-b: Export `fmaf16` now that we have an implementation)
 - rust-lang/rust#162817 (rustc_{codegen_,}llvm: adapt to new ThreadModel API)
 - rust-lang/rust#162860 (offload: add libLLVM rpath for libomptarget)
 - rust-lang/rust#162895 (Avoid derive edits on macro-generated types)
 - rust-lang/rust#162899 (Error on invalid placements of the `cfi_encoding` attribute.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants