Skip to content

Use mul nuw nsw in intrinsics::copy#157588

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scottmcm:copy-nsuw
Jun 8, 2026
Merged

Use mul nuw nsw in intrinsics::copy#157588
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
scottmcm:copy-nsuw

Conversation

@scottmcm

@scottmcm scottmcm commented Jun 7, 2026

Copy link
Copy Markdown
Member

Essentially the same as #157560, just for copy instead of copy_nonoverlapping.

Yeah, in fact both copy and copy_nonoverlapping could use this since we know the result must be at most isize::MAX else it cannot be inbounds.
~ #157560 (comment)

r? saethlin

Essentially the same as 157560, just for `copy` instead of `copy_nonoverlapping`.
@rustbot rustbot added 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 Jun 7, 2026
@saethlin

saethlin commented Jun 8, 2026

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 8, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 8, 2026
Use `mul nuw nsw` in `intrinsics::copy`
@rust-bors

rust-bors Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 7895196 (7895196e55d6e306ae697bcff776ed0eb501a637, parent: f20a92ec01483dc5c58e90e246f266bdad822d86)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7895196): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 5.6%, secondary -0.8%)

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

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

Cycles

Results (primary 2.7%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 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.0% [0.0%, 0.0%] 4
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 4

Bootstrap: 516.04s -> 515.731s (-0.06%)
Artifact size: 401.28 MiB -> 401.30 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 8, 2026
@saethlin

saethlin commented Jun 8, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 871664e has been approved by saethlin

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 Jun 8, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 8, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #157599 (`rust-analyzer` subtree update)
 - #157298 (Use alternate means of detecting enums in `is_udt`)
 - #155338 (Staticlib hide internal symbols)
 - #157402 (Implement feature `integer_casts`)
 - #157452 (Fix WASI links)
 - #157535 (Rename `errors.rs` file to `diagnostics.rs` (2/N))
 - #157585 (Rename `errors.rs` file to `diagnostics.rs` (3/N))
 - #157588 (Use `mul nuw nsw` in `intrinsics::copy`)
 - #157592 (Suggest comma multiple)
@rust-bors rust-bors Bot merged commit 87749ce into rust-lang:main Jun 8, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 8, 2026
rust-timer added a commit that referenced this pull request Jun 8, 2026
Rollup merge of #157588 - scottmcm:copy-nsuw, r=saethlin

Use `mul nuw nsw` in `intrinsics::copy`

Essentially the same as #157560, just for `copy` instead of `copy_nonoverlapping`.

> Yeah, in fact both copy and copy_nonoverlapping could use this since we know the result must be at most isize::MAX else it cannot be inbounds.
> ~ #157560 (comment)

r? saethlin
@scottmcm scottmcm deleted the copy-nsuw branch June 8, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants