Optimizer regression in Rust nightly #131162
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
P-medium
Medium priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Code
I tried this code:
I expected to see this happen: Each function is optimized to a simple equality comparison.
Instead, this happened: On nightly,
test1()
is not optimized correctly. Tested locally with AArch64, but Godbolt suggests analogous results for x86-64.Version it worked on
It most recently worked on:
Version with regression
rustc --version --verbose
:Backtrace
N/A
Demo
Godbolt, default settings (x86_64-unknown-linux-gnu): https://rust.godbolt.org/z/K8PnTo1cn
On aarch64-apple-darwin macOS 15.0, using a blank new Cargo project with
lib.rs
exactly as above:@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
The text was updated successfully, but these errors were encountered: