-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Suboptimal order of tests in match #117970
Copy link
Copy link
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code (godbolt):
I expected to see this happen:
srcshould produce assembly as efficient astgt, since they are both equivalent on all inputs.tgtfirst checksyagainst10, then checksxagainst1,2and3:Instead, this happened:
srcchecksxagainst3, then checksyagainst10, then checksxagainst2, then checksyagainst10, then checksxagainst1, then checksyagainst10:Meta
rustc --version --verbose:Backtrace