-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
codegen regression for bool #101048
Comments
The "canonical" code produces identical (and, since it has early exit, much more performant in most cases) assemblies between versions. pub fn all_zero(data: &[u64]) -> bool {
data.iter().all(|&x| x == 0)
} |
But constant-time functions can not early exit. |
Upstream issue: llvm/llvm-project#57448 |
Aside: I think our labels here are a bit too general; while the text for "regression-from-stable-to-nightly" label itself says "Performance or correctness regression from stable to nightly", I think it should probably be revised to be restricted to "correctness or severe performance regression ..." @rustbot label: -regression-from-stable-to-nightly |
I'm putting back the label for now; I want to get more consensus amongst the team about what the labels should be used for and what they denote (and how to get a narrower view when one wants to filter out cases like this) @rustbot label: +regression-from-stable-to-nightly |
Fixed upstream and will be pulled in with the next LLVM major version upgrade. I'm downgrading the priority as there's no point in revisiting this in triage until that time. |
Fixed by the LLVM 16 upgrade. |
Add codegen tests for issues fixed by LLVM 16 Fixes rust-lang#75978. Fixes rust-lang#99960. Fixes rust-lang#101048. Fixes rust-lang#101082. Fixes rust-lang#101814. Fixes rust-lang#103132. Fixes rust-lang#103327.
Add codegen tests for issues fixed by LLVM 16 Fixes rust-lang#75978. Fixes rust-lang#99960. Fixes rust-lang#101048. Fixes rust-lang#101082. Fixes rust-lang#101814. Fixes rust-lang#103132. Fixes rust-lang#103327.
Code
I tried this code:
https://rust.godbolt.org/z/3EW6zoffE
I expected to see this happen:
Instead, this happened:
There are two unnecessary instructions:
Version it worked on
It most recently worked on: Rust 1.63, Rust beta
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
The text was updated successfully, but these errors were encountered: