Skip to content

GVN: Avoid merging borrows from the dereferenced value#150270

Closed
dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:gvn-borrow-borrow
Closed

GVN: Avoid merging borrows from the dereferenced value#150270
dianqk wants to merge 1 commit into
rust-lang:mainfrom
dianqk:gvn-borrow-borrow

Conversation

@dianqk

@dianqk dianqk commented Dec 22, 2025

Copy link
Copy Markdown
Member

The PR is separated from #147886.

When replacing _3 with _2, we have to know _2 is valid at _3 = *_1;.

let mut _2: &A;
let mut _3: &A;

_2 = *_1;
// ...
_3 = *_1;

r? cjgillot

@rustbot

rustbot commented Dec 22, 2025

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Dec 22, 2025
@dianqk

dianqk commented Dec 28, 2025

Copy link
Copy Markdown
Member Author

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2025
@dianqk

dianqk commented Jan 3, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #150485.

@dianqk dianqk closed this Jan 3, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 3, 2026
@dianqk dianqk deleted the gvn-borrow-borrow branch January 3, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants