-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
No more auto-unrolling starting with LLVM 14 #94847
Comments
searched nightlies: from nightly-2022-02-01 to nightly-2022-03-01 bisected with cargo-bisect-rustc v0.6.1Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --test-dir=. --start=2022-02-01 --end=2022-03-01 |
The assembly is actually not vectorized in either version (each version only operates on 8 bytes (1 |
I just checked and now
Oh, you're right. My bad. |
I slapped together some extremely crude benchmarking on my 3970X and this looks like a 2x perf regression. If you replace The perhaps good news is that if you pass Also, it looks like this problem may be specific to computing the min of an array? That seems odd to me but maybe it means something to people who work on loop optimizations. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
I'd be curious to know if we regressed when you compute the min via other rustic-idioms like iterators. In any case, we've been discussing this in the T-compiler meeting and we are thinking it isn't quite P-high priority, and perhaps should be P-medium. Its not clear what is the scope of kinds of loops that LLVM has started to fail to unroll; it seems somewhat limited. |
Yup, same behavior with |
Code
I tried this code:
I expected to see this happen: I expect that the generated assembly will unroll the loop to a certain level.
Instead, this happened: There is no more unrolling perform by the compiler.
Version it worked on
It most recently worked on: 1.59
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: