-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Inefficient compiler optimization between stable versions on nightly #123262
Comments
The stable version may be marked as having come out on 2024-03-27 but it dates to the nightly of around ~13 weeks before that, that's probably why. (i.e. there's not actually a corresponding stable release for nightly 2024-02-12 yet). |
Thank you for the report! It would be useful to bisect the regression using cargo-bisect-rustc to make it easier to figure out what happened and ping the relevant people. You already have the nightly, but getting the precise PR is even better. |
Thanks for the response. I'm short on time at this exact moment, but I'll identify and bisect the regression commit soon. |
searched nightlies: from nightly-2024-02-08 to nightly-2024-02-13 bisected with cargo-bisect-rustc v0.6.8Host triple: aarch64-apple-darwin cargo bisect-rustc -v --start=2024-02-08 --end=2024-02-13 --script ./test.sh test.sh (using cargo-show-asm) #!/bin/sh
set -ex
export OUTPUT=`cargo asm --simplify`
test ${#OUTPUT} -lt 500 I can provide more information about my build configuration if necessary. |
It seems that jump-threading is making the IR more complex. The optimization information has not been lost: https://alive2.llvm.org/ce/z/cPHXB2. @rustbot label A-mir-opt A-LLVM |
Disable jump-threading: https://godbolt.org/z/MfM9Mnb6K. |
paging @cjgillot @tmiasko for #117206 @ArhanChaudhary thanks for bisecting your issue report. Can you quantify a bit the performance impact reported? thanks WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
For my logic simulator specifically, the simulated clock speed drops from around 21.5 MHz to 1.75 MHz following this regression on a |
@rustbot label -E-needs-bisection |
I have been recently been working on a logic simulator that requires building on the nightly channel. With the release of Rust 1.77.1, I subsequently updated my version from nightly-2024-02-08 to nightly-2024-03-28 and instantly noticed a drastic performance impact. Upon further investigation, starting from
nightly-2024-02-12
and onwards, the compiler is no longer able to optimize my multiplexor function.The godbolt link is unintentionally misleading with its versions. Strangely, this regression does not happen on the equivalent stable channel versions (1.76.0 and 1.77.1), and the reason why this happens only on nightly is beyond my current knowledge.
rustc --version --verbose
: (The first bad version, and I think the dates are shifted because of time zones)I'm not sure which regression label to mark this issue with, since it's occurred between stable versions but on the nightly channel, so I'll omit one for now.
@rustbot modify labels: -regression-untriaged
The text was updated successfully, but these errors were encountered: