Skip to content

compiler-builtins subtree update - #162077

Open
folkertdev wants to merge 30 commits into
rust-lang:mainfrom
folkertdev:compiler-builtins-sync-2026-09-31
Open

compiler-builtins subtree update#162077
folkertdev wants to merge 30 commits into
rust-lang:mainfrom
folkertdev:compiler-builtins-sync-2026-09-31

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

Subtree update of compiler-builtins to rust-lang/compiler-builtins@9eed682.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost

tgross35 and others added 30 commits August 17, 2026 03:51
The git registry now takes long enough to download that the 10 minute
timeout is hit.
Since 1.97, linker warnings can be denied via rustc.
This is the first version with LLVM23.
This was added as part of the original test infrastructure at
8e161a791a89 ("Expand and refactor teting infrastructure") but there
doesn't seem to be any reason to keep this restriction; qemu should
handle the threads fine.
With LLVM 23, containing f128 abi fixes, this now works
Benchmarks are designed to run in release mode so these can be pretty
slow. Running once with `release-checked` is sufficient.
Fixes rust-lang/compiler-builtins#1271 by removing `#[aapcs_on_arm]`:
`compiler-rt` only does the equivalent on ARM soft-float targets where
the `"C"` ABI is already AAPCS.

[ add PR description to commit - Trevor ]
This updates the rust-version file to f7d782a.
Some PRs want to make use of newer features.
This reverts commit 4feca6f3e62151f5cedacf3a5877b6200fb5af43.

The patch has landed in the 23.1-2026-07-22 branch.
This should make it fall back to a system-wide cargo-nextest install or
running the tests without nextest, which is probably still faster than
building nextest from source.
This error started appearing in the latest nightly:

    error: the loop variable `i` is used to index `ret.0`
       --> builtins-test/tests/mem.rs:149:14
        |
    149 |     for i in 0..N {
        |              ^^^^
        |
    note: for this index operation
       --> builtins-test/tests/mem.rs:150:9
        |
    150 |         ret.0[i] = i as u8;
        |         ^^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/main/index.html#needless_range_loop
        = note: `-D clippy::needless-range-loop` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(clippy::needless_range_loop)]`
    help: consider using an iterator and `.enumerate()`
        |
    149 -     for i in 0..N {
    149 +     for (i, <item>) in ret.0.iter_mut().enumerate().take(N) {
        |
Remove a mostly redundant type. There are some minor differences in the
`memcmp` benches because the slices are now the same length (`let s2:
&[u8] = black_box(&v2[1..]);` was trimming one).
We'd like to this add new `s390x` runner to `compiler-builtins`.

This new runner is provided by Canonical. After some iteration alongside
with Canonical folks, the `large` runner offers hardware spec similar to
the existing s390x provided by IBM and [delivers similar build
times](https://github.com/rust-lang/compiler-builtins/actions/runs/31516313575/job/93862267593?pr=1227).

Moreover, it runs on ubuntu-26.04 rather than ubuntu-24.04, and it
features a Github integration more friendly to `t-infra`, since the
related Github App requires less permissions to run.

We don't need to remove the s390x IBM runners right now. We propose
having both s390x runners running side by side for a while and circle
back after a few PRs, sticking with the Canonical one afterwards if
everything goes well.
There doesn't seem to be a straightforward way to build and test this
target anymore. Disable it for now since CI is broken.

Link: rust-lang/compiler-builtins#1306
This updates the rust-version file to 45f215f.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 45f215f
Filtered ref: 2e55b234943f43e4b52bbfba006744b9a4318124
Upstream diff: rust-lang/rust@f7d782a...45f215f

This merge was created using https://github.com/rust-lang/josh-sync.
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Aug 31, 2026
@folkertdev
folkertdev marked this pull request as ready for review August 31, 2026 20:18
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

compiler-builtins is developed in its own repository. If possible, consider making this change to rust-lang/compiler-builtins instead.

cc @tgross35

@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 Aug 31, 2026
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@folkertdev

Copy link
Copy Markdown
Contributor Author

@bors r+ p=1

@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 56095fb 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 Aug 31, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 31, 2026
…2026-09-31, r=folkertdev

compiler-builtins subtree update

Subtree update of `compiler-builtins` to rust-lang/compiler-builtins@9eed682.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 31, 2026
…2026-09-31, r=folkertdev

compiler-builtins subtree update

Subtree update of `compiler-builtins` to rust-lang/compiler-builtins@9eed682.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 31, 2026
…2026-09-31, r=folkertdev

compiler-builtins subtree update

Subtree update of `compiler-builtins` to rust-lang/compiler-builtins@9eed682.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
rust-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #162045 (`rust-analyzer` subtree update)
 - #162077 (compiler-builtins subtree update)
 - #137720 (support `#[target_feature(enable = ...)]` on `#[naked]` functions)
 - #160534 (stabilize smart pointer map functions)
 - #160551 (mir_build: Clearly distinguish or/refutable/irrefutable patterns during match lowering)
 - #161929 (explicitly track inherent const generic args kind)
 - #162063 (Switch dist-aarch64-linux to EC2 and update dist-x86_64-linux)
 - #161937 (A series of Polonius Alpha refactors)
 - #162014 (Move more `rustdoc-html` tests using `--test` into the right folder)
 - #162051 (`rustc_feature` cleanups)
 - #162055 (remove `_{style}` recovery for diagnostic structs)
 - #162075 (Move track_caller on closures gating to attribute parsing)
@folkertdev

Copy link
Copy Markdown
Contributor Author

I suspect this PR is the cause of #162089 (comment), because the subtree update makes changes to float libcalls. Anyhow, can't hurt to just check that.

@bors r-

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 31, 2026
@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#162089), which was unapproved.

View changes since this unapproval

@folkertdev

Copy link
Copy Markdown
Contributor Author

@bors try jobs=armhf-gnu

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
… r=<try>

compiler-builtins subtree update


try-job: armhf-gnu
@folkertdev

Copy link
Copy Markdown
Contributor Author

I've now reproduced the failure locally, cc @beetrees

Apparently f16 is special. The comment here seems to confirm that

https://github.com/llvm/llvm-project/blob/5aae245b51305995325de87fde3a096b856371e8/llvm/include/llvm/IR/RuntimeLibcalls.td#L2575-L2581

The half <-> float conversion functions are always soft-float on non-watchos platforms

And that does appear to be happening, e.g. https://godbolt.org/z/4EfavG1Px in the armv7-unknown-linux-gnueabihf case moves from s0 to r0, calls and then moves back from r0 to s0. On watchos that final mov is not needed because the value is already in the right (float) register.

@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

💔 Test for aa5454a failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests/ui/float/conv-bits-runtime-const.rs stdout ----

error: test did not exit with success! code=Some(101) so test would pass with `run-fail`
status: exit status: 101
command: RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/conv-bits-runtime-const/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/conv-bits-runtime-const/a", waiting for result
------------------------------------------
---

---- [ui] tests/ui/float/conv-bits-runtime-const.rs stdout end ----
---- [ui] tests/ui/float/classify-runtime-const.rs#noopt stdout ----

error in revision `noopt`: test did not exit with success! code=Some(101) so test would pass with `run-fail`
status: exit status: 101
command: RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/classify-runtime-const.noopt/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/classify-runtime-const.noopt/a", waiting for result
------------------------------------------
--- stderr -------------------------------

thread 'main' (6074) panicked at /checkout/tests/ui/float/classify-runtime-const.rs:97:1:
assertion `left == right` failed: f16 :: is_finite (-1.0 / black_box(0.0)) produces wrong result
  left: true
 right: false
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

---- [ui] tests/ui/float/classify-runtime-const.rs#noopt stdout end ----
---- [ui] tests/ui/float/classify-runtime-const.rs#opt stdout ----

error in revision `opt`: test did not exit with success! code=Some(101) so test would pass with `run-fail`
status: exit status: 101
command: RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/classify-runtime-const.opt/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/float/classify-runtime-const.opt/a", waiting for result
------------------------------------------
--- stderr -------------------------------

thread 'main' (6083) panicked at /checkout/tests/ui/float/classify-runtime-const.rs:97:1:
assertion `left == right` failed: f16 :: is_finite (black_box(0.0) * black_box(T::INFINITY)) produces wrong result
  left: true
 right: false
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

---- [ui] tests/ui/float/classify-runtime-const.rs#opt stdout end ----

@tgross35

tgross35 commented Sep 1, 2026

Copy link
Copy Markdown
Member

@bors rollup=never

@tgross35

tgross35 commented Sep 1, 2026

Copy link
Copy Markdown
Member

In reviewing rust-lang/compiler-builtins@11eda6a think I overlooked that __gnu_h2f_ieee and __gnu_f2h_ieee always pass as u16/u32

@tgross35

tgross35 commented Sep 1, 2026

Copy link
Copy Markdown
Member

LLVM is doing the right codegen but their logic isn't correct. Patches in the works...

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) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

9 participants