Skip to content

Stop using uadd.with.overflow #145144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2025
Merged

Conversation

scottmcm
Copy link
Member

@scottmcm scottmcm commented Aug 9, 2025

As discussed in #t-compiler/llvm > `uadd.with.overflow` (again) @ 💬, stop emitting uadd.with.overflow in favour of add+icmp instead.

r? nikic

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. labels Aug 9, 2025
@scottmcm
Copy link
Member Author

scottmcm commented Aug 9, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Aug 9, 2025

⌛ Trying commit 8831c5b with merge d6fe4fe

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Aug 9, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 9, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 9, 2025

☀️ Try build successful (CI)
Build commit: d6fe4fe (d6fe4fe6836a625695610af12809a3aa52d9647a, parent: 4c7749e8c8e50ad146da599eea3a250160c1bc2b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d6fe4fe): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.5%, -0.2%] 5
Improvements ✅
(secondary)
-2.0% [-2.9%, -0.2%] 9
All ❌✅ (primary) -0.4% [-0.5%, -0.2%] 5

Max RSS (memory usage)

Results (primary 4.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.5% [4.5%, 4.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.5% [4.5%, 4.5%] 1

Cycles

Results (secondary -0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.8% [-5.8%, -5.8%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 19
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 5
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 19

Bootstrap: 463.02s -> 464.507s (0.32%)
Artifact size: 377.40 MiB -> 377.38 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 9, 2025
@nikic
Copy link
Contributor

nikic commented Aug 9, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 9, 2025

📌 Commit 8831c5b has been approved by nikic

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 Aug 9, 2025
@bors
Copy link
Collaborator

bors commented Aug 10, 2025

⌛ Testing commit 8831c5b with merge 7f7b8ef...

@bors
Copy link
Collaborator

bors commented Aug 10, 2025

☀️ Test successful - checks-actions
Approved by: nikic
Pushing 7f7b8ef to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 10, 2025
@bors bors merged commit 7f7b8ef into rust-lang:master Aug 10, 2025
12 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 10, 2025
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 8712e45 (parent) -> 7f7b8ef (this PR)

Test differences

Show 20 test diffs

Stage 1

  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-20: pass -> [missing] (J2)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 19) -> [missing] (J2)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs: [missing] -> ignore (ignored when the LLVM version 19.1.1 is older than 20.0.0) (J4)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-20: ignore (ignored when the LLVM version 19.1.1 is older than 20.0.0) -> [missing] (J4)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: pass -> [missing] (J4)

Stage 2

  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs: [missing] -> ignore (ignored when the LLVM version 19.1.1 is older than 20.0.0) (J0)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-20: ignore (ignored when the LLVM version 19.1.1 is older than 20.0.0) -> [missing] (J0)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 19) -> [missing] (J1)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: ignore (ignored when the LLVM version (21.1.0) is newer than majorversion 19) -> [missing] (J3)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J5)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-20: ignore (only executed when the architecture is x86_64) -> [missing] (J5)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs: [missing] -> pass (J6)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-20: pass -> [missing] (J6)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: pass -> [missing] (J7)
  • [assembly] tests/assembly-llvm/x86_64-bigint-helpers.rs#llvm-pre-20: ignore (only executed when the architecture is x86_64) -> [missing] (J8)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 7f7b8ef27d86c865a7ab20c7c42f50811c6a914d --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. x86_64-apple-1: 8159.0s -> 6329.5s (-22.4%)
  2. dist-aarch64-apple: 6400.6s -> 5159.8s (-19.4%)
  3. pr-check-2: 2674.4s -> 2195.6s (-17.9%)
  4. x86_64-gnu-llvm-19-3: 7455.9s -> 6610.1s (-11.3%)
  5. x86_64-rust-for-linux: 2927.7s -> 2613.9s (-10.7%)
  6. pr-check-1: 1677.9s -> 1508.3s (-10.1%)
  7. aarch64-gnu-llvm-19-2: 2545.2s -> 2302.9s (-9.5%)
  8. x86_64-gnu-debug: 6969.9s -> 6356.8s (-8.8%)
  9. x86_64-gnu-llvm-20-1: 3542.9s -> 3236.7s (-8.6%)
  10. i686-gnu-nopt-1: 7835.4s -> 7168.9s (-8.5%)
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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7f7b8ef): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 7
Improvements ✅
(secondary)
-0.5% [-0.8%, -0.2%] 14
All ❌✅ (primary) -0.2% [-0.3%, 0.2%] 8

Max RSS (memory usage)

Results (primary 2.9%, secondary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.9% [2.6%, 3.3%] 3
Regressions ❌
(secondary)
2.2% [2.0%, 2.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.6%, 3.3%] 3

Cycles

Results (primary 2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

Binary size

Results (primary -0.0%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 20
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 5
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 20

Bootstrap: 462.592s -> 463.378s (0.17%)
Artifact size: 377.39 MiB -> 377.34 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 10, 2025
@scottmcm scottmcm deleted the unsigned_overflow_intr branch August 10, 2025 16:28
@nnethercote
Copy link
Contributor

The icount and binary size improvements greatly outweigh the regressions. Wall-time numbers are a bit weird, not sure what to make of them.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 10, 2025
@scottmcm
Copy link
Member Author

Wonder if wall time was mostly a glitch; a bunch seem to have come down again in #145210 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants