Skip to content

Conversation

@tgross35
Copy link
Contributor

Subtree update of compiler-builtins to rust-lang/compiler-builtins@8a3e35b.

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

r? @ghost

tgross35 and others added 25 commits December 4, 2025 18:15
`iai-callgrind` was renamed to `gungraun` and had a new release. Update
everything to match.

There shouldn't be any changes to observable behavior here.
This is already the default but gungraun requires it, so make it
explicit.
The latest release of gungraun uses global symbols to register tests.
Since it doesn't know about modules, these conflict.

Add the module name so this isn't an issue, but keep the modules around
because they are useful for organization.
So far we haven't been running the `mem_icount` benches in CI, but this
would be useful. Use a glob pattern for the test so this and future
icount benchmarks all get run.
This is kind of a retry at rust-lang/compiler-builtins#898. One of the
problems there was that it would have added overhead and regressed
performance for typical inputs.

Unlike that PR, this doesn't aim for sub-linear scaling; the cost of
evaluating `fmod(x, y)` is still roughly proportional to `log2(|x/y|)`.
However, the constant factor is much better. Running the
`random`-benchmarks locally, I got walltime reductions of

    fmodf16:  -56.9%
    fmodf:    -85.0%
    fmod:     -95.4%
    fmodf128: -98.7%
* `repe` is "repeat while equal", which only makes sense for string
  comparisons. Change it to `rep`. (The encoding is the same so there is
  no performance change.)
* Remove an unneeded `test`. This was added in ae557bde4efc ("Skip rep
  movsb in copy_backward if possible"). The `jz` was removed in
  ef37a23d8417 ("Remove branches around rep movsb/stosb") but the `test`
  was missed.
* Remove an incorrect `preserves_flags`; `add` and `sub` affect flags.

Discussion: rust-lang/compiler-builtins#911
Fixes: ef37a23d8417 ("Remove branches around rep movsb/stosb")
Fixes: c30322aafc9c ("Align destination in mem* instructions.")

[ Added details to the commit message - Trevor ]
Resolve the severe imprecision (~2%) that is due to inconsistent
rounding.

Closes: rust-lang/compiler-builtins#1021
This was originally attempted at [1], but the numbers seemed to indicate
that tests weren't being run or counted completely. That issue appears
to be resolved, so add benchmarks for Aarch64.

[1]:  rust-lang/compiler-builtins#930
Jorge hasn't been very involved with these crates for a while (thank you
for getting these super important projects going!). Update the `authors`
field to include, as far as I am aware, everyone who has effectively
maintained `compiler-builtins` at some point in time.

This field is dropped from non-published crates.
Currently the benchmark CI jobs prints multiple pages of paths from the
extracted archive, since `tar` is run with `v`. This is a lot of output
that is usually just noise in CI.

Switch to printing the paths from python instead, limiting to a depth of
three segments (and deduplicating). Removing it completely was an
option, but it's still nice to have a hint about what gets updated.
Missed as part of 936db7f5e890 ("ci: Update the default branch name").
Make it easier to explain possible changes to results on CI.
`macos-13` is being phased out. Now that GitHub has x86 runners with
MacOS 15, switch those.
This updates the rust-version file to 2dc3024.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 2dc3024
Filtered ref: dab12aee0f52f7b83cc62ae565855c731bed502f
Upstream diff: rust-lang/rust@47cd712...2dc3024

This merge was created using https://github.com/rust-lang/josh-sync.
Avoid using `Ord::clamp` in the `f16`-specific part of the generic
`scalbn`.

It turned out to be redundant anyway, as both callsites follow a pattern
like
```
if n < negative_val {
    let foo = (n + positive_val).clamp(negative_val, positive_val);
}
```
and `n < negative_val < 0` implies `n + positive_val < positive_val`.

Fixes: rust-lang/compiler-builtins#1046
Due to an erroneous overflow threshold, `expm1f` was incorrectly
returning `inf` for inputs in the range `[88.72169, 88.72283]`. This
additionally caused `sinhf` to return `NaN` for inputs in that range.

The bug was ported from the original in musl, which has since been fixed
in [1].

[1]: https://git.musl-libc.org/cgit/musl/commit/?id=964104f9f0e056cf58d9defa0b716d7756f040f6
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2025

⚠️ 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.

@tgross35
Copy link
Contributor Author

Faster fmod, coming to you soon!

@bors r+ rollup=never p=1

@bors
Copy link
Collaborator

bors commented Dec 17, 2025

📌 Commit a9fa80c has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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 Dec 17, 2025
@bors
Copy link
Collaborator

bors commented Dec 17, 2025

⌛ Testing commit a9fa80c with merge 58b270b...

@bors
Copy link
Collaborator

bors commented Dec 17, 2025

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing 58b270b to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 17, 2025
@bors bors merged commit 58b270b into rust-lang:main Dec 17, 2025
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 17, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing ec6f622 (parent) -> 58b270b (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 58b270bebef86316f70174d5a1ea4eb19ef91b62 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 6295.1s -> 8132.9s (+29.2%)
  2. dist-x86_64-apple: 8765.1s -> 7234.3s (-17.5%)
  3. x86_64-rust-for-linux: 3181.0s -> 2722.7s (-14.4%)
  4. tidy: 149.6s -> 170.6s (+14.0%)
  5. dist-apple-various: 3637.8s -> 4139.1s (+13.8%)
  6. x86_64-gnu-llvm-21-2: 5942.7s -> 5171.2s (-13.0%)
  7. dist-x86_64-illumos: 5638.3s -> 6337.1s (+12.4%)
  8. pr-check-1: 1919.9s -> 1683.4s (-12.3%)
  9. x86_64-gnu-miri: 5150.2s -> 4519.3s (-12.2%)
  10. dist-aarch64-msvc: 5538.6s -> 6215.9s (+12.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

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) merged-by-bors This PR was explicitly merged by bors. 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.

6 participants