Skip to content
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

Revert "store ScalarPair via memset when one side is undef and the other side can be memset" #137894

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Mar 2, 2025

cc #137892
reverts #135335

r? oli-obk

@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 Mar 2, 2025
@compiler-errors compiler-errors changed the title No scalar pair opt Revert "store ScalarPair via memset when one side is undef and the other side can be memset" Mar 2, 2025
@compiler-errors compiler-errors marked this pull request as ready for review March 2, 2025 18:54
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

match cg_elem.val {
OperandValue::Immediate(v) => {
if try_init_all_same(bx, v) {
return;
}
}
OperandValue::Pair(a, b) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, on line 104:

The try_init_all_same tries to access a value that should be size u128, but since scalar pairs can be twice the size of u128 it ends up indexing out of bounds.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will need to both check that the initialized half of the scalarpair is the same value, then emit another memset for the uninitialized part, and be a bit more careful to use the correct size of the value being passed into the function.

// CHECK-NOT: select
// CHECK: br label %repeat_loop_header{{.*}}
// CHECK-NOT: switch
// CHECK: icmp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied all this from above :clueless:

@oli-obk
Copy link
Contributor

oli-obk commented Mar 3, 2025

@bors r+ rollup

Has a really tiny effect on binary sizes, but that's not worth separating out of a rollup

@bors
Copy link
Contributor

bors commented Mar 3, 2025

📌 Commit 5f575bc has been approved by oli-obk

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 Mar 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2025
…iaskrgr

Rollup of 12 pull requests

Successful merges:

 - rust-lang#135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies)
 - rust-lang#137852 (Remove layouting dead code for non-array SIMD types.)
 - rust-lang#137863 (Fix pretty printing of unsafe binders)
 - rust-lang#137882 (do not build additional stage on compiler paths)
 - rust-lang#137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset")
 - rust-lang#137902 (Make `ast::TokenKind` more like `lexer::TokenKind`)
 - rust-lang#137921 (Subtree update of `rust-analyzer`)
 - rust-lang#137922 (A few cleanups after the removal of `cfg(not(parallel))`)
 - rust-lang#137939 (fix order on shl impl)
 - rust-lang#137946 (Fix docker run-local docs)
 - rust-lang#137955 (Always allow rustdoc-json tests to contain long lines)
 - rust-lang#137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 70b9968 into rust-lang:master Mar 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 4, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2025
Rollup merge of rust-lang#137894 - compiler-errors:no-scalar-pair-opt, r=oli-obk

Revert "store ScalarPair via memset when one side is undef and the other side can be memset"

cc rust-lang#137892
reverts rust-lang#135335

r? oli-obk
@lqd
Copy link
Member

lqd commented Mar 6, 2025

We need this on beta to fix #137892

@rustbot label +beta-nominated cc @apiraino for late meeting addition (no rush, and no worries if it slips: 1.86 is a month away)

@lqd lqd added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 6, 2025
@rustbot

This comment was marked as outdated.

@apiraino
Copy link
Contributor

apiraino commented Mar 6, 2025

Beta backport accepted as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels handled by them.

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Mar 6, 2025
@cuviper cuviper mentioned this pull request Mar 7, 2025
@cuviper cuviper modified the milestones: 1.87.0, 1.86.0 Mar 7, 2025
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 7, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
[beta] backports

- Don't infer attributes of virtual calls based on the function body rust-lang#137669
- Revert "store ScalarPair via memset when one side is undef and the other side can be memset" rust-lang#137894

r? cuviper
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2025
[beta] backports

- Don't infer attributes of virtual calls based on the function body rust-lang#137669
- Revert "store ScalarPair via memset when one side is undef and the other side can be memset" rust-lang#137894
- Do not install rustup on Rust for Linux job rust-lang#137947

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

7 participants