Do not unify dereferences of shared borrows in GVN#132461
Do not unify dereferences of shared borrows in GVN#132461cjgillot wants to merge 3 commits intorust-lang:masterfrom
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in coverage tests. cc @Zalathar |
|
Do you think it makes sense to invalidate all known |
|
Thanks! |
| // CHECK: _0 = Eq({{.*}}, {{.*}}); | ||
| // CHECK-NOT: _0 = const true; | ||
| let y = **x; | ||
| unsafe { unknown() }; |
There was a problem hiding this comment.
Ah, that's drowning in all the other diff noise for tests changing their output.^^
I find mir-opt diffs completely unreadable so I largely skip them...
| @@ -0,0 +1,24 @@ | |||
| // EMIT_MIR_FOR_EACH_PANIC_STRATEGY | |||
There was a problem hiding this comment.
| // EMIT_MIR_FOR_EACH_PANIC_STRATEGY | |
| //! Regression test for <https://github.com/rust-lang/rust/issues/130853> | |
| // EMIT_MIR_FOR_EACH_PANIC_STRATEGY |
|
Okay, the code diff as well as the new test seem right to me. I have absolutely no idea what to do with the remaining diff.^^ |
| // CHECK: assert(const true, | ||
| // CHECK: [[a]] = const 2_u32; | ||
| // CHECK-NOT: assert(const true, | ||
| // CHECK-NOT: [[a]] = const 2_u32; |
There was a problem hiding this comment.
Seems odd to have tests asserting that an optimization does not happen. Shouldn't we instead keep the old assertions but comment them out?
There was a problem hiding this comment.
There is COM: prefix for that, i.e. COM: CHECK: assert(const true, but it nice to add fixme for that, to not to forget what it was about.
|
@rustbot author |
|
☔ The latest upstream changes (presumably #132863) made this pull request unmergeable. Please resolve the merge conflicts. |
Do not unify dereferences of shared borrows in GVN Repost of rust-lang#132461, the last commit applies my suggestions. Fixes rust-lang#130853
|
Closing in favor of #133474 |
…errors Do not unify dereferences of shared borrows in GVN Repost of rust-lang#132461, the last commit applies my suggestions. Fixes rust-lang#130853
Do not unify dereferences of shared borrows in GVN Repost of rust-lang/rust#132461, the last commit applies my suggestions. Fixes rust-lang/rust#130853
The pass as written does not differentiate single deref or nested derefs, so I'm gating the entire unification on
-Zunsound-mir-opts. This has the unfortunate effect of preventing reading from statics.Fixes #130853
r? @RalfJung