Uh oh!
There was an error while loading. Please reload this page.
Disable the SimplifyArmIdentity pass - #73262
Conversation
rust-highfive
commented
Jun 12, 2020
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
oli-obk
commented
Jun 12, 2020
If we aren't in a rush about this, please open a PR against master with this change that we can backport to beta. |
This pass is buggy so I'm disabling it to fix a stable-to-beta regression. Related to rust-lang#73223
bors
commented
Jun 12, 2020
☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts. |
5f63f6d to
f160583Comparewesleywiser
commented
Jun 12, 2020
Rebased |
oli-obk
commented
Jun 12, 2020
@bors r+ |
bors
commented
Jun 12, 2020
📌 Commit f160583 has been approved by |
wesleywiser
commented
Jun 12, 2020
Since the linked PR is @bors p=1 |
SimplifyArmIdentity pass on betaSimplifyArmIdentity passDylan-DPC-zz
commented
Jun 12, 2020
bumping this higher to run after the current rollup @bors p=3 |
bors
commented
Jun 12, 2020
⌛ Testing commit f160583 with merge 664f6df82aa3cc4f3ad1eec7dd277b061938f7da... |
bors
commented
Jun 12, 2020
💔 Test failed - checks-azure |
Dylan-DPC-zz
commented
Jun 12, 2020
@bors retry |
Dylan-DPC-zz
commented
Jun 12, 2020
@bors retry |
Dylan-DPC-zz
commented
Jun 12, 2020
@bors retru p=1000 |
Dylan-DPC-zz
commented
Jun 12, 2020
@bors retry p=1000 |
bors
commented
Jun 12, 2020
Dylan-DPC-zz
commented
Jun 12, 2020
@bors treeclosed- |
Dylan-DPC-zz
commented
Jun 12, 2020
@bors treeclosed-- |
bors
commented
Jun 12, 2020
☀️ Test successful - checks-azure |
nnethercote
commented
Jun 15, 2020
This caused a small perf regression in a couple of @wesleywiser: will this pass be re-enabled in the future? |
wesleywiser
commented
Jun 16, 2020
@nnethercote Yes! I'm working on finishing up some changes that will re-enable this on nightly. |
pnkfelix
commented
Jun 17, 2020
The manner in which this was disabled seems relevant to a recent wg-mir-opt conversation on zulip. I guess if opt-level >= 2 is generally known to denote potentially buggy optimizations, then what's done here is okay. But I don't know if that's the consensus based on the above linked conversation... |
pnkfelix
commented
Jun 17, 2020
(I was tempted to unilaterally beta approve this, but I'm hesitating due to not knowing if it matches the semantics everyone else expects from the mir-opt levels. We'll just discuss as a group tomorrow instead.) |
wesleywiser
commented
Jun 17, 2020
@pnkfelix The current state is that |
nikomatsakis
commented
Jun 18, 2020
@wesleywiser I presume you'll add some tests that demonstrate the bug, too? |
wesleywiser
commented
Jun 18, 2020
@nikomatsakis Yes, I'm adding some regression tests in the next PR. |
pnkfelix
commented
Jun 18, 2020
Discussed at T-compiler meeting; approved for beta backport |
| impl<'tcx> MirPass<'tcx> for SimplifyArmIdentity { | ||
| fn run_pass(&self, _: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) { | ||
| fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'tcx>) { | ||
| if tcx.sess.opts.debugging_opts.mir_opt_level < 2 { |
There was a problem hiding this comment.
Uh, could we maybe not keep buggy passes running at all? I think a -Zmir-opt-level=3 miscompilation is a soundness bug just like it would be at a lower optimization level.
C/C++ programmers seem to associate "high optimization levels" with "creates buggy code", but really that's awful and we shouldn't do it.
There was a problem hiding this comment.
@RalfJung I opened a related MCP: rust-lang/compiler-team#319
If you have thoughts about it, please leave a comment there. Thanks!
…ulacrum [beta] backports This PR backports the following: * Make novel structural match violations not a `bug` rust-lang#73446 * linker: Never pass `-no-pie` to non-gnu linkers rust-lang#73384 * Disable the `SimplifyArmIdentity` pass rust-lang#73262 * Allow inference regions when relating consts rust-lang#73225 * Fix link error with #[thread_local] introduced by rust-lang#71192rust-lang#73065 * Ensure stack when building MIR for matches rust-lang#72941 * Don't create impl candidates when obligation contains errors rust-lang#73005 r? @ghost
This pass is buggy so I'm disabling it to fix a stable-to-beta
regression.
Related to #73223