Skip to content

No longer auto-inline f16 and f128 on well-supported platforms - #162883

Open
tgross35 wants to merge 1 commit into
rust-lang:mainfrom
tgross35:f16-f128-autoinline
Open

tgross35 wants to merge 1 commit into
rust-lang:mainfrom
tgross35:f16-f128-autoinline

Conversation

@tgross35

@tgross35 tgross35 commented Sep 17, 2026

Copy link
Copy Markdown
Member

In 5d81891 ("Always inline functions signatures containing f16 or f128"), these types were changed to automatically inline so codegen wouldn't crash on poorly-supported platforms. We have since gained a cfg to reflect the type's codegen reliability. Update so we only check and auto-inline based on type if this config is set, which makes f16 and f128 act more like any other type on most platforms.

We still can't remove this entirely since a lot of API in std wouldn't get inlined and would crash the few remaining poorly-supported backend+target combinations.

Followup to #133050.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 17, 2026
In 5d81891 ("Always inline functions signatures containing `f16` or
`f128`"), these types were changed to automatically inline so codegen
wouldn't crash on poorly-supported platforms. We have since gained a cfg
to reflect the type's codegen reliability. Update so we only check and
auto-inline based on type if this config is set, which makes `f16` and
`f128` act more like any other type on most platforms.

We still can't remove this entirely since a lot of API in `std` wouldn't
get inlined and would crash the few remaining poorly-supported
backend+target combinations.
@tgross35 tgross35 added the F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` label Sep 17, 2026
@tgross35

Copy link
Copy Markdown
Member Author

PR CI covers well-supported targets, checking some that still have broken f16/f128

@bors try jobs=llvm-21,dist-powerpc-linux,test-x86_64-mingw*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
No longer auto-inline `f16` and `f128` on well-supported platforms


try-job: *llvm-21*
try-job: dist-powerpc-linux
try-job: test-x86_64-mingw*
@tgross35
tgross35 marked this pull request as ready for review September 17, 2026 05:25
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 76 candidates
  • Random selection from 22 candidates

@tgross35

Copy link
Copy Markdown
Member Author

Assuming CI reflects my local tests,
r? @saethlin
since you reviewed the original two years ago

@rustbot rustbot assigned saethlin and unassigned adwinwhite Sep 17, 2026
@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: ecad3bf (ecad3bfd7270db19306e78af81adf430220634aa)
Base parent: 923c95c (923c95cdf5ba65cea505aa2ea829f578e1506ed8)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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