-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix miscompile in SimplifyBranchSame #77549
Conversation
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
cc @rust-lang/wg-mir-opt, would be great to get a quick review here from someone familiar with the code and a consideration of whether it makes sense to backport this PR or something disabling the optimization entirely |
@bors r+ I agree that the change fixes this bug. Without digging into the MIR at various stages I cannot tell for sure why/how macro expansion influences this. I'm guessing that it's the I think we should just beta backport this as it is a clearly the right fix and a trivial change. Since beta to stable promotion is happening very soon: cc @rust-lang/compiler emergency backport approval needed here (alternative is to disable this optimization and take a perf hit somewhere, but we need some backport). |
📌 Commit f271957 has been approved by |
@bors p=6 |
yeah, we compare the I think beta backporting this is fine |
Okay, beta-accepting. Will include in stable later today. |
☀️ Test successful - checks-actions, checks-azure |
…albini [stable] 1.47 release This PR includes backports of: * Fix miscompile in SimplifyBranchSame rust-lang#77549 * Force posix-style quoting on lld, independent of host platform rust-lang#77543 Note that both are still beta-nominated/beta-accepted, as they need to be backported to 1.48 as well (future beta branch).
…ulacrum [beta] backports This backports the following: * Improve build-manifest to work with the improved promote-release rust-lang#77407 * Force posix-style quoting on lld, independent of host platform rust-lang#77543 * Fix miscompile in SimplifyBranchSame rust-lang#77549 * Update RLS and Rustfmt rust-lang#77590 * Move `EarlyOtherwiseBranch` to mir-opt-level 2 rust-lang#77582
Cherry-picked from #77486, but with a different test case that used to be compiled incorrectly on both master & beta branches.