-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
AVX2 related regression introduced by rust 1.56.0 and onwards #91839
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried this code:
I expected to see this happen: tests pass with success
Instead, this happened: some tests are failing:
Version it worked on
It most recently worked on: Rust 1.55.0
Version with regression
rustc +1.56.0 --version --verbose:and onwards (1.56.1, 1.57.0, beta and nightly)
How to reproduce
Just run the following command with the previously mentioned commit checked out:
What does commit cloudflare/sliceslice-rs@a7d4556 do
It just moves method
vector_search_infrom theAvx2Searcherstruct to theSearchertrait. Loosing the#[target_feature(enable = "avx2")]attribute at the same time.I found two (unsatisfactory) way to make the tests pass:
But that won't work ultimately because the trait is going to be implemented for other architectures.
hash.firstto the standard output: cloudflare/sliceslice-rs@a7d4556#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R212Absolutely no idea why printing something would have any influence!
Everything works properly for rust versions <= 1.55.0
Bisection attempt
I have tried to use
cargo-bisect-rustcto bisect and it seems introduced between nightly-2021-08-10 and nightly-2021-08-12 (there are no nightly for 2021-08-11).Further (manual) bisection points to #87254 but I am not sure my bisection is actually correct so any help is welcome 👍